Platform Jobs
Platform jobs have their own namespace but are globally identifiable. For example: An import job is identifiable with its URI: /platform/import/v1/jobs/123
; And the job 123 is also globally unique (Operations at tenant level is scheduled for future release
Overview
A platform job is a process that manages, creates, or transforms resources on the Intelligent Risk Platform. Long running operations are managed asynchronously. "Asynchronous calls do not block (or wait) for the API call to return from the server. Execution continues on in your program, and when the call returns from the server, a “callback” function is executed."
The Intelligent Risk Platform manages long-running processes as jobs. Most Platform API resources require little time to complete; the API can immediately return a 200 OK
response code that indicates to the client that its request was successful.
But in some cases, the client may make a request that initiates a long-running and time-consuming process, e.g. the creation of the core objects, data migration, the running reports, and risk analysis. In such cases, the API adds a job to the job queue and returns a 201 Accepted
response code to the client.
Such jobs tend to be rather long-running (time-consuming) and thereby pose a problem for RESTful APIs as long-running processes can be blocking.
Standard jobs
A standard job is a system-defined process that manages processes that are typically time-consuming and expensive. These processes include the creation of the core objects, the import or export of data, and catastrophe modeling.
Platform APIs expose operations that enable tenants to define and initiate jobs. Each Intelligent Risk Plaform API collects job management and tracking resources together.
Standard jobs return a 201 Created
or 202 Accepted
HTTP status code and a URI that enables polling of the job status.
Tracking Job Statuses
Each Platform API exposes distinct resources for tracking the status of API jobs.
A successful response returns the job
object, which provides detailed information about this job including the submitTime
, startTime
, type
, job details, and its status:
Status | Definition |
---|---|
PENDING | The job is pending. Follow by the QUEUED status. |
QUEUED | The job has been added to the queue. Follow by the RUNNING status. |
RUNNING | The platform is processing the job. Follow by the FINISHED or FAILED status. |
FINISHED | The job is finished. |
FAILED | The job has failed. |
CANCEL_REQUESTED | The platform has received a request to canel the job. Follow by the CANCELLING status. |
CANCELLING | The platform is cancelling the job. Follow by the CANCELLING status. |
CANCELLED | The job has been cancelled. |
NOTE
- Some job types may be initiated by multiple operations. For example, v1 and v2 of the Analyze Climate Change operation both initiate a
CLIMATE_CHANGE
job type.- Some operations enable you to initiate multiple types of jobs. For example, the Import Exposures from File operation may initiate either an
ALM_IMPORT
orMRI_IMPORT
job depending on the values specified in the request body.
Updated 13 days ago