Calculate call samples
Use the Varicent Incentives API to perform actions related to calculations, such as listing calculations available in the model, running a calculation, and running a full model calculation.
List all calculations
Use this call to list all calculations available in Varicent Incentives.
Request
GET - api/v1/calculations
Sample call
curl -X GET -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/calculations
Sample response
[ { "parentBlockId": 2170, "calculationId": 732, "name": "YOUR_CALCULATION_NAME", "isFavourite": false }]
Run a specific calculation
Use this call to run one calculation in your Varicent Incentives model.
Request
POST - api/v1/rpc/calculations/{id}
Note
The id
can be obtained from the GET - api/v1/calculations
call response in the calculationId
field.
Sample call
curl -X POST -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/calculations/{id}
Sample response
{ "completedactivities": "api/v1/completedactivities/22848", "liveactivities": "api/v1/liveactivities/22848", "completedcomputation":"api/v1/calculations/logs/completed/1891", "livecomputation": "api/v1/calculations/logs/live/0" }