Delete entities
curl --request DELETE \
--url https://api.enterspeed.com/ingest/v2 \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"originIds": [
"p-5427",
"p-6724"
]
}
'import requests
url = "https://api.enterspeed.com/ingest/v2"
payload = { "originIds": ["p-5427", "p-6724"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({originIds: ['p-5427', 'p-6724']})
};
fetch('https://api.enterspeed.com/ingest/v2', 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://api.enterspeed.com/ingest/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'originIds' => [
'p-5427',
'p-6724'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enterspeed.com/ingest/v2"
payload := strings.NewReader("{\n \"originIds\": [\n \"p-5427\",\n \"p-6724\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.enterspeed.com/ingest/v2")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"originIds\": [\n \"p-5427\",\n \"p-6724\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enterspeed.com/ingest/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"originIds\": [\n \"p-5427\",\n \"p-6724\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"deletedSourceEntities": [
"p-5427"
],
"notFoundSourceEntities": [
"p-6724"
],
"errors": {
"1234": [
"OriginId must be a string, not a number at position 3"
]
}
}Starting the process for deleting entities.
Note: The bulk endpoint can take up to 50 entities in a single request.
DELETE
/
ingest
/
v2
Delete entities
curl --request DELETE \
--url https://api.enterspeed.com/ingest/v2 \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"originIds": [
"p-5427",
"p-6724"
]
}
'import requests
url = "https://api.enterspeed.com/ingest/v2"
payload = { "originIds": ["p-5427", "p-6724"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({originIds: ['p-5427', 'p-6724']})
};
fetch('https://api.enterspeed.com/ingest/v2', 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://api.enterspeed.com/ingest/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'originIds' => [
'p-5427',
'p-6724'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enterspeed.com/ingest/v2"
payload := strings.NewReader("{\n \"originIds\": [\n \"p-5427\",\n \"p-6724\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.enterspeed.com/ingest/v2")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"originIds\": [\n \"p-5427\",\n \"p-6724\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enterspeed.com/ingest/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"originIds\": [\n \"p-5427\",\n \"p-6724\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"deletedSourceEntities": [
"p-5427"
],
"notFoundSourceEntities": [
"p-6724"
],
"errors": {
"1234": [
"OriginId must be a string, not a number at position 3"
]
}
}Headers
Api key to validate your source.
Example:
"source-90880177-e9a1-47b3-9a40-7b728a6bafd8"
Body
application/json
Array of originIds to delete
object with an array of strings with originIds to delete
Response
Valid request. Processing of deleting the entities has begun.
A successful response is returned if one or more entities were valid. Only if all entities are invalid a 422 response is returned.
Was this page helpful?
⌘I