/api/reports/views/:id/table/indicators/:iid/conditions/create

This method creates a conditional formatting for a selected table indicator.

Resource Information

Resource URL

https://service.belladati.com/api/reports/views/:id/table/indicators/:iid/conditions/create

HTTP Method

POST

Request Parameters

Parameters

Detail

Example

id

ID of the table. This ID is part of the /api/reports/:id response.

123

iid

ID of the indicator. This ID is part of the /api/views/:id/table/indicators response.AVn6TNRofe
data

Form contents to submit in following JSON format:

evaluationTypeType of conditional formatting (INDICATOR or FORMULA)
symbolSymbol of the conditional formatting (ARROW_UP, ARROW_DOWN, WARNING, etc. - see Types and enumerations)
compareValueCompare value
compareFormulaCompare formula (used when compareType=FORMULA_INDICATOR or evaluationType=FORMULA)
conditionUse conditions (EQ, BW, GTW, etc. - see Types and enumerations)
valueSecondary value, used for conditions BW, NOT_BW, GBY, LBY
compareTypeType of compare value (CONSTANT, PREV_VALUE, FORMULA_INDICATOR, INDICATOR)
colorColor of text
backgroundBackground color
descriptionDescription
cssClass(optional) custom css style



{
	"evaluationType": "INDICATOR",
	"value":5,
	"compareValue": 15,
	"symbol": "WARNING",
	"condition": "BW",
	"compareType": "CONSTANT",
	"color": "#15d000",
	"background": "#8bffc5"
}


Response Structure

JSON response contains one JSON object with the following element:

indexOrder of the condition

Sample request/response

Using curl:

curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "data={\"evaluationType\": \"INDICATOR\",\"value\":5,\"compareValue\": 15,\"symbol\": \"WARNING\",\"condition\": \"BW\",\"compareType\": \"CONSTANT\",\"color\": \"#15d000\",\"background\": \"#8bffc5\"}" https://service.belladati.com/api/reports/views/5672-UXF46PMUR7/table/indicators/AVn6TNRofe/conditions/create

The JSON format response:

{
    "index": 6
}