{"openapi":"3.0.2","info":{"title":"Copy API","version":"2024.02.b"},"servers":[{"url":"https://{host}/platform/copy/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"}}}],"x-readme":{"explorer-enabled":false,"parameter-ordering":["header","path","query","body","form","cookie"],"samples-languages":["curl","java","csharp","node","python"],"proxy-enabled":true,"samples-enabled":true},"security":[{"rms_api_key":[]},{"rms_bearer_token":[]}],"paths":{"/jobs":{"post":{"tags":["Copy Jobs"],"summary":"Create copy job","operationId":"createCopyJob","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":{"oneOf":[{"$ref":"#/components/schemas/ExposureResourceCopyRequest"},{"$ref":"#/components/schemas/ExposureCopyRequest"}],"discriminator":{"propertyName":"resourceType","mapping":{"PORTFOLIO":"#/components/schemas/ExposureResourceCopyRequest","ACCOUNT":"#/components/schemas/ExposureResourceCopyRequest","AGGREGATEPORTFOLIO":"#/components/schemas/ExposureResourceCopyRequest","EXPOSURE":"#/components/schemas/ExposureCopyRequest"}}}}}},"responses":{"201":{"description":"Copy job created and accepted","headers":{"Location":{"description":"location of the job with jobId","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":["Copy Jobs"],"summary":"Search copy jobs","operationId":"SearchCopyJobs","parameters":[{"name":"filter","in":"query","description":"<<glossary:Query string>> to select response data based on property values.\n\nSupported properties: `jobId`, `endedAt`, `name`, `startedAt`, `status`, `type`, `userName`\n\n`JobId` supports the `=` and `IN` operators. All other properties support the `=` operator only. See [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: `jobId`, `endedAt`, `name`, `startedAt`, `status`, `type`","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of retrieved records to display on the 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":["Copy Jobs"],"summary":"Get copy job","operationId":"getCopyJob","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":["Copy Jobs"],"summary":"Update copy job","operationId":"updateCopyJob","parameters":[{"$ref":"#/components/parameters/JobIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of job.","enum":["CANCELED"]},"priority":{"type":"string","description":"Priority of job.","enum":["HIGH","MEDIUM","LOW","VERYHIGH","VERYLOW"]}}}}}},"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"}}}}}}}},"components":{"parameters":{"JobIdParam":{"name":"jobId","in":"path","description":"ID of job.","schema":{"type":"string"},"required":true}},"schemas":{"ExposureCopyRequest":{"required":["resourceType","resourceUri","settings"],"type":"object","properties":{"resourceUri":{"type":"string","description":"Resource URI of exposure resource to copy. See [Resource URIs](resource-uris).\n\nMust match specified `resourceType`.","format":"uri","example":"/platform/riskdata/v1/exposures/10171"},"resourceType":{"type":"string","description":"Type of exposure resource to copy.\n\nMust match specified `resourceUri`.","enum":["EXPOSURE"]},"settings":{"description":"Settings for copy job. Identifies exposure resources to copy and the EDM to which these exposure resources are copied. \n\nExposure resources can be copied to an existing EDM (`destinationExposureId`) or new EDM (`newExposureName`).","$ref":"#/components/schemas/ExposureCopySettings"}}},"ExposureResourceCopyRequest":{"required":["resourceType","resourceUri","settings"],"type":"object","properties":{"resourceUri":{"type":"string","description":"URI of resource to copy.","format":"uri"},"resourceType":{"type":"string","description":"Type of resource to copy.","enum":["ACCOUNT","AGGREGATEPORTFOLIO","PORTFOLIO"]},"settings":{"$ref":"#/components/schemas/ExposureResourceCopySettings"}}},"ExposureCopySettings":{"required":["filters"],"type":"object","allOf":[{"type":"object","properties":{"destinationExposureId":{"description":"ID of existing EDM. Copies are added to this EDM.\n\nOne of `destinationExposureId` or `newExposureName` must be specified, but not both.","type":"integer","format":"int64"},"newExposureName":{"description":"Name of new EDM. Copies are added to this EDM.\n\nOne of `destinationExposureId` or `newExposureName` must be specified, but not both.","maxLength":80,"minLength":0,"pattern":"^\\w((?!--)[\\w\\s-])*\\w$|^\\w$","type":"string"},"exposureSetId":{"description":"ID of <<glossary:exposure set>>.","type":"integer","format":"int64"},"filters":{"description":"Identifies exposure resources to copy by type (`exposureResourceType`) and ID (`exposureResourceIds`).","$ref":"#/components/schemas/ExportFilters"}}}]},"ExposureResourceCopySettings":{"required":["name","number"],"type":"object","allOf":[{"type":"object","properties":{"name":{"description":"Name of copy. Copied exposure does not preserve name of original exposure.","maxLength":40,"minLength":0,"type":"string"},"number":{"description":"ID of copy. Copied exposure does not preserve ID of original exposure.","maxLength":20,"minLength":0,"type":"string"},"description":{"description":"Description of copy.","type":"string"},"preserveLink":{"type":"boolean","description":"If `true`, the copy is linked to the original exposure."}}}]},"ExportFilters":{"required":["exposureResourceType"],"type":"object","properties":{"exposureResourceType":{"type":"string","description":"Type of exposure resources to copy.","enum":["ACCOUNTS","AGGREGATEPORTFOLIOS","PORTFOLIOS"]},"exposureResourceIds":{"type":"array","description":"List of exposures to copy identified by ID number, e.g. `[256, 259, 263]`","items":{"type":"integer","format":"int32","example":256}}}},"RiskdataResource":{"type":"string","format":"uri"},"JobSearchResult":{"type":"array","items":{"$ref":"#/components/schemas/JobSummary"}},"Task":{"type":"object","properties":{"taskId":{"type":"string","format":"int32","description":"ID of task."},"guid":{"type":"string","format":"uuid","description":"Unique ID of task."},"jobId":{"type":"string","format":"int64","description":"ID of <<glossary:batch job>>."},"status":{"type":"string","description":"Status of task. One of `PENDING`, `QUEUED`, `RUNNING`, `FINISHED`, `FAILED`, `CANCEL_REQUESTED`, `CANCELLING`, `CANCELLED`."},"submittedAt":{"type":"string","description":"Time job 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":"Time job 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","description":"Percent of job completion.","format":"int32"},"priorTaskGuids":{"type":"array","description":"List of tasks in batch job.","items":{"type":"string","format":"uuid"}},"output":{"type":"object","description":"List of error messages and logs.","properties":{"summary":{"type":"string"},"errors":{"type":"array","description":"List of error messages.","items":{"type":"object","properties":{"message":{"type":"string"}}}},"log":{"type":"object","description":"Log of tasks processing."}}}}},"JobSummary":{"type":"object","properties":{"jobId":{"type":"string","format":"int64","description":"ID of job."},"priority":{"type":"string","description":"Priority of job.","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 job.","enum":["QUEUED","RUNNING","FINISHED","FAILED","CANCELLED","PENDING","CANCELLING","CANCEL_REQUESTED"]},"submittedAt":{"type":"string","description":"Time 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","description":"Time job was started in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, e.g. `2020-01-01T00:00:00.000Z`."},"endedAt":{"type":"string","description":"Time job was completed 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 job."},"type":{"type":"string","description":"Type of job. See [Platform Jobs](doc: platform-jobs)."},"progress":{"type":"integer","description":"Percent of job completion.","format":"int32"},"resourceGroupId":{"type":"string","format":"uuid","description":"ID of <<glossary:resource group>> that submitted job. See [Resource Groups](doc:resource-management)."},"entitlement":{"type":"string","description":"Licensed Intelligent Risk Platform program. One of `RI-EXPOSUREIQ`, `RI-RISKMODELER`, `RI-TREATYIQ`, `RI-UNDERWRITEIQ`."},"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","description":"List of tasks.","items":{"$ref":"#/components/schemas/Task"}}}}]},"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"}}}}