Risk Modeler, May 2022

Changes implemented in the Risk Modeler Account, Aggregate Portfolio, and Export APIs.

Account APIs

Policy expiration

The Get accounts service (GET /[v1][v2]/accounts) now supports an optional policyExpirationDays query parameter that accepts an integer. The integer value filters accounts by the number of days until policy expiration. Defaults to 120. To learn more about query parameters, see Query Exposure Data.

Analyses filters

The Get analyses by account service (GET /v2/accounts/{id}/analyses) now supports filtering results by userName and runDate. The client may specify query parameters using the userName and runDate attributes. For example, /v2/accounts/4/analyses?datasource=my_EDM&q=username = "[email protected]". To learn more about query parameters, see Query Exposure Data.

Exposure summary report

The Generate summary report by account service (POST /[v1][v2]/accounts/{id}/summary_report?datasource={datasource}) returns an exposure summary report.

The report takes no parameters and returns a 202 Accepted response in the Location header that includes a URI for tracking the statues of the workflow: [host]/[v1][v2]/workflows/[ID]. The report returns an account-level summary report:

{
    "reportName": "report-name",
    "perilList": ["eq"],
    "customBands": [
        {
            "hazard": "Distance2Coast",
            "bands": [
                { "greaterThanOrEqualTo": 0, "lessThan": 10},
                { "greaterThanOrEqualTo": 10, "lessThan": 20},
                { "greaterThanOrEqualTo": 25.0, "lessThan": 100.0},                
                { "greaterThanOrEqualTo": 50.0}
            ]
        }
    ]
}

Aggregate Portfolio APIs

The Get analyses by aggregate portfolio service (/v2/aggregate-portfolio/{id}/analyses) now supports filtering results by userName and runDate. The client may specify query parameters using the userName and runDate attributes. For example, /v2/aggregate-portfolio/{id}/analyses?datasource=my_EDM&q=username = "[email protected]". To learn more about query parameters, see Query Exposure Data.

Export APIs

The Export data module to file service (POST /v2/exports) now supports three options for exporting EDM data modules. The ExposureExportInput job type enables the client to export exposure data to an EDM. Previously, the service supported exporting exposure data to a temporary EDM and exporting exposures to an existing EDM. The service now also enables the client to export exposures to a new managed database.

  • If the value of the createNew attribute is true and the value of the destinationDatasource is null or undefined, the EDM2EDM workflow exports exposure data to a temporary database that is deleted at the end of the workflow job.
  • If the value of the createNew attribute is false and value of the destinationDatasource specifies an existing datasource, the EDM2EDM workflow exports exposure data to an existing managed database.
  • If the value of the createNew attribute is true and value of the destinationDatasource specifies a unique name for the datasource, the EDM2EDM workflow creates a new database.

Exposure data exported to a new or existing managed datasource may be downloaded if the value of the download attribute is true.

{
    "type": "ExposureExportInput",
    "exportType": "EDM",
    "sourceDatasource": "test_edm2edm_changes",
    "destinationDatasource": "test_local_pr_edm_export",
    "exposureType": "PORTFOLIO",
    "exposureIds": [
        1
    ],
    "download": false,
    "createnew": true,
    "exportOptions": {
        "exportAccounts": true,
        "exportLocations": true,
        "exportPolicies": true,
        "exportTreaties": true,
        "exportReinsuranceInfo": true,
        "exportPerilDetailsInfo": true
    },
    "exportFormat": "BAK",
    "sqlVersion": "2019"
}

The service returns a 202 Accepted response in the Location header that includes a URI for tracking the statues of the workflow: [host]/[v1][v2]/workflows/[ID].

Metrics APIs

The Get analyses service (GET /v2/analyses) now supports filtering results by userName and runDate. The client may specify query parameters using the userName and runDate attributes. For example, /v2/analyses?datasource=my_EDM&q=username = "[email protected]". To learn more about query parameters, see Query Exposure Data.

Portfolio APIs

The Get analyses by portfolio service (GET /v2/portfolio/{id}/analyses) now supports filtering results by userName and runDate. The client may specify query parameters using the userName and runDate attributes. For example, /v2/portfolio/4/analyses?datasource=my_EDM&q=username = "[email protected]". To learn more about query parameters, see Query Exposure Data.

Workflow APIs

The Get workflow or operation service (GET v1/workflows/{id}) returns information about workflow or operation submitted workflow engine.

If the request includes both a requestId (operation) and a parent workflowId (e.g. GET /v1/workflows/2f9b260a-b81f-4bd7-bf09-f0e066019812?parent=7608139), the service now immediately returns a response regardless whether the specified operation is complete. Formerly, the service returned 204 No Content response if no information was available about an operation.

If an operation is incomplete, the service returns the information available in the parent workflow job:

{
    "status": "QUEUED",
    "name": "Dlm3",
    "jobs": [],
    "summary": {},
    "progress": 0,
    "messages": []
}

The Process user-defined workflow service (POST /v1/workflows/) enables clients to define and initiate a user-defined batch workflows consisting of multiple sequenced operations.

The user-defined workflow manages the both the sequencing of operations and the reporting of the status of operations and the workflow itself. All operations are defined in the operations array of the request.

Formerly, the attribute accepted one of three values: geohaz, group, and process. The operation attribute now also accepts values that identify the endpoints of selected services. For example, the following request defines a workflow that consists of an operation that analyzes a specific portfolio:

{
    "name": "My custom workflow",
    "type": "PortfolioWorkflow",   
    "operations": [
        {
            "operation": "/v2/portfolios/61/process",
            "label": "Dlm1",
            "input": {
                "id": 61,
                "exposureType": "PORTFOLIO",
                "edm": "{{edm_name}}",
                "currency": {
                    "code": "USD",
                    "scheme": "RMS",
                    "vintage": "RL18",
                    "asOfDate": "2020-03-01"
                },
                "modelProfileId": 140,
                "outputProfileId": 17,
                "eventRateSchemeId": 168,
                "treaties": [],
                "treatiesName": []
            },
            "dependsOn": [
            ],
            "continueOnFailure": true
        }
    ]
}

The following endpoints are supported:

  • /v1/accounts/{id}/geohaz
  • /v2/accounts/{id}/geohaz
  • /v1/portfolios/{id}/geohaz
  • /v2/portfolios/{id}/geohaz
  • /v2/portfolios/{id}/process
  • /v1/portfolios/{id}/process
  • /v1/accounts/{id}/process
  • /v2/accounts/{id}/process
  • /v1/analysis-groups
  • /v2/analysis-groups