KPI Categories

KPIs are organized into categories to make it easier for the admins to manage and assign KPIs.

KPI Category Object

The object has the following properties:

Name Type Read Only Mandatory Max Len. Notes
id integer yes no   Automatically generated for the KPI category
name string no yes 50 The name of the KPI category

JSON Example

{
  "id":         111,
  "name":       "Kpi Category"
}

XML Example

<KPICategory xmlns="http://schemas.datacontract.org/2004/07/Waytobi.App.Api.Models" 
             xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <id>111</id>
  <name>Kpi Category</name>
</KPICategory>

 

Get all KPI Categories

GET /api/kpicategories

Using curl

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

Example Response

Status: 200 OK
[
  {
    "id":         111,
    "name":       "Kpi Category"
  },
  {
    "id":         222,
    "name":       "Sales KPIs"
  }
]

 

Get a KPI Category

GET /api/kpicategories/{id}

Using curl

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

Example Response

Status: 200 OK
{
  "id":         1234,
  "name":       "Kpi Category"
}

 

Add a KPI Category

POST /api/kpicategories

Using curl

curl https://app.waytobi.com/api/kpicategories
  -H "Content-Type: application/json" 
  -d '{"name": "Kpi Category"}'
  -v -u {token} -X POST

Example Response

Status: 201 Created
Location: https://app.waytobi.com/api/kpicategories/{id}
{
  "id":         1234,
  "name":       "Kpi Category"
}

 

Update a KPI Category

PUT /api/kpicategories/{id}

Using curl

curl https://app.waytobi.com/api/kpicategories/{id}
  -H "Content-Type: application/json" 
  -d '{"name": "Kpi Category"}'
  -v -u {token} -X PUT

Example Response

Status: 200 OK
{
  "id":1,
  "name":"Kpi Category",
}

 

Delete a KPI Category

DELETE /api/kpicategories/{id}

Using curl

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

Example Response

Status: 200 OK
 

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