{"openapi":"3.0.2","info":{"title":"Currency Conversion API","version":"2024.02.b"},"servers":[{"url":"https://{host}/platform/currencyconversion/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":["Currency Conversion Jobs"],"summary":"Create currency conversion job","operationId":"createcurrencyconversionjob","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":{"$ref":"#/components/schemas/CurrencyConversionRequest"}}}},"responses":{"201":{"description":"Created.\n\nA currency conversion job has been added to the job queue for processing. Job type depends on the resource type specified in the request. One of `CONVERT_ACCOUNT_CURRENCY`, `CONVERT_AGGREGATE_PORTFOLIO_CURRENCY`, `CONVERT_PORTFOLIO_CURRENCY`, `CONVERT_RESULT_CURRENCY`, `CONVERT_TREATY_CURRENCY`.","headers":{"Location":{"description":"URI of currency conversion job, e.g. `https://{host}/platform/currencyconversion/v1/jobs/{jobid}`. Use this endpoint to <<glossary:poll>> the status of the job. See [Get Currency Conversion Job](ref:getcurrencyconversionjob).","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":["Currency Conversion Jobs"],"summary":"Search currency conversion jobs","operationId":"searchcurrencyconversionjobs","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|Property|Data Type|Comparison|List|\n|:--------|:--------|:--------|:--------|\n|`jobId`|`string`|`=`  |`IN`|\n|`endedAt`|`YYYY-MM-DD`|`=` ||\n|`name`|`string`|`=`  ||\n|`startedAt`|`YYYY-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: `jobId`, `endedAt`, `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":["Currency Conversion Jobs"],"summary":"Get currency conversion job","operationId":"getcurrencyconversionjob","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":["Currency Conversion Jobs"],"summary":"Update currency conversion job","operationId":"updatecurrencyconversionjob","parameters":[{"$ref":"#/components/parameters/JobIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status of currency conversion job.","enum":["CANCELED"]},"priority":{"type":"string","description":"Priority of currency conversion 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 currency conversion job.","schema":{"type":"string"},"required":true}},"schemas":{"CurrencyConversionRequest":{"required":["resourceType","resourceUri","settings"],"type":"object","properties":{"resourceUri":{"type":"string","format":"uri","description":"URI of exposure resource or analysis result."},"resourceType":{"type":"string","description":"Type of the resource.","enum":["ACCOUNT","AGGREGATEPORTFOLIO","ANALYSIS","PORTFOLIO","TREATY"]},"settings":{"description":"Currency conversion settings.","$ref":"#/components/schemas/CurrencyConversionSettings"}}},"CurrencyConversionSettings":{"required":["currencyAsOfDate","currencyCode","currencyScheme","currencyVintage"],"type":"object","properties":{"currencyCode":{"type":"string","description":"Code that identifies default currency used to calculate losses. Corresponds to a value in the specified currency scheme (`scheme`). If RMS Currency Scheme, conforms to [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) standard.","example":"USD"},"currencyScheme":{"type":"string","description":"Name of <<glossary:currency scheme>> used to calculate the value of specified currency (`currencyCode`) based on the exchange rate between that currency and the scheme's <<glossary:anchor currency>> at the specified point in time (`vintage`).","example":"RMS"},"currencyAsOfDate":{"type":"string","description":"Effective date of currency scheme in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, i.e. `YYYY-MM-DDThh:mm:ss.sss`.","example":"2014-09-10T00:00:00.000Z"},"currencyVintage":{"type":"string","description":"Version of <<glossary:currency scheme>> that defines exchange rate between the <<glossary:anchor currency>> and the specified currency (`currencyCode`).","example":"RL25"}}},"RiskdataResource":{"type":"string","format":"uri"},"JobSearchResult":{"type":"array","items":{"$ref":"#/components/schemas/JobSummary"}},"Task":{"type":"object","properties":{"taskId":{"type":"string","format":"int32"},"guid":{"type":"string","format":"uuid"},"jobId":{"type":"string","format":"int64"},"status":{"type":"string"},"submittedAt":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"percentComplete":{"type":"integer","format":"int32"},"priorTaskGuids":{"type":"array","items":{"type":"string","format":"uuid"}},"output":{"type":"object","properties":{"summary":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}}}},"log":{"type":"object"}}}}},"JobSummary":{"type":"object","properties":{"jobId":{"type":"string","format":"int64"},"priority":{"type":"string","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","enum":["QUEUED","RUNNING","FINISHED","FAILED","CANCELLED","PENDING","CANCELLING","CANCEL_REQUESTED"]},"submittedAt":{"type":"string"},"startedAt":{"type":"string"},"endedAt":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"progress":{"type":"integer","format":"int32"},"resourceGroupId":{"type":"string","format":"uuid"},"entitlement":{"type":"string"},"details":{"type":"object","properties":{"resources":{"type":"array","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"}}}}]},"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"}}}}