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

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    formulasObject[]

List of formulas.

      formulaString

The formula to calculate.

      namesString

Comma seperated list of the names of variables in the formula.

      typesString

Comma seperated list of the types of the varialbes in the formula.

      valuesString

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

FieldTypeDescription
responseObject

Main object containing the response data.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"results": [
{
"value": "5.5",
"dataType": 2,
"syntaxError": ""
}
]
},
"errorCode": 0,
"errorMessage": ""
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.