Upload Entity Ids
curl --request POST \
--url https://api.explorium.ai/v2/async/entity-id-datasets/upload \
--header 'Content-Type: multipart/form-data' \
--header 'api_key: <api-key>' \
--form file='@example-file' \
--form 'name=<string>' \
--form 'description=<string>'import requests
url = "https://api.explorium.ai/v2/async/entity-id-datasets/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"description": "<string>"
}
headers = {"api_key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
form.append('description', '<string>');
const options = {method: 'POST', headers: {api_key: '<api-key>'}};
options.body = form;
fetch('https://api.explorium.ai/v2/async/entity-id-datasets/upload', 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.explorium.ai/v2/async/entity-id-datasets/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.explorium.ai/v2/async/entity-id-datasets/upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://api.explorium.ai/v2/async/entity-id-datasets/upload")
.header("api_key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.explorium.ai/v2/async/entity-id-datasets/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"list_id": "<string>",
"name": "<string>",
"description": "<string>",
"rowCount": 123,
"tenantId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Async jobs
Upload entity ID dataset
POST
/
v2
/
async
/
entity-id-datasets
/
upload
Upload Entity Ids
curl --request POST \
--url https://api.explorium.ai/v2/async/entity-id-datasets/upload \
--header 'Content-Type: multipart/form-data' \
--header 'api_key: <api-key>' \
--form file='@example-file' \
--form 'name=<string>' \
--form 'description=<string>'import requests
url = "https://api.explorium.ai/v2/async/entity-id-datasets/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"description": "<string>"
}
headers = {"api_key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
form.append('description', '<string>');
const options = {method: 'POST', headers: {api_key: '<api-key>'}};
options.body = form;
fetch('https://api.explorium.ai/v2/async/entity-id-datasets/upload', 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.explorium.ai/v2/async/entity-id-datasets/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.explorium.ai/v2/async/entity-id-datasets/upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://api.explorium.ai/v2/async/entity-id-datasets/upload")
.header("api_key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.explorium.ai/v2/async/entity-id-datasets/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"list_id": "<string>",
"name": "<string>",
"description": "<string>",
"rowCount": 123,
"tenantId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Description
The Upload Entity ID Dataset endpoint accepts a CSV of entity IDs and stores it as a reusable dataset. Use it when an async job’s input list is larger than you want to send inline, or when the same list feeds several jobs.How It Works
How It Works
- Input: Upload a CSV file of entity IDs as
multipart/form-data, along with the entity type, a name, and a description. - Processing: The system stores the list and assigns it an identifier.
- Output: A
list_idyou can reference when submitting an async job, plus metadata about the stored dataset.
Request Schema
Request Schema
| Field | Type | Description |
|---|---|---|
file | file | CSV file with entity IDs (Required) |
entity_type | string | Entity type (Required) |
name | string | Dataset name (Required) |
description | string | Dataset description (Required) |
Response Schema
Response Schema
| Field | Type | Description |
|---|---|---|
list_id | string | Identifier used to reference the dataset |
name | string | Dataset name |
description | string | Dataset description |
rowCount | integer | Number of entity IDs stored |
entityType | string | Entity type of the stored IDs |
tenantId | string | Tenant the dataset belongs to |
expiresAt | string | When the stored dataset expires |
Best Practices
Best Practices
- Check
rowCountafter upload to confirm the whole file was ingested. - Mind
expiresAt— datasets are not stored indefinitely; re-upload before running a job against an expired list. - Reuse one dataset across enrichments instead of uploading the same IDs repeatedly.
- Keep async input within the 10,000-record limit per job.
Authorizations
APIKeyHeaderAPIKeyHeader
Body
multipart/form-data
Was this page helpful?
⌘I