KPI Formats

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.

KPI Format Object

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

JSON Example

{
  "id":             4,
  "name":           "12.34%",
  "template":       "%s%",
  "language_id":     1,
"float": true }

XML Example

<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 all KPI Formats

GET /api/kpiformats

Using curl

curl https://app.waytobi.com/api/kpiformats
  -v -u {token}

Example Response

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 a KPI Format

GET /api/kpiformats/{id}

Using curl

curl https://app.waytobi.com/api/kpiformats/{id}
  -v -u {token}

Example Response

Status: 200 OK
{
"id": 4,
"name": "12.34%",
"template": "%s%",
"language_id": 1,
"float": true
}
 

Unable to find an answer?

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