Idempotent Requests

Understand Risk Modeler support for idempotency

Overview

RMS APIs support idempotency, which allows you to safely retry service requests that might have failed due to connection issues, without accidentally performing the same operation twice. This behavior is useful when duplicate requests are sent either unintentionally or due to a timeout from network error, but no response is received.

Idempotency provides a way to reconcile failed requests with a server by allowing users to retry API requests safely. A method is idempotent if it guarantees similar results when you send an identical request multiple times. You can retry them several times without changing the result.

  • Risk Modeler services using the GET, PUT, and DELETE methods are idempotent by default.
  • Risk Modeler services using the POST method are not idempotent.

Sending idempotency keys in GET, PUT, and DELETE requests have no effect.

Sending idempotency keys

The Risk Modeler API guarantees idempotency for safely retrying POST requests without accidentally performing the same operation twice. Consequently, POST requests accept idempotency keys.

To perform an idempotent request, you must provide an additional X-RMS-RequestId in the request header. Including this unique key in the header makes the POST request idempotent by prompting the API to keep records to prevent duplicate operations.

When you include the key in your request, make it is sufficiently unique. To avoid any duplication, use Universally Unique Identifier (UUID) for the X-RMS-RequestId parameter.

The X-RMS-RequestId key expires after 24 hours. By using the idempotency key, you can safely retry requests if the second request occurs within 24 hours from when the server first receives the key.

In case of a bad request (error code 400), fix the inputs in the request and add a new idempotent key for the new request. If you get a 409 error, it means that the request processing is not finished yet. In this case, wait for some time and retry.

Idempotency for POST requests

The following Risk Modeler services accept Idempotency keys:

Account
  • /riskmodeler/v1/accounts
  • /riskmodeler/v2/accounts
  • /riskmodeler/v2/accounts/{id}/convertcurrency
  • /riskmodeler/v2/accounts/{id}/copy
  • /riskmodeler/v2/accounts/{id}/geohaz
  • /riskmodeler/v2/accounts/{id}/process
Aggregate Portfolio
  • /riskmodeler/v2/aggregate-portfolios/{id}/process
  • /riskmodeler/v2/aggregate-portfolios/{id}/convert-currency
  • /riskmodeler/v2/aggregate-portfolios/{id}/process
Analysis Group
  • /riskmodeler/v2/analysis-groups
Branch
  • /riskmodeler/v1/branches
Cedant
  • /riskmodeler/v1/cedants
Exports
  • /riskmodeler/v2/exports
Imports
  • /riskmodeler/v1/imports
Metrics
  • /riskmodeler/v2/analyses/{id}/pate
Portfolio
  • /riskmodeler/v2/portfolios/{id}/process
  • /riskmodeler/v2/portfolios/{id}/convert-currency
  • /riskmodeler/v2/portfolios/{id}/copy
LOBs
  • /riskmodeler/v1/lobs
Location
  • /riskmodeler/v1/locations/{id}/buildingattribute
  • /riskmodeler/v1/locations/{id}/coverage
  • /riskmodeler/v1/locations/{id}/locationwsdetail
  • /riskmodeler/v1/locations
  • /riskmodeler/v1/locations/{id}/locationbidetail
  • /riskmodeler/v1/locations/{id}/locationeqdetail
  • /riskmodeler/v1/locations/{id}/locationfldetail
  • /riskmodeler/v1/locations/{id}/locationfrdetail
  • /riskmodeler/v1/locations/{id}/locationtodetail
  • /riskmodeler/v1/locations/{id}/locationtrdetail
  • /riskmodeler/v1/locations/{id}/locationwcdetail
  • /riskmodeler/v1/locations/{id}/locationcondition
  • /riskmodeler/v1/locations/{id}/cession
Policy
  • /riskmodeler/v1/policies
  • /riskmodeler/v1/policies/{id}/coverage
  • /riskmodeler/v1/policies/{id}/cession
  • /riskmodeler/v1/polices/{id}/policycondition
Portfolio
  • /riskmodeler/v1/portfolios
  • /riskmodeler/v2/portfolios/{id}/geohaz
Producer
  • /riskmodeler/v1/producers
Step Policy
  • /riskmodeler/v1/steppolicies
Treaty
  • /riskmodeler/v1/treaties
  • /riskmodeler/v1/treaties/{id}/lob
  • /riskmodeler/v1/treaties/{id}/lossoccurrences
  • /riskmodeler/v1/treaties/{id}/convert-currency
Underwriter
  • /riskmodeler/v1/underwriters
Utilites
  • /riskmodeler/v1/globaledit
Uploads
  • /riskmodeler/v1/uploads/{uploadId}/edm
  • /riskmodeler/v1/uploads/{uploadId}/rdm

Did this page help you?