Jobs
List jobs for the caller's tenant
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Query Parameters
Filter by job type
Filter by status: queued|running|succeeded|failed|cancelled
Max jobs to return (default 25, max 200)
int64Opaque pagination cursor from a previous response
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/jobs"{
"$schema": "/api/v1/schemas/ListJobsOutputBody.json",
"jobs": [
{
"$schema": "/api/v1/schemas/JobDTO.json",
"created_at": "2019-08-24T14:15:22Z",
"error": "string",
"job_id": "string",
"params": {
"property1": null,
"property2": null
},
"progress": {
"message": "string",
"pct": 0,
"stage": "string"
},
"result": {
"property1": null,
"property2": null
},
"status": "string",
"tenant_id": "string",
"type": "string",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Enqueue an async job
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/jobs" \ -H "Content-Type: application/json" \ -d '{ "type": "string" }'{
"$schema": "/api/v1/schemas/JobDTO.json",
"created_at": "2019-08-24T14:15:22Z",
"error": "string",
"job_id": "string",
"params": {
"property1": null,
"property2": null
},
"progress": {
"message": "string",
"pct": 0,
"stage": "string"
},
"result": {
"property1": null,
"property2": null
},
"status": "string",
"tenant_id": "string",
"type": "string",
"updated_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get a job (poll for status + results)
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Job UUID
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/jobs/string"{
"$schema": "/api/v1/schemas/JobDTO.json",
"created_at": "2019-08-24T14:15:22Z",
"error": "string",
"job_id": "string",
"params": {
"property1": null,
"property2": null
},
"progress": {
"message": "string",
"pct": 0,
"stage": "string"
},
"result": {
"property1": null,
"property2": null
},
"status": "string",
"tenant_id": "string",
"type": "string",
"updated_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Best-effort cancel a queued or running job
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Job UUID
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/jobs/string/cancel"{
"$schema": "/api/v1/schemas/JobDTO.json",
"created_at": "2019-08-24T14:15:22Z",
"error": "string",
"job_id": "string",
"params": {
"property1": null,
"property2": null
},
"progress": {
"message": "string",
"pct": 0,
"stage": "string"
},
"result": {
"property1": null,
"property2": null
},
"status": "string",
"tenant_id": "string",
"type": "string",
"updated_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}