Managing Jobs
Understand Platform API operations for viewing and managing jobs
Overview
A job is a long-running process that consumes significant system resources, such as modeling a location, importing exposure data, or updating portfolios in bulk.
The Platform APIs are a collection of APIs that support catastrophe modeling and other workflows on the Intelligent Risk Platform. Each Platform API exposes operations for creating, fetching, and updating different types of platform jobs.
A Platform API will generally support four operations for managing jobs within an API: Create Job, Search Jobs, Get Job, and Update Job.
Operation | Method | Endpoint | Description |
---|---|---|---|
Create Job | POST | /platform/{api}/v1/jobs | Creates a job. |
Search Jobs | GET | /platform/{api}/v1/jobs | Returns filtered list of jobs. |
Get Job | GET | /platform/{api}/v1/jobs/{jobId} | Returns specific job. |
Update Job | PATCH | /platform/{api}/v1/jobs/{jobId} | Cancels or updates priority of specific job. |
The following sections describe in general terms how to use Platform API operations to manage the lifecycle of platform jobs.
Creating Jobs
A Create Job operation is an operation that defines and initiates a job on the Intelligent Risk Platform.
In general, every Create Job operation is identified by a name that consists of three parts: the word create, the name of API, and the word job. For example, the Create Model Job is a Model Job API operation that creates different types of catastrophe modeling jobs, e.g. ALM
, DLM
, and HD
jobs.
curl --request POST \
--url https://api-euw1.rms.com/platform/model/v1/jobs \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-rms-resource-group-id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
--data '
{ // Body Paramerters}
'
Most Create Job operations require that the client specify the ID number of a resource group in a mandatory x-rms-resource-group-id
header parameter. A header parameter is a parameter passed in an HTTP request header that specifies information about the client making the request or about the requested resource.
The Intelligent Risk Platform manages and tracks all job-related resource quotas via resource groups. The resource group manages and tracks the number of jobs that the tenant runs. It defines the maximum number concurrent of primary jobs, the maximum number of concurrent secondary jobs, and the total number of jobs that the tenant may run during the day. For information see Resource Groups.
A Create Job will return either a 201 Created
or 202 Accepted
HTTP status code and the URI of a newly created job that has been added to a workflow queue. The client application can use this URI to poll the status of the job during processing. For details, see Polling Jobs
Searching Jobs
Platform APIs support operations that enable tenants to search lists of jobs created using the API. These operations are identified by a name that consists of three parts: the word search, the name of API, and the word jobs, e.g. Search Model Jobs.
In general,Search operations support filtering of response data using query parameters that are appended as query strings to the endpoint of the request.
curl --request GET \
--url 'https://api-euw1.rms.com/platform/model/v1/jobs?limit=20&offset=0' \
--header 'accept: application/json'
A filter consists of a single expression that defines a property, a condition (a property value), and an operator (e.g. =
or LIKE
). The filter
keyword also supports comparison operators, logical operators, list operators, and identity operators. The same query string supports sorting and pagination of results. To learn more, see Filtering and Pagination
Search Job operations return high-level information about a list of jobs. For each job, the response may return the jobId
, status
, type
, progress
, and other information.
[
{
"jobId": "54",
"userName": "[email protected]",
"status": "QUEUED",
"submittedAt": "2024-01-01T00:00:00.000Z",
"startedAt": "2024-01-01T00:00:00.000Z",
"endedAt": "2024-01-01T00:00:00.000Z",
"name": "DLM_model",
"type": "DLM",
"progress": 0,
"priority": "medium",
"entitlement": "RI-RISKMODELER",
"resourceGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"details": { // details},
"warnings": [ //warnings]
},
{
"jobId": "55",
"userName": "[email protected]",
"status": "FINISHED",
"submittedAt": "2024-01-01T00:00:00.000Z",
"startedAt": "2024-01-01T00:00:00.000Z",
"endedAt": "2024-01-01T00:00:00.000Z",
"name": "HD_model",
"type": "HD",
"progress": 100,
"priority": "high",
"entitlement": "RI-RISKMODELER",
"resourceGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"details": { // details},
"warnings": [ //warnings]
}
]
A Search Job operation may return different job properties depending on the API. In general, a request will return the following information for each job returned:
Property | Type | Description |
---|---|---|
jobId | String | ID of the job. |
userName | String | Login the principal (user or client) that submitted the job. |
status | String | Status of the job. Each status marks a stage in the workflow progress from submission to completion. One of CANCELLED , CANCELING , CANCEL_REQUESTED , FAILED , FINISHED , PENDING , QUEUED , or RUNNING . |
submittedAt | String | Date and time that the job was submitted in ISO 8601 format, e.g. 2020-01-01T00:00:00.000Z . Begins when job status is QUEUED . |
startedAt | String | Date and time that job was started in ISO 8601 format, e.g. 2020-01-01T00:00:00.000Z . Begins when job status is RUNNING . |
endedAt | String | Date and time that job ended in ISO 8601 format, e.g. 2020-01-01T00:00:00.000Z . Begins when job status is CANCELLED , FAILED , or FINISHED . |
name | String | User-defined name of the job. |
type | String | Type of the job. Some Platform APIs support multiple job types, e.g. the Model API supports ALM , DLM , and HD jobs. |
priority | String | Priority of the job. One of Very High , High , Medium , Low , Very Low . By default, Medium . |
progress | String | Percentage of job completion. Once the job is RUNNING , the progress value increases until it reaches 100, i.e. FINISHED . ` |
entitlement | String | Entitlement of the principal that submitted the job. |
resourceGroupId | String | ID of the resource group charged the usage of the job quota. |
details | Object | Object that returns detailed information about the job. Contents depends on the API, e.g. resources , summary . |
warnings | Array | List of warnings. |
Search Jobs by API
The job details returned depend on the operation. In general, the job returned are limited to the jobs created using a specific Platform API. The Search Risk Data Jobs operation return information about risk data jobs only.
API | Operation | Jobs |
---|---|---|
Accumulation API | Search Accumulation Jobs | ACCUMULATION |
Admin Data API | Search Admin Data Jobs | ARCHIVE_EDM , ARCHIVE_SECURABLE , COPY_TO_ARCHIVEPY , DELETE_ARCHIVE , DELETE_SECURABLE |
Batch API | Search Batch Jobs | EXPOSURE_BATCH_EDIT |
Clone API | Search Clone Jobs | |
Copy API | Search Copy Jobs | COPY_ACCOUNT , COPY_AGGREGATE_PORTFOLIO , COPY_PORTFOLIO |
Currency Conversion API | Search Currency Conversion Jobs | CONVERT_ACCOUNT_CURRENCY , CONVERT_AGGREGATE_PORTFOLIO_CURRENCY , CONVERT_PORTFOLIO_CURRENCY , CONVERT_RESULT_CURRENCY , CONVERT_TREATY_CURRENCY |
ESG Data API | Search ESG Jobs | |
Enrich Exposure API | Search Enrich Exposure Jobs | |
Export API | Search Export Jobs | BH_ROLLUP_DOWNLOAD_CSV , BULK_EDIT , BULK_EXPORT , DOWNLOAD_EDM , DOWNLOAD_RDM , DOWNLOAD_PEQT , DOWNLOAD_REPORT , DOWNLOAD_RESULTS , DOWNLOAD_LOCATION_RESULTS , DOWNLOAD_EXPOSURE_RESOURCE |
Geohaz API | Search Geohaz Jobs | GEOHAZ |
Grouping API | Search Grouping Jobs | GROUPING |
Import API | Search Import Jobs | ALM_IMPORT , OED_IMPORT , MRI_IMPORT , UPLOAD_EDM , UPLOAD_RDM |
Model API | Search Model Jobs | ALM , DLM , HD |
Risk Data API | Search Risk Data Jobs | BULK_EDIT , CLIMATE_CHANGE , CREATE_EDM , DELETE_ACCOUNT , DELETE_AGGREGATE_PORTFOLIO , DELETE_PORTFOLIO , DELETE_RDM , DEREGISTER_DATA_BRIDGE_EDM EDM2EDM , MAP_PERSPECTIVE , MARGINAL_IMPACT , PATE , PLT_TO_ELT , RENAME_ANALYSIS , REPORT_GENERATION , RERUN_EP , SIMULATE_LOSSES |
Rollup API | Search Rollup Jobs | |
STEP API | Search STEP Jobs | STEP_TOOL |
Search All Jobs
The Search Tenant Job operation is special in that it returns a list of all jobs initiated by any Platform API. The Search Tenant Jobs operation returns information about all tenant jobs regardless of the Platform API used to create the job.
Uniquely, the Search Tenant Job operation supports the platformOperationType
query parameter which supports filtering jobs by operation type. The following platformOperationType
values are supported: platform-accumulation
, platform-batch
, platform-export
, platform-geohaz
, platform-grouping
, platform-import
, platform-model
, platform-riskdata
, platform-rollupo
, platform-variation
, platfrom-currencyconversion
Getting Jobs
Every Platform API that exposes an operation for initiating a job, also supports operations for "polling" the status of that job. These operations are identified by a name that consists of three parts: the word get, the name of API, and the word job, e.g. Get Model Job.
A Get Job operation is an operation that returns detailed information about a single job. These operations are typically used in polling the status during processing.
Polling is a technique that enables applications to make non-blocking requests that is useful when the application needs to use services that require long-running processes, such as Intelligent Risk Platform jobs.
Each Platform API exposes distinct resources for tracking the status of API 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
API | Operation |
---|---|
Accumulation API | Get Accumulation Job |
Admin Data API | Get Admin Data ob |
Batch API | Get Batch ob |
Bulk Geohaz API | Get Bulk Geohaz Job |
Clone API | Get Clone Job |
Copy API | Get Copy Job |
Currency Conversion API | Get Currency Conversion ob |
Enrich Exposure API | Get Enrich Exposure Job |
Export API | Get Export Job |
Geohaz API | Get Geohaz Job |
Grouping API | Get Grouping Job |
Import API | Get Import Job |
Model API | Get primary job |
Risk Data API | Get Risk Data Job |
Rollup API | Get Rollup Job |
STEP API | Get STEP Job |
Variation API | Get Variation Job |
Responses
The response object returned depends on the API.
For example, the Get Risk Data Job operation returns information about a single job created using Risk Data API operations. The response returns metadata about that job including its ID, status, and progress:
{
"jobId": "string",
"userName": "string",
"status": "QUEUED",
"submittedAt": "string",
"startedAt": "string",
"endedAt": "string",
"name": "string",
"type": "string",
"progress": 0,
"details": {
"resources": [
{
"uri": "string"
}
],
"summary": "string"
},
"tasks": [
{
"taskId": "string",
"guid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"jobId": "string",
"status": "QUEUED",
"submittedAt": "string",
"createdAt": "string",
"name": "string",
"percentComplete": 0,
"priorTaskGuids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
"output": {
"summary": "string",
"errors": [
{
"message": "string"
}
],
"log": {
"additionalProp": "string"
}
}
}
]
}
The properties returned depend on the API.
Property | Description |
---|---|
details | Object that returns detailed information about the job. Contents of this object differs depends on the API. |
endedAt | Date and time that job ended. |
entitlement | Entitlement of the principal that created the job. |
jobId | ID of the job. Use the ID to view detailed information about a specific job. |
name | User-defined name of the job. |
priority | Priority of the job. |
progress | Current progress of the job. |
resourceGroupId | Resource group ID specified in the job request. |
startedAt | Date and time that job was started. |
status | Status of the job. One of CANCELED , CANCELING , CANCEL_REQUESTED , FAILED , FINISHED , PENDING , QUEUED , or RUNNING . |
submittedAt | Date and time that the job was submitted. |
tasks | A list of tasks processed within a job. |
type | Type of the job. Some Platform APIs support multiple job types, e.g. the Risk Data API. |
userName | Login the principal that submitted the job. |
warnings | Object returned by some APIs. |
Polling Job Status
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 cancel the job. Follow by the CANCELING status. |
CANCELING | The platform is canceling the job. Follow by the CANCELING status. |
CANCELED | The job has been canceled. |
Updating Jobs
Platform APIs support operations for updating the status or priority of a job. These operations are identified by a name that consists of three parts: the word update, the name of API, and the word job, e.g. Update Model Job.
Update Job operations support two primary functions: changing the priority of a job and changing the status of a job.
Platform API operations that support updating the priority and status of jobs.
API | Operation |
---|---|
Accumulation API | Update Accumulation Job |
Admin Data API | Update Admin Data Job |
Batch API | Update Batch Job |
Bulk Geohaz API | Update Bulk Geohaz Job |
Clone API | Update Clone Job |
Copy API | Update Copy Job |
Currency Conversion API | Update Currency Conversion Job |
Enrich Exposure API | Update Enrich Exposure Job |
ESG Data API | Update ESG Data Job |
Export API | Update Export Job |
Geohaz API | Update Geohaz Job |
Grouping API | Update Grouping Job |
Import API | Update Import Job |
Model API | Update primary job |
Risk Data API | Update Risk Data Job |
Rollup API | Update Rollup Job |
STEP API | Update STEP Job |
Variation API | Update Variation Job |
Changing Job Priority
An Update Job operation can be used to change the priority of a job.
The priority of a job indicates its relevant importance compared to the other jobs in that job queue. One of Very High
, High
, Medium
, Low
, Very Low
. In general, a job with a lower priority (e.g. Very Low
) is run later than a job with a higher priority (e.g. Very High
). By default, every job added to a job queue is assigned a Medium
priority.
This operation enables the client to change the priority of job.
curl --request PATCH \
--url https://api-euw1.rms.com/platform/riskdata/v1/jobs/578 \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"priority": "veryhigh"
}
'
Every job added to a job queue is assigned the same priority: Medium
. This means that the Scheduler does not take the priority of a job into account when it schedules a job for processing. In general, jobs are processed in the order submitted using a best-effort, FIFO policy. The Scheduler will also take the tenant's resource quota into account.
Most Platform APIs offer an operation for updating the priority jobs in the workflow queue. For example, the Update Risk Data Job operation supports updating the priority of jobs.
Principals assigned to a group with the Portfolio Manager or Cat Modeler role can change the priority of jobs.
Cancelling Jobs
An Update Job operation can be used to change the status of a job.
Any job can be canceled if its current status is QUEUED
. Once canceled, the job progresses through the following job statuses in order: CANCEL_REQUESTED
, CANCELING
, CANCELED
.
curl --request PATCH \
--url https://api-euw1.rms.com/platform/riskdata/v1/jobs/jobId \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"status": "CANCELLED"
}
'
In general, a Platform API job can only be cancelled if it has a QUEUED
status. A subset of Risk Data API jobs can be canceled if it has a PENDING
or RUNNING
job status: ALM
, BATCH
, CLIMATE_CHANGE
, CONVERT_RESULT_CURRENCY
, DLM
, HD
, DOWNLOAD_RDM
.
A canceled job does not count against the tenant’s entitlement resource quota.
Most Platform APIs expose an operation that supports the cancellation of a job in the workflow queue. For example, the Update Risk Data Job operation supports canceling a variety of risk data jobs.
Updated about 14 hours ago