{"openapi":"3.0.1","info":{"title":"Batch API","version":"2024.11.d"},"servers":[{"url":"https://{host}/platform/batch/v1/","variables":{"host":{"enum":["api-euw1.rms.com","api-use1.rms.com"],"default":"api-euw1.rms.com","description":"Data center that hosts the tenant instance: api-euw1.rms.com or api-use1.rms.com"}}}],"security":[{"rms_api_key":[]},{"rms_bearer_token":[]}],"x-readme":{"explorer-enabled":false,"parameter-ordering":["header","path","query","body","form","cookie"],"samples-languages":["json","curl","python","java","csharp","node"],"proxy-enabled":true,"samples-enabled":true},"paths":{"/jobs/":{"post":{"tags":["Batch Jobs"],"summary":"Create batch job","operationId":"createBatchJob","parameters":[{"name":"x-rms-resource-group-id","description":"ID of <<glossary:resource group>>. Operation is assigned to this resource group's quota. See [Resource Groups](doc:resource-management)","in":"header","required":true,"schema":{"type":"string","default":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of batch job.","example":"batchWorkflow1"},"settings":{"type":"object","description":"Workflow optimization settings.","properties":{"disable-underwriter-reports":{"type":"boolean","default":false,"description":"If `true`, UnderwriteIQ reports are not generated automatically."},"combine-batch-edit-and-geohaz":{"type":"boolean","default":false,"description":"If `true`, consecutive `bulk-edit` and `geohaz` tasks are combined and processed as a single job, which can greatly reduce runtime."}}},"tasks":{"description":"List of tasks in the workflow.","type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Unique ID of task within the workflow.\n\nEnables sequencing of tasks within workflow and referencing of task outputs using task path variables. Must be unique within request.","example":"someLabel"},"operationUri":{"type":"string","format":"uri","example":"/platform/model/v1/jobs","description":"Resource URI that identifies operation performed by this task. \n\nSupported resource URIs:\n\n- `/platform/export/v1/jobs`\n- `/platform/geohaz/v1/jobs`\n- `/platform/grouping/v1/jobs`\n- `/platform/model/v1/jobs`\n- `/platform/riskdata/v1/analyses/{analysisId}/convert-event-rate-loss`\n- `/platform/riskdata/v1/analyses/{analysisId}/marginal-impact`\n- `/platform/riskdata/v1/analyses/{analysisId}/pate`\n- `/platform/riskdata/v1/reports`\n- `/platform/riskdata/v1/v1/exposures/{exposureId}/bulk-edit`"},"requestBody":{"type":"object","description":"Request body of `operationUri`. Supported parameters depend on the operation performed as identicated by the `operationUri`. For details, see documentation for the corresponding operation."},"dependsOn":{"type":"array","description":"List of tasks to be completed before this task. Tasks are identified by `label`.","items":{"type":"string"}},"continueOnFailure":{"type":"boolean","default":false,"description":"If `true`, workflow continues if this task fails."},"skipMissingVariables":{"type":"boolean","default":false,"description":"If `true`, task is processed if task path variable is missing. A task path variable is a JSON query string that enables a task to retrieve data from the output of a previous task in the workflow."}}}}}}}}},"responses":{"201":{"description":"Created","headers":{"Location":{"description":"URI of batch job, e.g. `/platform/batch/v1/jobs/{jobId}`. Use this endpoint to poll the status of this batch job. See [Get Batch Job](ref:getbatchjob).","schema":{"type":"string","format":"uri"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"get":{"tags":["Batch Jobs"],"summary":"Search batch jobs","operationId":"searchBatchJobs","parameters":[{"name":"filter","in":"query","description":"<<glossary:Query string>> to select response data based on property values. Supported properties: `endedAt`, `jobId`, `name`, `startedAt`, `status`, `type`, `userName` Depending on the property, you may use comparison operators, list operators, and logical operators.\n\n| Property| Data Type| Comparison| List| \n| :------ | :-------| :---------- | :--- | \n| `endedAt` | `YYY-MM-DD` | `=` | |\n| `jobId` | `string` | `=` | `IN` |\n| `name` | `string` | `=` |  |\n| `startedAt` | `YYY-MM-DD` | `=` | |\n| `status` | `string` | `=` |  |\n| `type` | `string` | `=` |  |\n| `userName` | `string` | `=` |  |\n            \nSee [Filtering Responses](doc:response-filtering).","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Comma-delimited list of properties. Sort order defined by one of `ASC` (ascending) or `DESC` (descending).\n\nSupported properties: `endedAt`, `jobId`, `name`, `startedAt`, `status`, `type`","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of records to display per page.","schema":{"type":"integer","format":"int32"}},{"name":"offSet","in":"query","description":"Number of the page displaying the returned records, starting at _0_.","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSearchResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}},"/jobs/{jobId}":{"get":{"tags":["Batch Jobs"],"summary":"Get batch job","operationId":"getBatchJob","parameters":[{"$ref":"#/components/parameters/JobIdParam"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"patch":{"tags":["Batch Jobs"],"summary":"Update batch job","operationId":"updateBatchJob","parameters":[{"$ref":"#/components/parameters/JobIdParam"}],"requestBody":{"description":"Operations to perform on batch job","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of job.","enum":["canceled","queued"]},"priority":{"type":"string","description":"Priority of this job","enum":["high","low","medium"]}}}}}},"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}},"/jobs/{jobId}/tasks/{taskId}":{"get":{"tags":["Batch Job Tasks"],"summary":"Get batch job task","operationId":"getBatchJobTask","parameters":[{"$ref":"#/components/parameters/JobIdParam"},{"$ref":"#/components/parameters/TaskIdParam"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchJobTask"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}},"components":{"parameters":{"JobIdParam":{"name":"jobId","in":"path","description":"ID of batch job.","schema":{"type":"string"},"required":true},"TaskIdParam":{"name":"taskId","in":"path","description":"ID of batch task.","schema":{"type":"string"},"required":true}},"schemas":{"Task":{"type":"object","properties":{"taskId":{"type":"string","description":"ID of task.","format":"int32"},"guid":{"type":"string","description":"Unique ID of task.","format":"uuid"},"jobId":{"type":"string","description":"ID of batch job.","format":"int64","example":67},"status":{"type":"string","description":"Status of batch task."},"submittedAt":{"type":"string","description":"Date task was submitted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`"},"createdAt":{"type":"string","description":"Date task was created in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`"},"name":{"type":"string","description":"Name of task."},"percentComplete":{"type":"integer","format":"int32","description":"Percent of task completed."},"priorTaskGuids":{"type":"array","description":"List of tasks to perform prior to this task.","items":{"type":"string","format":"uuid"}},"output":{"type":"object"}}},"SubTask":{"type":"object","properties":{"subTaskId":{"type":"string","description":"ID of task.","format":"int32"},"guid":{"type":"string","description":"Unique ID of task.","format":"uuid"},"jobId":{"type":"string","description":"ID of batch job.","format":"int64","example":67},"status":{"type":"string","description":"Status of batch task."},"submittedAt":{"type":"string","description":"Date task was submitted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`"},"createdAt":{"type":"string","description":"Date task was created in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`"},"name":{"type":"string","description":"Name of task."},"percentComplete":{"type":"integer","format":"int32","description":"Percent of task completed."},"priorTaskGuids":{"type":"array","description":"List of tasks to perform prior to this task.","items":{"type":"string","format":"uuid"}},"output":{"type":"object"}}},"JobSummary":{"type":"object","properties":{"jobId":{"type":"string","format":"int64","description":"ID of batch job.","example":54},"priority":{"type":"string","description":"Priority of batch job.","example":"medium","enum":["verylow","low","medium","high","veryhigh"]},"userName":{"type":"string","format":"email","description":"Login of <<glossary:principal>> that submitted job, e.g. `user.name@company.com` or `SSO_user.name@company` for <<glossary:federated tenant>>s. Login strings are lowercase. See [Logins](principals).","example":"user.name@company.com"},"status":{"type":"string","description":"Status of batch job.","example":"RUNNING","enum":["QUEUED","RUNNING","FINISHED","FAILED","CANCELLED","PENDING","CANCELLING","CANCEL_REQUESTED"]},"submittedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Date batch job was submitted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`"},"startedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Date batch job started in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`"},"endedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Date batch job ended in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`"},"name":{"type":"string","description":"Name of batch job.","example":"july-data"},"type":{"type":"string","description":"Type of batch job.","example":"DOWNLOAD_RESULTS"},"progress":{"type":"integer","format":"int32","description":"Percentage of batch job completed.","example":65},"resourceGroupId":{"type":"string","format":"uuid","description":"ID of resource group that submitted batch job."},"entitlement":{"type":"string","description":"Licensed Intelligent Risk Platform program. One of `RI-EXPOSUREIQ`, `RI-RISKMODELER`, `RI-TREATYIQ`, `UNDERWRITEIQ`","example":"RI-RISKMODELER"},"details":{"type":"object","description":"Detailed information about job and child tasks.","properties":{"resources":{"type":"array","description":"List of <<glossary:resource URI>>s.","items":{"type":"object","properties":{"uri":{"type":"string","format":"uri"}}}},"summary":{"type":"string"}}}}},"Job":{"type":"object","allOf":[{"$ref":"#/components/schemas/JobSummary"},{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}}}}]},"JobSearchResult":{"type":"array","items":{"$ref":"#/components/schemas/JobSummary"}},"PatchOperation":{"type":"string","enum":["update"]},"BatchJobTask":{"allOf":[{"$ref":"#/components/schemas/Task"},{"type":"object","properties":{"subTasks":{"type":"array","items":{"$ref":"#/components/schemas/SubTask"}}}}]},"ErrorMessage":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"logId":{"type":"string"}}}},"securitySchemes":{"rms_bearer_token":{"type":"http","description":"RMS tenant specific bearer token to make authorized requests with temporary life span","scheme":"bearer","bearerFormat":"JWT"},"rms_api_key":{"type":"apiKey","name":"Authorization","description":"RMS tenant specific api key to make authorized requests","in":"header"}}}}