General - Calculate formula results
API Url
Use it calculating the results of one or mre formulas .
PUT
http://localhost:16010/ProMarkREST/rest/General/formula-results
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| formulas | Object[] | List of formulas. |
| formula | String | The formula to calculate. |
| names | String | Comma seperated list of the names of variables in the formula. |
| types | String | Comma seperated list of the types of the varialbes in the formula. |
| values | String | Comma seperated list of the values of the varialbes in the formula. |
Request example:
HTTP/1.1 200 OK{"request": {"data": {"formulas": [{"formula": "2.5 + #param1 ","values":"3","types":"3","names":"param1"}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"results": [{"value": "5.5","dataType": 2,"syntaxError": ""}]},"errorCode": 0,"errorMessage": ""}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |