RESTful endpoints
The Limits Module provides several RESTful endpoints for developers to utilize in the AUI and ActivePivot instance communication and to customize the business logics.
Limit breach and warning evaluation
Please see the Alert On-Demand Limits Evaluation section.
Create a new limit
REST endpoint: /limits/rest/v1/limitDefinition/create
Method: POST Example Endpoint: http://localhost:3090/limits/rest/v1/limitDefinition/create
Example body:
{
{
"serverName": "FRTB",
"comment": "Limit Comment",
"group": "Limit Group",
"id": "id_1234",
"name": "Limit Name",
"validFrom": "2018-09-28",
"validTo": "2022-01-04",
"cubeName": "StandardisedApproachCube",
"currency": "USD",
"frequencyType": "official",
"userId": "admin",
"breachWorkflow": "Single Eye",
"warningWorkflow": "Single Eye",
"limitChangesWorkflow": "Single Eye",
"breachWorkflowParameters": {
"Examiners": "USERS"
},
"warningWorkflowParameters": {
"Examiners": "USERS"
},
"limitChangesWorkflowParameters": {
"Examiners": "USERS"
},
"measureName": "FX Risk Charge",
"pollingFrequency": "EOD",
"kpiType": "Less than...",
"limitValues": [
2
],
"warningThreshold": 0.0,
"scope": {
"Desk": [
"Bonds",
"Balance Sheet Management"
]
}
}
}
Upload a file of new limits
REST endpoint: /limits/rest/v1/limitDefinition/upload
Method: POST Example Endpoint: http://localhost:3090/limits/rest/v1/limitDefinition/upload
Example body (text representation of binary file):
------WebKitFormBoundary0116TUm8HlznSV7v
Content-Disposition: form-data; name="file"; filename="<insert file name>.csv"
Content-Type: text/csv
------WebKitFormBoundary0116TUm8HlznSV7v--
REST endpoint: /limits/rest/v1/limitDefinition/export
Method: POST Example Endpoint: http://localhost:3090/limits/rest/v1/limitDefinition/export
Example body:
{
"orderName":"current_limits_table"
}
Check if the logged-in user can start the workflow
Endpoint: http://localhost:3090/limit-process-definition/canStart
Method: GET
Example: http://localhost:3090/limit-process-definition/canStart
Approve the workflow
Endpoint: http://localhost:3090/limit-process-instance/approve
Method: PUT
Example:
{
"definitionName": "GIRR Risk Charge Demo",
"exportStatusDetails": null,
"comment": null,
"serverName": "FRTB",
"asOfDate": [
2018,
9,
28
]
}