Pricefx REST API Reference
- Recalculate a Calculation of a Step
The Pricefx Backend API
Request
Executes a calculation of the step as a background task in the context of the Model Object. Returns two elements within the data array – the JST (Job Status Tracker) object (the calculation status of the newly created calculation) and the updated ModelObject object.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelcalcexec/{typedId}/{stepName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/optimization.modelcalcexec/{typedId}/{stepName}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelcalcexec/123.MO/definition?toStep=string'{ "response": { "node": "node", "data": [ … ], "status": 0 } }
Request
Executes a recalculation the calculation of the step as a background task (JST) in the context of the Model Object. Returns two elements within the data array – the JST (Job Status Tracker) object (the calculation status of the newly created calculation) and the updated ModelObject object.
The typedId of the Model Object you want to recalculate the step for.
Enter the name of the step you want to calculate.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelcalcexec/{typedId}/{stepName}/{calcName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/optimization.modelcalcexec/{typedId}/{stepName}/{calcName}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelcalcexec/123.MO/definition/{calcName}' \
-H 'Content-Type: application/json' \
-d '{}'{ "response": { "node": "pricefx-cluster-app-frontend-7489959459-smsvs", "data": [ … ], "status": 0 } }
Request
Executes a recalculation of the item as a background task (JST) with the id of the last calculation JST (copies calculation results from the previous JST).
Use a filter in your request to specify items with CREATED or FAILED status. Cannot be used on items with the CALCULATED status.
Fails if called for anything else than a Parallel Calculation.
Returns two elements within the data array – the JST (Job Status Tracker) object (the calculation status of the newly created calculation) and the updated ModelObject object.
The typedId of the Model Object you want to recalculate the step for.
Enter the name of the step you want to calculate.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelcalcexec/{typedId}/{stepName}/{calcName}/item
- URL:https://companynode.pricefx.com/pricefx/companypartition/optimization.modelcalcexec/{typedId}/{stepName}/{calcName}/item
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelcalcexec/123.MO/definition/{calcName}/item' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"criteria": [
{
"_constructor": "AdvancedCriteria",
"operator": "and",
"criteria": [
{
"fieldName": "status",
"operator": "iEquals",
"value": [
"FAILED"
]
}
]
}
]
}
}'{ "response": { "node": "pricefx-cluster-app-frontend-6689766d7c-6bzmz", "data": [ … ], "status": 0 } }
See the Key-Value Database Storage Knowledge Base article for more details.
Here you can find all fields of the corresponding entity (represented by the type code).
Use the /metadata.describe endpoint to find out the correct data type of the field that is used in your partition.
Comments