Python
import os
from qaip import Qaip
client = Qaip(
api_key=os.environ.get("QAIP_API_KEY"), # This is the default and can be omitted
)
google_drive = client.google_drives.delete(
"id",
)
print(google_drive.id)curl https://developer.qaip.com/api/v1/google-drives/$ID \
-X DELETE \
-H "x-api-key: $QAIP_API_KEY"const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://developer.qaip.com/api/v1/google-drives/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://developer.qaip.com/api/v1/google-drives/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developer.qaip.com/api/v1/google-drives/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://developer.qaip.com/api/v1/google-drives/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.qaip.com/api/v1/google-drives/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"folder_url": "<string>",
"status": "unknown",
"ingestion_setting_id": "<string>",
"creation_time": 123,
"start_time": 123,
"end_time": 123,
"error": {
"title": "<string>",
"message": "<string>"
},
"metadata": {
"records": [
{
"key": "<string>",
"val": "<string>",
"type": "string"
}
]
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"code": "unavailable",
"message": "The upstream service is unavailable.",
"request_id": "019d3200-0000-7000-8000-000000000001",
"retryable": false,
"details": {}
}
}References
Start deletion of Google Drive data source
Initiates an asynchronous deletion job for the specified Google Drive data source. The response indicates that the deletion job has been accepted, not that the deletion is complete.
Required scope: ingestion:manage
DELETE
/
google-drives
/
{id}
Python
import os
from qaip import Qaip
client = Qaip(
api_key=os.environ.get("QAIP_API_KEY"), # This is the default and can be omitted
)
google_drive = client.google_drives.delete(
"id",
)
print(google_drive.id)curl https://developer.qaip.com/api/v1/google-drives/$ID \
-X DELETE \
-H "x-api-key: $QAIP_API_KEY"const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://developer.qaip.com/api/v1/google-drives/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://developer.qaip.com/api/v1/google-drives/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developer.qaip.com/api/v1/google-drives/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://developer.qaip.com/api/v1/google-drives/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.qaip.com/api/v1/google-drives/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"folder_url": "<string>",
"status": "unknown",
"ingestion_setting_id": "<string>",
"creation_time": 123,
"start_time": 123,
"end_time": 123,
"error": {
"title": "<string>",
"message": "<string>"
},
"metadata": {
"records": [
{
"key": "<string>",
"val": "<string>",
"type": "string"
}
]
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"request_id": "<string>",
"details": {},
"retryable": true
}
}{
"error": {
"code": "unavailable",
"message": "The upstream service is unavailable.",
"request_id": "019d3200-0000-7000-8000-000000000001",
"retryable": false,
"details": {}
}
}Response
Successfully deleted Google Drive data source

