ChakraHQ APIs
HomeSign In
HomeSign In
  1. Background Job
  • API Keys
  • Response Format
  • Whatsapp
    • Inbound Events Webhook
    • Pass Through APIs
      • Create WhatsApp Message Template (pass-through)
      • List WhatsApp Message Templates (pass-through)
      • Update WhatsApp Message Template (pass-through)
    • Send Whatsapp Template Message For Process
      POST
    • Send Whatsapp Template Message For A Phone Number
      POST
    • Upload Public Media
      POST
    • Whatsapp Messages API (pass-through)
      POST
  • Platform
    • Process
      • Fetch Process By Id
      • List Processes
      • Create Process
      • Update Process
      • Update Process By Primary Key
      • Delete Process
      • Delete Process By Primary Key Value
      • Bulk Create Process API
      • Bulk Update Process API
    • Task
      • Create Task API
    • User
      • List Users API
      • List Users API (V2)
      • Fetch User API
      • Fetch User API (V2)
      • Update User API
    • Photo
      • Fetch Photo API
      • Upload Photo API
      • Upload Photo API With Id
    • Background Job
      • Fetch Background Job
        GET
      • Fetch Background Job Entries API
        GET
    • Fetch Config
      GET
  1. Background Job

Fetch Background Job

GET
https://api.chakrahq.com/v1/ext/background-job/{backgroundJobId}
The Background job api gives you information about a background job that has been scheduled manually, as part of a bulk api request or through some other workflow.
The _data field returns meta information around the job itself.
The _meta field has extra information like
bjEntryCompletionStatusVsCount - count of all the backgroundjob entries grouped by their completion status.
INVALID - This completionStatus indicates that the entry was not valid. So it was not processed
NOT_STARTED - This completionStatus indicates that the background job entry is yet to be processed
SUCCESS - This completionStatus indicates that the background job entry has been processed successfully
ERROR - This completionStatus indicates that the background job entry has been processed but resulted in an error result

Background Job Examples#

If you use a bulk api like
PATCH /v1/ext/procedure/lead/process
the api will internally schedule a background job to process the entries provided to the bulk api. The response of the api will look something like this:
{
  "_data": {
    "id": "19632427-908f-4bf3-a6f5-69b9a0bbfc63",
    "createdAt": 1617966536211,
    "updatedAt": 1617966536211,
    "completionStatus": "IN_PROGRESS",
    "statusMessage": null,
    "startedAt": 1617966536210,
    "completedAt": 0,
    "team": "d3e64510-b75a-43a0-8ae5-dde78dac56c0",
    "type": "3ae1c371-9a3b-4c06-8090-42fea6c4df36"
  }
}
The id - 19632427-908f-4bf3-a6f5-69b9a0bbfc63 in the response represnts the id of a background job

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
backgroundJobId
string 
required
The background job id - should be a uuid
Example:
006af7f9-d5fb-4d1a-8b31-ac6f3a3a1dfc

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.chakrahq.com/v1/ext/background-job/006af7f9-d5fb-4d1a-8b31-ac6f3a3a1dfc'

Responses

🟢200Success
application/json
Body
_data
object 
required
id
string 
required
createdAt
integer 
required
updatedAt
integer 
required
startedAt
integer 
required
team
string 
required
type
string 
required
_meta
object 
required
bjEntryCompletionStatusVsCount
object 
required
Example
{
  "_data": {
    "id": "19632427-908f-4bf3-a6f5-69b9a0bbfc63",
    "createdAt": 1617966536211,
    "updatedAt": 1617966536211,
    "startedAt": 1617966536210,
    "team": "d3e64510-b75a-43a0-8ae5-dde78dac56c0",
    "type": "bulk_api_job"
  },
  "_meta": {
    "bjEntryCompletionStatusVsCount": {
      "INVALID": 100,
      "NOT_STARTED": 120,
      "SUCCESS": 389,
      "ERROR": 3
      
    }
  }
}
Previous
Upload Photo API With Id
Next
Fetch Background Job Entries API
Built with