Insert rows
curl --request POST \
--url https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"data": [
{
"address": "0x123",
"chain": "ethereum",
"label": "treasury"
},
{
"address": "0x456",
"chain": "ethereum",
"label": "operations"
},
{
"address": "0x789",
"chain": "base",
"label": "treasury"
}
],
"overwrite": false
}
'import requests
url = "https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert"
payload = {
"data": [
{
"address": "0x123",
"chain": "ethereum",
"label": "treasury"
},
{
"address": "0x456",
"chain": "ethereum",
"label": "operations"
},
{
"address": "0x789",
"chain": "base",
"label": "treasury"
}
],
"overwrite": False
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: [
{address: '0x123', chain: 'ethereum', label: 'treasury'},
{address: '0x456', chain: 'ethereum', label: 'operations'},
{address: '0x789', chain: 'base', label: 'treasury'}
],
overwrite: false
})
};
fetch('https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert', 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.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
[
'address' => '0x123',
'chain' => 'ethereum',
'label' => 'treasury'
],
[
'address' => '0x456',
'chain' => 'ethereum',
'label' => 'operations'
],
[
'address' => '0x789',
'chain' => 'base',
'label' => 'treasury'
]
],
'overwrite' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert"
payload := strings.NewReader("{\n \"data\": [\n {\n \"address\": \"0x123\",\n \"chain\": \"ethereum\",\n \"label\": \"treasury\"\n },\n {\n \"address\": \"0x456\",\n \"chain\": \"ethereum\",\n \"label\": \"operations\"\n },\n {\n \"address\": \"0x789\",\n \"chain\": \"base\",\n \"label\": \"treasury\"\n }\n ],\n \"overwrite\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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.post("https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"address\": \"0x123\",\n \"chain\": \"ethereum\",\n \"label\": \"treasury\"\n },\n {\n \"address\": \"0x456\",\n \"chain\": \"ethereum\",\n \"label\": \"operations\"\n },\n {\n \"address\": \"0x789\",\n \"chain\": \"base\",\n \"label\": \"treasury\"\n }\n ],\n \"overwrite\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": [\n {\n \"address\": \"0x123\",\n \"chain\": \"ethereum\",\n \"label\": \"treasury\"\n },\n {\n \"address\": \"0x456\",\n \"chain\": \"ethereum\",\n \"label\": \"operations\"\n },\n {\n \"address\": \"0x789\",\n \"chain\": \"base\",\n \"label\": \"treasury\"\n }\n ],\n \"overwrite\": false\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"table_name": "<string>",
"creator_organization_id": "<string>",
"overwrite": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "queued",
"creator_org_team_user_id": "<string>",
"stats": {
"rows_inserted": 123,
"rows_updated": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Data Upload API
Insert rows
Create a private Explorer table or add rows to an existing table.
POST
/
api
/
v1
/
explorer
/
data-management
/
tables
/
{table_name}
/
insert
Insert rows
curl --request POST \
--url https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"data": [
{
"address": "0x123",
"chain": "ethereum",
"label": "treasury"
},
{
"address": "0x456",
"chain": "ethereum",
"label": "operations"
},
{
"address": "0x789",
"chain": "base",
"label": "treasury"
}
],
"overwrite": false
}
'import requests
url = "https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert"
payload = {
"data": [
{
"address": "0x123",
"chain": "ethereum",
"label": "treasury"
},
{
"address": "0x456",
"chain": "ethereum",
"label": "operations"
},
{
"address": "0x789",
"chain": "base",
"label": "treasury"
}
],
"overwrite": False
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: [
{address: '0x123', chain: 'ethereum', label: 'treasury'},
{address: '0x456', chain: 'ethereum', label: 'operations'},
{address: '0x789', chain: 'base', label: 'treasury'}
],
overwrite: false
})
};
fetch('https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert', 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.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
[
'address' => '0x123',
'chain' => 'ethereum',
'label' => 'treasury'
],
[
'address' => '0x456',
'chain' => 'ethereum',
'label' => 'operations'
],
[
'address' => '0x789',
'chain' => 'base',
'label' => 'treasury'
]
],
'overwrite' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert"
payload := strings.NewReader("{\n \"data\": [\n {\n \"address\": \"0x123\",\n \"chain\": \"ethereum\",\n \"label\": \"treasury\"\n },\n {\n \"address\": \"0x456\",\n \"chain\": \"ethereum\",\n \"label\": \"operations\"\n },\n {\n \"address\": \"0x789\",\n \"chain\": \"base\",\n \"label\": \"treasury\"\n }\n ],\n \"overwrite\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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.post("https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"address\": \"0x123\",\n \"chain\": \"ethereum\",\n \"label\": \"treasury\"\n },\n {\n \"address\": \"0x456\",\n \"chain\": \"ethereum\",\n \"label\": \"operations\"\n },\n {\n \"address\": \"0x789\",\n \"chain\": \"base\",\n \"label\": \"treasury\"\n }\n ],\n \"overwrite\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/explorer/data-management/tables/{table_name}/insert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": [\n {\n \"address\": \"0x123\",\n \"chain\": \"ethereum\",\n \"label\": \"treasury\"\n },\n {\n \"address\": \"0x456\",\n \"chain\": \"ethereum\",\n \"label\": \"operations\"\n },\n {\n \"address\": \"0x789\",\n \"chain\": \"base\",\n \"label\": \"treasury\"\n }\n ],\n \"overwrite\": false\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"table_name": "<string>",
"creator_organization_id": "<string>",
"overwrite": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "queued",
"creator_org_team_user_id": "<string>",
"stats": {
"rows_inserted": 123,
"rows_updated": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}The API creates a private Explorer table in your organization when
The API returns an ingest job before the rows finish loading. Save its
Every row must have the same column names. The table name must start with a letter or underscore. It can contain only letters, digits, or underscores and have no more than 255 characters.
table_name does not exist. If the table exists, the API adds rows to it.
Send data as an array of objects with the same column names. Set overwrite to true to replace an existing table and its data. The default is false.
curl -X POST "https://api.allium.so/api/v1/explorer/data-management/tables/wallet_addresses/insert" \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"data": [
{"address": "0x123", "chain": "ethereum", "label": "treasury"},
{"address": "0x456", "chain": "ethereum", "label": "operations"},
{"address": "0x789", "chain": "base", "label": "treasury"}
],
"overwrite": false
}'
job_id and get the ingest job to check the status and row counts.
Upload limits
| Limit | Value |
|---|---|
| JSON request body | 32 MiB |
| Rows per upload | 1 to 200,000 |
| Columns | 1 to 100 |
Authorizations
Path Parameters
Table name. Starts with a letter or underscore and contains only letters, digits, or underscores.
Pattern:
^[A-Za-z_][A-Za-z0-9_]{0,254}$Body
application/json
The JSON body can be up to 32 MiB and contain 1 to 200,000 rows. Each row must have the same columns, with 1 to 100 columns per row.
Response
The upload job was created. Check its status to learn whether the rows were loaded.
A job that uploads rows to a table.
Current upload job state.
Available options:
queued, running, completed, failed, up_for_retry Row counts when available. May be null while the job runs.
Show child attributes
Show child attributes
Was this page helpful?