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:
- Set the
HTTP verb
to GET. - Click on the Authorization tab and set the access token as the
Bearer Token
. - Specify the
URL
to thereport/{jobId}/status
API endpoint, where thejobId
is passed in the URL of the request. For example, https://fslpresales.fslcgix-uat.co.uk/FSLPresales_WebAPI/api/report/12780/status, wherejobId
= "12780". - Click on the
Body
tab and then the none option.
2. Sending the Request
Click the Send button to send the prepared request.
3. The Response Body
The response returns the status of the job as follows:
Job Status | Description |
---|---|
Enqueued | When the report generation job is enqueued, the status will be "Enqueued". The job will be available to be picked up by the Hangfire Service. |
Processing | When the job is picked up by the Hangfire Service, it shows the job status as "Processing". |
Succeeded | When Hangfire Service has successfully generated the reports, the status shows “Succeeded”. |
Failed | When 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.
Updated about 1 year ago