Resource URIs
Use resource URIs to identify platform entities
Overview
A resource URI is global and unique identifier for a resource instance (e.g. a specific portfolio) on the Intelligent Risk Platform. This URI identifies this object throughout a tenant's Intelligent Risk Platform implementation regardless of application, exposure set, or data module (EDM).
Resource URIs facilitate workflow integration across all Intelligent Risk Platform functions. Clients can always identify specific API resources (exposures, databases, jobs) in all contexts and manage those API resources using API operations and workflows.
Using resource URIs
A resource URI is nearly identical to the URI portion of API resource, i.e. the portion of an endpoint used to retrieve (GET
), update (PUT
, PATCH
), and delete (DELETE
) that API resource.
But whereas an API resource is generalized and includes variables (e.g. porfolioId
), a resource URI specifies the unique ID of a resource instance (e.g. 54
).
Let's say you want to include a specific account (e.g. the account with the accountId
555) in a custom workflow. You can specify this particular account using its resource URI.
https://{host}/platform/riskdata/v1/exposures/23/accounts/555
This resource URI is identical to the endpoint path specified in the Get Account operation except that except that the resource URI substitutes the resource IDs for path parameter variables:
https://{host}/platform/riskdata/v1/exposures/{exposureId}/accounts/{accountId}
The endpoint for this operation includes two path parameters: an exposureId
and an accountId
.
- The
exposureId
specifies the unique ID number (23) of the data module (EDM) that stores and manages this account. - The
accountId
specifies the unique ID number (555) of this account.
Use cases
Resource URIs uniquely identify many different types of API resources including exposures (portfolios, accounts, locations), data resources (servers, databases), and jobs (import jobs, export jobs, modeling jobs).
Exposures
Resource URIs are commonly used in the management of risk data objects, e.g. exposures.
An exposure is an API resource that is vulnerable to catastrophe risk and may produce a financial loss. Policies, accounts, locations, and treaties are all examples of exposures.
The resource URI uniquely identifies an API resource and defines that path needed to view or update API resource details.
For example, the same resource URI would be used to view or update that account with account ID 555:
This resource URI is used to view account details in the Get Account operation:
curl --request GET \
--url https://api-euw1.rms.com/platform/riskdata/v1/exposures/23/accounts/555 \
--header 'accept: application/json'
This same resource URI is used to update account details in the Update Account operation:
curl --request PUT \
--url https://api-euw1.rms.com/platform/riskdata/v1/exposures/23/accounts/555\
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"accountName": "New Name"
}
'
Jobs
The resource URI of a job uniquely identifies that job and enables the polling" of job status.
For example, the following resource URI uniquely identifies the risk data job with the jobId of 67:
https://api-euw1.rms.com/platform/riskdata/v1/jobs/67
This same URI can be used to track the status of that job using the Get Risk Data Job:
curl --request GET \
--url https://api-euw1.rms.com/platform/riskdata/v1/jobs/67 \
--header 'accept: application/json'
To learn more about jobs and polling, see Platform Jobs
Updated 12 days ago