Jobs
List all jobs
Section titled List all jobsRetrieve all jobs, including those that are completed or canceled.
Method
Section titled MethodGET
/api/v1/:projectKey/jobs
Request Headers
Section titled Request HeadersAuthorization: {YOUR_ORGANIZATION_API_KEY}
: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.
Status Codes
Section titled Status Codes200
: Response sent as JSON in body
Example Request
Section titled Example Requestcurl -X GET \
https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs \
-H 'content-type: application/json' \
-H 'Authorization: {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": "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
Section titled Get job detailsReturn the job’s status
and other details such as createdAt
, referenceId
and errors
.
Method
Section titled MethodGET
/api/v1/:projectKey/jobs/:jobId
Parameters
Section titled ParametersName | Type | Description |
---|---|---|
jobId | string | The ID returned by the user deletion call (required) |
Request Headers
Section titled Request HeadersAuthorization: {YOUR_ORGANIZATION_API_KEY}
: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.
Status Codes
Section titled Status Codes200
: Response sent as JSON in body
Example Request
Section titled Example Requestcurl -X GET \
https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs/3451\
-H 'content-type: application/json' \
-H 'Authorization: {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": "mehdi@openreplay.com",
"createdAt": 1623912955277,
"updatedAt": 1623912955277,
"startAt": 1623954600000,
"errors": null
}
}
Cancel job
Section titled Cancel jobCancel a job if it hasn’t yet started or still in progress.
Method
Section titled MethodDELETE
/api/v1/:projectKey/jobs/:jobId
Parameters
Section titled ParametersName | Type | Description |
---|---|---|
jobId | string | The ID returned by the user deletion call (required) |
Request Headers
Section titled Request HeadersAuthorization: {YOUR_ORGANIZATION_API_KEY}
: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.
Status Codes
Section titled Status Codes200
: Response sent as JSON in body
501
: Returned if the job cannot be cancelled
Example Request
Section titled Example Requestcurl -X DELETE \
https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs/3452 \
-H 'content-type: application/json' \
-H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
Example Response
Section titled 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
}
}