Creates, updates, or deletes multiple exposures (portfolios, accounts, locations, policies, or treaties) in the specified EDM.
The required exposureId
identifies the EDM that contains the exposures. Newly created exposures are added to the EDM. Existing exposure are updated or deleted from the EDM.
Request body
The request body defines an object that consists of up to five arrays: a portfolios
array, accounts
array, locations
array, policies
, and treaties
array. Each array defines one or more operations that creates, edits, or deletes an exposure.
{
"portfolios:" [
{
"portfolioId": 0,
"portfolioName": "Port01",
"portfolioNumber": "Port_ExpBatch_1_Num",
"description": "Test_Location_Batch",
"createDate": "2022-05-24T23:47:58.076Z",
"stampDate": "",
"operationType": "INSERT",
"label": "Port_LocationBatch_01_Label",
"accounts": [
{
"accountId": 23,
"label": "Acct_LocationBatch_01_Label",
"policies": [...],
"locations": [...],
},
{...}
],
}
],
"accounts": [...],
"locations": [...],
"policies": [...],
"treaties": [...]
}
Each array defines one or more objects that specify the exposure to be created, edited, or deleted depending on the operationType
specified. Required parameters depend on the operation type. One of INSERT
, UPDATE
, or DELETE
. By default, INSERT
.
Where parent-child relationships exist between exposures (e.g. between a portfolio and its accounts, or accounts and locations), child exposures may be nested within the parent exposure.
Parameter | Type | Description |
---|---|---|
portfolios | Array | Array of objects that create, update, or delete a portfolio and child accounts. |
accounts | Array | Array of objects that create, update, or delete an account and child locations and policies. |
locations | Array | Array of objects that create, update, or delete a location. |
policies | Array | Array of objects that create, update, or delete a policy. |
treaties | Array | Array of objects that create, update, or delete a treaty. |
This operation supports the processing of large number of exposures in a single request. Consequently, the size of the request package may be quite large.
Warning
Ensure that the request package is no larger than 5MB in size.
Request packages that define up to 1000 exposures may be submitted in JSON format:Content-Type: application/json
.
User-defined workflows
This operation can be specified as a task in a user-defined workflow and processed as part of BATCH
job.
Every object in a request can be defined by both an operationType
(INSERT
, UPDATE
, DELETE
) and a label
that uniquely identifies the operation so that the operation or the product of an operation (e.g. a newly created exposure) can be referenced in user-defined workflows.
A user-defined workflow is a workflow that consists of a series of tasks that are processed in the specified order. For example, a batch job can define a workflow that performs the following: 1) create multiple new account exposures in bulk; 2) generate an exposure summary report for those accounts, 3) geocode those accounts, 4) export location exposure data for those accounts. To learn, more see Create Batch Job
Response body
On success, this operation returns a 202 Accepted
response and adds a BULK_EDIT
job to the workflow engine queue. The Location
response header specifies the job ID as part of a URL that you can use to track the status of the job.
Once the BULK_EDIT
job is complete and its status is set to FINISHED
, the Get Risk Data Job response returns information about the exposures updated in the EDM. The response objects differs depending on the size of the response:
- If fewer than 10,000 characters are returned, all exposure data is returned, e.g. portfolios, accounts, locations, policies, and treaties.
- If more than 10,000 characters are returned, the ID numbers of the account and portfolio exposures are returned. The remaining exposure data can be downloaded from the specified
downloadLink
. - If more than 100,000 characters of account and portfolio data are returned, no exposures are returned in the response. All exposure data can be downloaded from the specified
downloadLink
.
In the following example, the response object consists (more than 10,000 character, but fewer than 100,000 characters)
{
"userName": "[email protected]",
"status": "FINISHED",
"name": "ExBatchEdit",
"type": "EXPOSURE_BATCH_EDIT",
"progress": 100,
"priority": "medium",
"entitlement": "RI-RISKMODELER",
"resourceGroupId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"jobs": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"taskId": 1,
"status": "Succeeded",
"name": "EXPOSURE_BATCH_EDIT",
"percentComplete": 100,
"continueOnFailure": false
}
],
"summary": {
"Treaties": "Inserted: 0, Updated: 0, Deleted: 0",
"Policies": "Inserted: 100, Updated: 0, Deleted: 0",
"databaseName": "xxxxxxxxxxxxxxxxxxxxxxx",
"InputType": "Plain JSON",
"stepPolicies": "Inserted: 0, Updated: 0, Deleted: 0",
"Locations": "Inserted: 1000, Updated: 0, Deleted: 0",
"Portfolios": "Inserted: 10, Updated: 0, Deleted: 0",
"Accounts": "Inserted: 100, Updated: 0, Deleted: 0"
},
"output": {
"downloadLink": "https://rms-tenants-xxx-xxx.amazonaws.com/xxx/import/EXPOSURE_BATCH_EDIT/outputs/xxx",
"stepPolicies": [],
"treaties": [],
"portfolios": [
{
"number": "CreatedPortfolio",
"name": "CreatedPortfolio",
"label": "port1",
"id": 502,
"accounts": [
{
"number": "CreatedAccount",
"id": 3363
},
{...},
{...}
]
},
{...},
{...}
],
"policies": [],
"locations": [],
"accounts": [],
"referDownloadLink": true
},
"messages": []
}