Quick Start

Get up and running in minutes using the Location Intelligence API

Overview

Moody's RMS APIs enable authenticated clients to securely connect to Intelligent Risk Platform and perform risk modeling and data management tasks.

Intelligent Risk Platform is a cloud-based platform for advanced modeling and risk analysis tasks. Licensed Risk Modeler, Data Bridge, Location Intelligence tenants may access and use RMS APIs.

Step 1: Obtain host name and API key

Intelligent Risk Platform manages the authentication and authorization of clients by means of API keys. An API key is a token that uniquely identifies a client application. The client must pass a valid API key to the Intelligent Risk Platform whenever it makes a request. To learn more, see Authentication and Authorization.

During onboarding, your tenant administrator will provide you with a host name and an API key:

  • The host name identifies the data center hosting your company's Risk Modeler, Data Bridge, or Location Intelligence application instance. One of api-euw1.rms.com or api-use1.rms.com.
  • The API key is a token that enables Intelligent Risk Platform to authenticate requests.

If you do not know have an API key or do not know the name of your host environment, contact your tenant administrator.

Step 2: Understand RMS API operation endpoints

An operation a callable unit of a RESTful API that consists of an HTTP method (e.g. GET, POST, DELETE) and a URL that consists of a scheme, host, and a path that identifies the resource.

800

Location Intelligence API resource

The host identifies the data center that hosts your company's tenant instance: api-euw1.rms.com or api-use1.rms.com. The host is sometimes referred to as the {host} variable in Postman collections and some code samples. Whenever you see the {host} variable in an example, you must substitute the correct host name.

In Location Intelligence, the path consists of an app path, layer path, and version path.

  • The app path identifies the RMS application. For example, /li for Location Intelligence.
  • The layer path identifies the layer, which corresponds to a Location Intelligence data product. For example, au_eq_risk_score.
  • The version path identifies the version of the data product. For example, 18.1. To learn more about Location Intelligence versioning, see Versioning Policy.

Step 3: Make a test API request

You can now confirm that the API key is working by making a request to Intelligent Risk Platform.

All Location Intelligence risk lookup resources require that you specify the layer and version as path paremeters, and a location object parameter in the request body. Depending on the geographic location of the location, you may lookup risk data using different versions of the appropriate data product.

For example, if you want to assess the risk of earthquakes for a location exposure in the United States, you could use the US Earthquake Faults Latest resource. By specifying latest in the version path parameter, you can ensure that you use the most recent version of the US Earthquake Faults data product. Alternatively, you could specify a particular version in the endpoint path.

curl --request POST \
     --url https://{host}/li/us_distance_to_fault/latest \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'Authorization: XXXXXXXXXXX'

All risk lookup requests require that you define location object parameters in the request body. Different parameters may be required depending on the resource..

{
  "location": {
    "address": {
      "countryScheme": "ISO2A",
      "admin1Code": "CA",
      "rmsGeoModelResolutionCode": 2,
      "countryRmsCode": "US",
      "longitude": -122.06061,
      "latitude": 37.5412,
      "countryCode": "US"
    }
  },
  "layerOptions": {
    "distanceUnit": "miles"
  }
}

A successful request returns earthquake risk information for the specified location:

{
  "faults": [
    {
      "name": "NM NMSZ USGS West Full",
      "distance": 3.61,
      "returnPeriodM60": 27013,
      "returnPeriodM65": 108050,
      "returnPeriodM70": 120056
    }
  ],
  "backgroundRates": [
    310,
    720,
    950,
    1085,
    2120,
    4340,
    3500,
    7690,
    11605
  ],
  "distanceUnit": "miles",
  "warnings": [
    {
      "code": "FLG_XXXX",
      "message": "Warning message"
    }
  ]
}