The KPI units are used to describe and set how the KPI data values are displayed to the user. For example £ 3.99 , 123% etc.
The object has the following properties:
Name | Type | Read Only | Mandatory | Max Len. | Notes |
---|---|---|---|---|---|
id | integer | yes | no | Automatically generated for the KPI format | |
name | string | no | yes | 15 | The name of the KPI format |
template | string | no | yes | 15 | The display format must be a valid number format e.g. £%s or %s% (where %s - formatted value) |
language_id | integer | no | yes | The format language id | |
float | boolean | no | yes | To determine if the value is a decimal |
{ "id": 4, "name": "12.34%", "template": "%s%", "language_id": 1,
"float": true }
<KPIFormat xmlns="http://schemas.datacontract.org/2004/07/Waytobi.App.Api.Models" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <id>4</id> <name>12.34%</name> <template>%s%</template> <float>true</float> </KPIFormat>
GET /api/kpiformats
curl https://app.waytobi.com/api/kpiformats -v -u {token}
Status: 200 OK [ {
"id": 4,
"name": "12.34%",
"template": "%s%",
"language_id": 1,
"float": true
}, {
"id": 5,
"name": "$1,234.56",
"template": "$%s",
"language_id": 1,
"float": true
} ]
GET /api/kpiformats/{id}
curl https://app.waytobi.com/api/kpiformats/{id} -v -u {token}
Status: 200 OK {
"id": 4,
"name": "12.34%",
"template": "%s%",
"language_id": 1,
"float": true
}
Looking for anything specific article which resides in general queries? Just browse the various relevant folders and categories and then you will find the desired article.
Contact Us