Bulk edit resources

Updates the selected exposure resources.

The request body selects and updates accounts, locations, or policies in bulk based on criteria specified in the body of the request.

Filters can be defined in two different modes: basic and advanced.

  • In Basic mode, the request uses distinct parameters to identify target resources (editType), specify filter conditions (editQuery), and define changes to target resource properties (updates).
  • In Advanced mode, the request specifies resource target updates as a query statement in the editQuery parameter and uses SQL keywords to identify the target resources (EDIT), filter conditions (WHERE), and property changes (SET) in that query statement.

The exposureResourceId, exposureResourceType, and editQuery parameters are required. The editType and updates parameters are required if the request uses Basic mode.

Basic

In Basic mode, the exposureResourceId, exposureResourceType, editType, updates, and editQuery parameters are required.

The editType parameter identifies the type of the resources to update (account, location, or policy). The editType parameter defines a WHICH condition that selects a subset of the target resources and the updates defines a SET statement that defines a list of the changes to make.

{
  "exposureResourceId": 12345,
  "exposureResourceType": "ACCOUNT",
  "editType": "policy",
  "editQuery": "status LIKE \"*EXP*\"",
  "updates": [
    "status = \"BOOK\"",
    "inceptionDate = 2023-06-30",
    "expirationDate = 2024-10-30",
    "blanketPremium *= 2"
  ]
}

Note that the editQuery and updates parameters identify resource properties by their EDM Database Schema field names (e.g. number) and not the Risk Data API property name (e.g. policyNumber ). Field value strings must be escaped with \". Enumeration values, dates, and numbers are not escaped.

The editQuery and updates parameters support comparison (=, !=, <, >, <=, >=), string matching (LIKE, NOT LIKE), list (IN, NOT IN), logical (AND, OR), and assignment operators. Certain field-level restrictions apply to account, location, and policy changes. To learn more, see Supported Field Names in Support Center.

Advanced:

In Advanced mode, the editQuery parameter defines a SQL statement that both selects the target resources and defines the changes to be made. The edityQuery and updates parameters are omitted.

The editQuery parameter makes use of SQL keywords (EDIT, SET and WHERE) to identify the exposure resource to update (account, location, or policy) and the changes to be made:

{
  "exposureResourceId": 12345,
  "exposureResourceType": "ACCOUNT",
  "editQuery": "EDIT policy\nSET status = \"BOOK\", inceptionDate = 2023-06-30, expirationDate = 2024-10-30, blanketPremium *= 2\nWHERE status LIKE \"*EXP*\""
}

In advanced mode, the editQuery parameter supports comparison (=, !=, <, >, <=, >=), string matching (LIKE, NOT LIKE), list (IN, NOT IN), logical (AND, OR), and assignment operators. Certain field-level restrictions apply to account, location, and policy changes. To learn more, see Supported Field Names in Support Center.

📷

Note

Moodyʼs recommends performing a test edit on a duplicate dataset, then confirming the results are as intended. Before applying a bulk edit to a large number of records. To learn more, see Bulk Edit Resources Dry Run.

Headers
uuid
required
Defaults to xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

ID of resource group. To learn more, see Resource Groups

Path Params
int64
required
≥ 1

ID of EDM.

Body Params
string
enum
required

Type of parent exposure resource.

The parent resource defines the scope of edited resources.

Allowed:
int32
required
≥ 1

ID of parent exposure resource.

This operation updates the children of the specified account or portfolio.

string
enum

Type of child exposure resource to update.

Used in Basic mode only. One of account, location, or policy.

Allowed:
updates
array of strings

List of updates to the selected account, location, or policy resources.

Used in Basic mode only.

Exposure resource properties are identified by EDM schema field names. Certain field-level resrictions apply to account, location, and policy changes. See Supported Field Names in Support Center.

updates
string

Query to update exposure resources (accounts, locations, or policies).

  • In Basic mode, defines a filter that selects exposure resources to update.
  • In Advanced mode, defines a SQL statement using SQL keywords (EDIT, SET, WHERE) that selects exposure resources to edit and the changes made. The editType and updates are ignored.

Exposure resource properties are identified by EDM schema field names. Certain field-level resrictions apply to account, location, and policy changes. See Supported Field Names in Support Center.

string

Optional SQL Server OUTPUT clause appended to the generated UPDATE statement between the SET assignments and the WHERE condition.

Responses

BULK_EDIT job to queue and returns job URL with jobId in the Location header. Poll job URL for status.

Language
Credentials
URL
LoadingLoading…
Response
Choose an example:
*/*
application/json