Jobs
Job status values: scheduled, running, completed, failed, cancelled.
List all jobs
Section titled List all jobsRetrieve all jobs for a project, including completed and cancelled ones. Paginated.
Method
Section titled MethodGET
/public/:projectKey/jobs
Query Parameters
Section titled Query Parameters| Name | Type | Description |
|---|---|---|
| limit | integer | Page size, 1-200 (default: 50). Values outside the range fall back to 50. |
| page | integer | Page number, starts at 1 (default: 1). Values < 1 fall back to 1. |
Request Headers
Section titled Request HeadersAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
Example Request
Section titled Example Requestcurl -X GET \
'{BASE_URL}/public/3sWXSsqHgSKnE87YkNJK/jobs?limit=50&page=1' \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}'
Example Response
Section titled Example Response{
"data": [
{
"jobId": 3451,
"description": "Delete user sessions of userId = shekar@example.com",
"status": "scheduled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "shekar@example.com",
"createdAt": 1623912955277,
"updatedAt": null,
"startAt": 1623954600000,
"errors": null
},
{
"jobId": 3452,
"description": "Delete user sessions of userId = mehdi@example.com",
"status": "cancelled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "mehdi@example.com",
"createdAt": 1623912962910,
"updatedAt": 1623913015276,
"startAt": 1623954600000,
"errors": null
}
]
}
Get job details
Section titled Get job detailsReturn the job’s status and metadata.
Method
Section titled MethodGET
/public/:projectKey/jobs/:jobId
Parameters
Section titled Parameters| Name | Type | Description |
|---|---|---|
| jobId | integer | The job ID (required) |
Request Headers
Section titled Request HeadersAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
Status Codes
Section titled Status Codes200: Response sent as JSON in body
400: Invalid jobId (not an integer)
404: Job not found
Example Request
Section titled Example Requestcurl -X GET \
{BASE_URL}/public/3sWXSsqHgSKnE87YkNJK/jobs/3451 \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}'
Example Response
Section titled Example Response{
"data": {
"jobId": 3451,
"description": "Delete user sessions of userId = shekar@example.com",
"status": "scheduled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "shekar@example.com",
"createdAt": 1623912955277,
"updatedAt": null,
"startAt": 1623954600000,
"errors": null
}
}
Cancel job
Section titled Cancel jobCancel a job that hasn’t started or is still in progress.
Method
Section titled MethodDELETE
/public/:projectKey/jobs/:jobId
Parameters
Section titled Parameters| Name | Type | Description |
|---|---|---|
| jobId | integer | The job ID (required) |
Request Headers
Section titled Request HeadersAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
Status Codes
Section titled Status Codes200: Job cancelled
400: Job cannot be cancelled in its current state, or invalid jobId
404: Job not found
Example Request
Section titled Example Requestcurl -X DELETE \
{BASE_URL}/public/3sWXSsqHgSKnE87YkNJK/jobs/3452 \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}'
Example Response
Section titled Example Response{
"data": {
"jobId": 3452,
"description": "Delete user sessions of userId = mehdi@example.com",
"status": "cancelled",
"projectId": 1,
"action": "delete_user_data",
"referenceId": "mehdi@example.com",
"createdAt": 1623912962910,
"updatedAt": 1623913015276,
"startAt": 1623954600000,
"errors": null
}
}