Jobs
List all jobs
Retrieve all jobs, including those that are completed or canceled.
Method
GET
URL
/api/v1/:projectKey/jobs
Request Headers
Authorization: {YOUR_ORGANIZATION_API_KEY}
: The key can be found in 'Preferences' > 'Account' > 'Organization API Key'.
Status Codes
200
: Response sent as JSON in body
Example Request
curl -X GET \https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs \-H 'content-type: application/json' \-H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
Example Response
{"data": [{"jobId": 3451,"description": "Delete user sessions of userId = shekar@example.com","status": "scheduled","projectId": 1,"action": "delete_user_data","referenceId": "mehdi@openreplay.com","createdAt": 1623912955277,"updatedAt": 1623912955277,"startAt": 1623954600000,"errors": null},{"jobId": 3452,"description": "Delete user sessions of userId = shekar@example.com","status": "cancelled","projectId": 1,"action": "delete_user_data","referenceId": "mehdi@openreplay.com","createdAt": 1623912962910,"updatedAt": 1623913015276,"startAt": 1623954600000,"errors": null}]}
Get job details
Return the job's status
and other details such as createdAt
, referenceId
and errors
.
Method
GET
URL
/api/v1/:projectKey/jobs/:jobId
Parameters
Name | Type | Description |
---|---|---|
jobId | string | The ID returned by the user deletion call (required) |
Request Headers
Authorization: {YOUR_ORGANIZATION_API_KEY}
: The key can be found in 'Preferences' > 'Account' > 'Organization API Key'.
Status Codes
200
: Response sent as JSON in body
Example Request
curl -X GET \https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs/3451\-H 'content-type: application/json' \-H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
Example Response
{"data": {"jobId": 3451,"description": "Delete user sessions of userId = shekar@example.com","status": "scheduled","projectId": 1,"action": "delete_user_data","referenceId": "mehdi@openreplay.com","createdAt": 1623912955277,"updatedAt": 1623912955277,"startAt": 1623954600000,"errors": null}}
Cancel job
Cancel a job if it hasn't yet started or still in progress.
Method
DELETE
URL
/api/v1/:projectKey/jobs/:jobId
Parameters
Name | Type | Description |
---|---|---|
jobId | string | The ID returned by the user deletion call (required) |
Request Headers
Authorization: {YOUR_ORGANIZATION_API_KEY}
: The key can be found in 'Preferences' > 'Account' > 'Organization API Key'.
Status Codes
200
: Response sent as JSON in body
501
: Returned if the job cannot be cancelled
Example Request
curl -X DELETE \https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs/3452 \-H 'content-type: application/json' \-H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
Example Response
{"data": {"jobId": 3452,"description": "Delete user sessions of userId = shekar@example.com","status": "cancelled","projectId": 1,"action": "delete_user_data","referenceId": "mehdi@openreplay.com","createdAt": 1623912962910,"updatedAt": 1623913015276,"startAt": 1623954600000,"errors": null}}