All requests must include an API token in the Authorization header:
Authorization: Bearer kasd983jajh
POST /api/capture
The request body should be a JSON object containing at least:
{
"tenantId": string, // Required. The ID of the tenant sending the data
"mode": "replace" | "append", // Optional. Defaults to "replace". Controls whether existing data should be replaced or appended to
// ... Additional data specific to your capture needs
}
For Vera's tenant (kdkko9tmlsd5b1z
), the payload should follow this structure:
{
"tenantId": "kdkko9tmlsd5b1z",
"mode": "replace", // Optional. Use "append" to add to existing data
"projectId": string,
"workflowId": string,
"operatorName": string,
"startTime": string, // ISO date string
"endTime": string, // ISO date string
"collectedData": [
{
"id": string,
"data": [
{
"taskName": string,
"value": any // The value depends on the taskName
}
],
"entryTime": string // ISO date string
}
]
}
{
"success": true,
"data": { ... } // Echo of the sent data
}
- 401 - Authentication errors
{ "error": "Missing or invalid authorization header" }
{ "error": "Invalid API token" }
{ "error": "Invalid API token for this tenant" }
- 400 - Invalid payload
{ "error": "Invalid request payload" }