Jobs

Retrieve all jobs, including those that are completed or canceled.

GET

/api/v1/:projectKey/jobs

Authorization: {YOUR_ORGANIZATION_API_KEY}: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200: Response sent as JSON in body

curl -X GET \
  https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
{
  "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
    }
  ]
}

Return the job’s status and other details such as createdAt, referenceId and errors.

GET

/api/v1/:projectKey/jobs/:jobId

NameTypeDescription
jobIdstringThe ID returned by the user deletion call (required)

Authorization: {YOUR_ORGANIZATION_API_KEY}: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200: Response sent as JSON in body

curl -X GET \
  https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs/3451\
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
{
  "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 a job if it hasn’t yet started or still in progress.

DELETE

/api/v1/:projectKey/jobs/:jobId

NameTypeDescription
jobIdstringThe ID returned by the user deletion call (required)

Authorization: {YOUR_ORGANIZATION_API_KEY}: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200: Response sent as JSON in body 501: Returned if the job cannot be cancelled

curl -X DELETE \
  https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/jobs/3452 \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
{
  "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
  }
}