Import a batch of typed records
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}/rows/bulk \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"import_id": "b7273072-33fa-49ea-9e48-cf6686ce0770",
"offset": 0,
"rows": [
{
"order_id": "JT-1042",
"total_usd": 79.44
},
{
"order_id": "JT-1043",
"total_usd": 36.24
}
]
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
import_id: 'b7273072-33fa-49ea-9e48-cf6686ce0770',
offset: 0,
rows: [
{order_id: 'JT-1042', total_usd: 79.44},
{order_id: 'JT-1043', total_usd: 36.24}
]
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}/rows/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}/rows/bulk"
payload = {
"import_id": "b7273072-33fa-49ea-9e48-cf6686ce0770",
"offset": 0,
"rows": [
{
"order_id": "JT-1042",
"total_usd": 79.44
},
{
"order_id": "JT-1043",
"total_usd": 36.24
}
]
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"inserted": 2,
"existing": 0
}Data workspace
Import a batch of typed records
Append up to 500 rows to one dedicated workspace table. The authenticated workspace must have an eligible Data workspace and the caller must have workspace-wide write access. The entire HTTP body is limited to 1 MiB. Each row is identified by this table, the import UUID, and its absolute position. Keep the same UUID, order and positions when continuing or retrying. Reusing a position skips it even if the stored record was edited or deleted. A new UUID starts a separate import. Validation and capacity checks apply to the whole batch.
POST
/
admin
/
api
/
data-workspace
/
tables
/
{table_id}
/
rows
/
bulk
Import a batch of typed records
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}/rows/bulk \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"import_id": "b7273072-33fa-49ea-9e48-cf6686ce0770",
"offset": 0,
"rows": [
{
"order_id": "JT-1042",
"total_usd": 79.44
},
{
"order_id": "JT-1043",
"total_usd": 36.24
}
]
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
import_id: 'b7273072-33fa-49ea-9e48-cf6686ce0770',
offset: 0,
rows: [
{order_id: 'JT-1042', total_usd: 79.44},
{order_id: 'JT-1043', total_usd: 36.24}
]
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}/rows/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}/rows/bulk"
payload = {
"import_id": "b7273072-33fa-49ea-9e48-cf6686ce0770",
"offset": 0,
"rows": [
{
"order_id": "JT-1042",
"total_usd": 79.44
},
{
"order_id": "JT-1043",
"total_usd": 36.24
}
]
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"inserted": 2,
"existing": 0
}Authorizations
sessionapiKeybearerAuth
Body
application/json
Response
Batch committed, including a fully replayed batch. Advance the input offset by inserted + existing.
The two counts sum to the submitted row count. A successful batch commits atomically.