{"openapi":"3.0.2","info":{"title":"Grouping API","version":"2023.08.c"},"servers":[{"url":"https://{host}/platform/grouping/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":["json","curl","python","java","csharp","node"],"proxy-enabled":true,"samples-enabled":true},"security":[{"rms_api_key":[]},{"rms_bearer_token":[]}],"paths":{"/jobs":{"post":{"tags":["Grouping Jobs"],"summary":"Create grouping job","operationId":"createGroupingJob","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/CreateAnalysisGroupRequest"}}},"required":true},"responses":{"201":{"description":"Grouping job created","headers":{"Location":{"description":"location of the job with jobId","style":"simple","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":["Grouping Jobs"],"summary":"Search grouping jobs","operationId":"getGroupingJobs","parameters":[{"name":"filter","in":"query","description":"<<glossary:Query string>> to select response data based on property values. See [Filtering Responses](doc:response-filtering) \n\n`Relational : (property) (comparison operator) (value) eg. jobId=\"100\"` \n\n`Boolean : (condition) (logical operator) (condition) eg. jobId=\"100\" AND status=\"FINISHED\"`","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Comma-delimited list of properties. Sort order defined by one of `ASC` (ascending) or `DESC` (descending). See [Response Pagination](doc:response-pagination).","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of records to display per page","schema":{"minimum":1,"type":"integer","format":"int32","default":100}},{"name":"offset","in":"query","description":"Number of page displaying the returned records, starting at _0_.","schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobResponse"}}}}},"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":["Grouping Jobs"],"summary":"Get grouping job","operationId":"getGroupingJob","parameters":[{"name":"jobId","in":"path","description":"ID of grouping job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetailResponse"}}}},"204":{"description":"No content"},"400":{"description":"Bad Request","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"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"patch":{"tags":["Grouping Jobs"],"summary":"Update grouping job","operationId":"updateGroupingJob","parameters":[{"name":"jobId","in":"path","description":"ID of grouping job","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/PatchJobRequest"}}},"required":true},"responses":{"202":{"description":"Job successfully updated."},"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"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}},"components":{"schemas":{"Details":{"type":"object","properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/Uri"}},"summary":{"type":"string"}}},"JobDetailResponse":{"type":"object","properties":{"jobId":{"type":"string"},"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"},"details":{"$ref":"#/components/schemas/Details"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}}}},"Task":{"type":"object","properties":{"taskId":{"type":"string"},"guid":{"type":"string","format":"uuid"},"jobId":{"type":"string"},"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":{"$ref":"#/components/schemas/TaskOutput"}}},"TaskErrorMessage":{"type":"object","properties":{"message":{"type":"string"}}},"TaskOutput":{"type":"object","properties":{"summary":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/TaskErrorMessage"}},"log":{"type":"object","additionalProperties":{"type":"string"}}}},"Uri":{"type":"object","properties":{"uri":{"type":"string"}}},"ErrorMessage":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"logId":{"type":"string"}}},"JobResponse":{"type":"object","properties":{"jobId":{"type":"string"},"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"},"details":{"$ref":"#/components/schemas/Details"}}},"PatchJobRequest":{"type":"object","properties":{"status":{"type":"string","enum":["CANCELLED"]},"priority":{"type":"string","enum":["veryhigh","high","medium","low","verylow"]}}},"AnalysisGroupSettings":{"required":["analysisName","currency","numOfSimulations","propagateDetailedLosses","simulateToPLT"],"type":"object","description":"Settings for analysis group job.","properties":{"forceGroupType":{"type":"string"},"reportingWindowStart":{"maxLength":2147483647,"minLength":1,"type":"string"},"numOfSimulations":{"type":"integer","format":"int64","description":"Number of <<glossary:simulation period>>s to define length of group PLT. Length of PLTs in grouped analyses may be truncated or repeated depending on whether they are longer or shorter than the group PLT. See [Grouping PLTs of Different Lengths](https://help.rms.com/help/RiskModeler/doc/Content/RM_Grouping/PLTDifferentLenghts.htm)"},"simulationWindowStart":{"maxLength":2147483647,"minLength":1,"type":"string"},"simulationWindowEnd":{"maxLength":2147483647,"minLength":1,"type":"string"},"simulateToPLT":{"type":"boolean","description":"If `true`, ELT losses are recalculated as PLT losses using the specified event rate scheme, simulation set, and number of simulation periods."},"propagateDetailedLosses":{"type":"boolean","description":"Required for ALM or DLM analysis groups (ELT-based groups). \n\nIf `true`, detailed geographic output from analyses is carried over to analysis group."},"regionPerilSimulationSet":{"type":"array","description":"Required for HD analysis groups (PLT-based groups).\n\nList of <<glossary:simulation set>> (PEQT) definitions to use to generate PLT. Each simulation set is defined by a unique combination of peril, region, and version.\n\nIn general, HD analyses based on the same simulation set cannot be grouped using another simulation set. Exceptions include HD analyses based on North America Wildfire HD Models or Japan Typhoon and Flood HD Model. See [Conflicting Simulation Sets](https://help.rms.com/help/RiskModeler/prod/Content/RM_Grouping/ConflictingSimSets.htm).\n\nIf group combines DLM and HD analyses, simulation set is used to calculate PLT from ELT. See [ELT-to-PLT Simulation Methodology](https://help.rms.com/help/RiskModeler/prod/Content/RM_Grouping/SimulatingELTtoPLTMeth.htm).","items":{"$ref":"#/components/schemas/RegionPerilSimulation"}},"analysisName":{"maxLength":64,"minLength":1,"pattern":"^\\w((?!--)[\\w\\s:-])*\\w$|^\\w*$","type":"string","description":"Name of analysis group."},"description":{"type":"string","maxLength":50,"description":"Description of analysis group."},"currency":{"description":"Currency used calculate losses in analysis group.","$ref":"#/components/schemas/Currency"}}},"CreateAnalysisGroupRequest":{"required":["resourceType","resourceUris","settings"],"type":"object","properties":{"resourceType":{"type":"string","description":"Type of exposures to group","enum":["analyses"]},"resourceUris":{"description":"URI of exposures to group. See [Resource URIs](doc:resource-uris).","type":"array","items":{"type":"string","format":"uri","example":"/platform/riskdata/v1/analyses/5555"}},"settings":{"$ref":"#/components/schemas/AnalysisGroupSettings"}}},"Currency":{"required":["asOfDate","code","scheme","vintage"],"type":"object","properties":{"code":{"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.\nexample: USD"},"scheme":{"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"},"asOfDate":{"type":"string","description":"Effective date of currency scheme vintage.","example":"2014-09-10T00:00:00.000Z"},"vintage":{"type":"string","description":"Version of <<glossary:currency scheme>> that defines exchange rate between the <<glossary:anchor currency>> and the specified currency (`currencyCode`).","example":"RL25"}}},"RegionPerilSimulation":{"required":["simulationPeriods","simulationSetId"],"type":"object","properties":{"perilCode":{"type":"string","description":"Two-letter code that identifies natural or man-made phenomenon that creates insurance loss, e.g. `EQ`, `FL`, `CS`, `TR`, `WF`, `WS`, `WT`.","enum":["CS","EQ","FL","FR","TR","WC","WS","WT"]},"modelVersion":{"type":"string","description":"Version of model to use in analysis. See [Models Available in Risk Modeler](https://help.rms.com/help/RiskModeler/prod/Content/HIGH/Models.htm)"},"eventRateSchemeId":{"type":"integer","format":"int32","description":"ID of <<glossary:event rate scheme>> to use to compute PLT."},"regionCode":{"type":"string","description":"Two letter code of region analyzed, e.g. `AU`, `CB`, `AC`. See [RMS Model Regions and Region Codes](https://help.rms.com/help/RiskModeler/prod/Content/HowTo/ModelRegionCodes.htm)."},"simulationSetId":{"type":"integer","format":"int64","description":"ID of period event quantile table (PEQT)."},"simulationPeriods":{"type":"integer","format":"int64","description":"Number of <<glossary:simulation period>>s to use to compute PLT."},"modelRegionCode":{"type":"string","description":"Four-letter code comprised of a two-letter code for the region and a two-letter code for the peril e.g. `ACEQ`, `EUFL`. For information about models and model updates, see [Models and Data](https://support.rms.com/group/rms/product-models-and-data?category=32304427) in the Moody's Support Center."},"eltAnalysisId":{"type":"integer","format":"int64"},"engineVersion":{"type":"string","enum":["HDv1.0","HDv1.1","HDv1.2","HDv2.0","HDv2.1","HDv3.0","RL18","RL18.1","RL18.2","RL21","RL22","RL23","RL24"],"description":"Version of model engine used in analysis group. See [Models Available in Risk Modeler](https://help.rms.com/help/RiskModeler/prod/Content/RM_HIGH/Models.htm?Highlight=Models%20Available%20in%20Risk%20Modeler)."}}}},"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"}}}}