Imports
Delete Import
Deletes an import and all events it added. The import must be finished, or started more than 2 hours ago.
DELETE /api/sites/:site/imports/:importIdDeletes an import and all events it added. The import must be finished, or started more than 2 hours ago. Requires the editor role or above on the site. On Rybbit Cloud, this requires a paid plan.
An unfinished import started within the last 2 hours is treated as still running and returns HTTP 400. After 2 hours an unfinished import (for example, one whose uploader stopped before sending isLastBatch) can be deleted. Returns 404 if the import does not exist and 403 if it belongs to another site.
Path Parameters
Prop
Type
Response
Returns 200 OK with an empty body.
curl -X DELETE "https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479" \
-H "Authorization: Bearer your_api_key_here"const response = await fetch(
'https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer your_api_key_here'
}
}
);import requests
response = requests.delete(
'https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479',
headers={
'Authorization': 'Bearer your_api_key_here'
}
)$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer your_api_key_here'
]);
$response = curl_exec($ch);
curl_close($ch);require 'net/http'
require 'json'
uri = URI('https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479')
req = Net::HTTP::Delete.new(uri)
req['Authorization'] = 'Bearer your_api_key_here'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479", nil)
req.Header.Set("Authorization", "Bearer your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()let client = reqwest::Client::new();
let res = client
.delete("https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479")
.header("Authorization", "Bearer your_api_key_here")
.send()
.await?;HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479"))
.header("Authorization", "Bearer your_api_key_here")
.DELETE()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");
var response = await client.DeleteAsync("https://app.rybbit.io/api/sites/123/imports/f47ac10b-58cc-4372-a567-0e02b2c3d479");