Formula - Run formula validation.
API Url
Use it to run validation for formulas
POST
http://localhost:16010/ProMarkREST/web/Formula/validate
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Parameter
| Field | Type | Description |
|---|---|---|
| data | Object | Object containg data to be uploaded. |
| formula | String | The formula that needs to be validated |
| variables | Object[] | A list of variables used to validate the formula |
| description | String | The description of the variable |
| name | String | The name of the variable |
| type | String | The type of the variable |
Request example:
{"request": {"data": {"formula": "formula""variables": [{"name": "variableName","description": "variableDescription","type": "varibaleType",},...]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| message | String | The error mesage resulted from the formula validation |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Response example:
HTTP/1.1 200 OK{"response": {"data": {"errorMessage": "validation error message that should be displayed"}}}
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. |