Get the Status of a Job

Using the access token, check the status of an enqueued job via the Reporting API.

Every request sent to generate reports triggers a recalculation of the client first. Depending on the size of the client, the calculation finishing times can vary from some calculations finishing in seconds while others could take several minutes for larger clients.

1. Creating the Request

Create a new request in Postman as follows:

  1. Set the HTTP verb to GET.
  2. Click on the Authorization tab and set the access token as the Bearer Token.
  3. Specify the URL to the report/{jobId}/status API endpoint, where the jobId is passed in the URL of the request. For example, https://fslpresales.fslcgix-uat.co.uk/FSLPresales_WebAPI/api/report/12780/status, where jobId = "12780".
  4. Click on the Body tab and then the none option.

2. Sending the Request

Click the Send button to send the prepared request.

Response received in Postman

The response received in Postman shows the status of the job id 12780 as “Succeeded”

3. The Response Body

The response returns the status of the job as follows:

Job StatusDescription
EnqueuedWhen the report generation job is enqueued, the status will be "Enqueued". The job will be available to be picked up by the Hangfire Service.
ProcessingWhen the job is picked up by the Hangfire Service, it shows the job status as "Processing".
SucceededWhen Hangfire Service has successfully generated the reports, the status shows “Succeeded”.
FailedWhen there is any error in generating the reports then status shows as “Failed”. It could fail for various reasons including the recalculation of the client taking longer than the time limit configured in the settings. Try enqueuing the report generation job again. Check for the database logs for details.

When the job has “Succeeded”, the generated reports can be accessed via the next Reporting API endpoint.