Language

DELETE - Delete A Record

https://testing.hubat.net/api/v2/data?records=ea5099d8-3c9f-49b2-8be9-e04f98bc34fa&records=f8f8910d-006d-46e5-95e6-b93e773e958d&records=3a77af60-f775-4ca6-99e4-c4c5e4203d59&records=62f4587a-d0d6-48cb-b291-f82c891c9b85

Deleting a record happens via a request providing the record’s ID

Headers

Content-Type

application/json

X-Auth-Token

curl --request DELETE \
  --url 'https:///api/v2/data?records=ea5099d8-3c9f-49b2-8be9-e04f98bc34fa&records=f8f8910d-006d-46e5-95e6-b93e773e958d&records=3a77af60-f775-4ca6-99e4-c4c5e4203d59&records=62f4587a-d0d6-48cb-b291-f82c891c9b85' \
  --header 'content-type: application/json' \
  --header 'x-auth-token: '
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https:///api/v2/data?records=ea5099d8-3c9f-49b2-8be9-e04f98bc34fa&records=f8f8910d-006d-46e5-95e6-b93e773e958d&records=3a77af60-f775-4ca6-99e4-c4c5e4203d59&records=62f4587a-d0d6-48cb-b291-f82c891c9b85");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("x-auth-token", "");

xhr.send(data);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///api/v2/data?records=ea5099d8-3c9f-49b2-8be9-e04f98bc34fa&records=f8f8910d-006d-46e5-95e6-b93e773e958d&records=3a77af60-f775-4ca6-99e4-c4c5e4203d59&records=62f4587a-d0d6-48cb-b291-f82c891c9b85",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json",
    "x-auth-token: "
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https:///api/v2/data"

headers = {
    'content-type': "application/json",
    'x-auth-token': ""
    }

response = requests.request("DELETE", url, headers=headers)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https:///api/v2/data?records=ea5099d8-3c9f-49b2-8be9-e04f98bc34fa&records=f8f8910d-006d-46e5-95e6-b93e773e958d&records=3a77af60-f775-4ca6-99e4-c4c5e4203d59&records=62f4587a-d0d6-48cb-b291-f82c891c9b85")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["content-type"] = 'application/json'
request["x-auth-token"] = ''

response = http.request(request)
puts response.read_body