Bulk delete data source
curl --request DELETE \
--url https://apiweb.mile.app/api/v3/datas/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"_id": "62067ee1cd77000042006f89"
},
{
"_id": "62067ee3cd77000042006f8b"
}
]
}
'import requests
url = "https://apiweb.mile.app/api/v3/datas/bulk"
payload = { "data": [{ "_id": "62067ee1cd77000042006f89" }, { "_id": "62067ee3cd77000042006f8b" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: [{_id: '62067ee1cd77000042006f89'}, {_id: '62067ee3cd77000042006f8b'}]})
};
fetch('https://apiweb.mile.app/api/v3/datas/bulk', 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://apiweb.mile.app/api/v3/datas/bulk",
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([
'data' => [
[
'_id' => '62067ee1cd77000042006f89'
],
[
'_id' => '62067ee3cd77000042006f8b'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://apiweb.mile.app/api/v3/datas/bulk"
payload := strings.NewReader("{\n \"data\": [\n {\n \"_id\": \"62067ee1cd77000042006f89\"\n },\n {\n \"_id\": \"62067ee3cd77000042006f8b\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apiweb.mile.app/api/v3/datas/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"_id\": \"62067ee1cd77000042006f89\"\n },\n {\n \"_id\": \"62067ee3cd77000042006f8b\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/datas/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": [\n {\n \"_id\": \"62067ee1cd77000042006f89\"\n },\n {\n \"_id\": \"62067ee3cd77000042006f8b\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": 2,
"failed": 0,
"data": [
{
"status": true,
"message": "Success.",
"_id": "62067ee1cd77000042006f89"
},
{
"status": true,
"message": "Success.",
"_id": "62067ee3cd77000042006f8b"
}
]
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Data Source
Bulk delete data source
DELETE
/
datas
/
bulk
Bulk delete data source
curl --request DELETE \
--url https://apiweb.mile.app/api/v3/datas/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"_id": "62067ee1cd77000042006f89"
},
{
"_id": "62067ee3cd77000042006f8b"
}
]
}
'import requests
url = "https://apiweb.mile.app/api/v3/datas/bulk"
payload = { "data": [{ "_id": "62067ee1cd77000042006f89" }, { "_id": "62067ee3cd77000042006f8b" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: [{_id: '62067ee1cd77000042006f89'}, {_id: '62067ee3cd77000042006f8b'}]})
};
fetch('https://apiweb.mile.app/api/v3/datas/bulk', 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://apiweb.mile.app/api/v3/datas/bulk",
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([
'data' => [
[
'_id' => '62067ee1cd77000042006f89'
],
[
'_id' => '62067ee3cd77000042006f8b'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://apiweb.mile.app/api/v3/datas/bulk"
payload := strings.NewReader("{\n \"data\": [\n {\n \"_id\": \"62067ee1cd77000042006f89\"\n },\n {\n \"_id\": \"62067ee3cd77000042006f8b\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apiweb.mile.app/api/v3/datas/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"_id\": \"62067ee1cd77000042006f89\"\n },\n {\n \"_id\": \"62067ee3cd77000042006f8b\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/datas/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": [\n {\n \"_id\": \"62067ee1cd77000042006f89\"\n },\n {\n \"_id\": \"62067ee3cd77000042006f8b\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": 2,
"failed": 0,
"data": [
{
"status": true,
"message": "Success.",
"_id": "62067ee1cd77000042006f89"
},
{
"status": true,
"message": "Success.",
"_id": "62067ee3cd77000042006f8b"
}
]
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Authorizations
Use a valid Bearer token to authenticate.
Body
application/json
List of data (max: 3000 data)
Show child attributes
Show child attributes
⌘I