KpisApi Resource

GET /kpis

For an authenticated user, this method retrieves all KPIs visible to the user sorted alphabetically

Request Parameters
name type description default constraints
firstResult query The first result(used in pagination) 0 min: 0
owner query Specifies whether the kpis returned should be all that he has access to, or only those of which he is creator. Possible values: ALL, ME. Note that case matters! ALL "ALL" or "ME" or "PUBLIC" or "SHARED"
pageSize query The page size (used in pagination) 10 min: 0
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json containing representing the KPI.

Example

Request
GET /kpis
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

POST /kpis

For an authenticated user, this method allows the user to create a KPI

The Content-Type in the header must be set to: application/json;charset="UTF-8"

Request Body
media type data type description
application/json;charset="UTF-8" (custom) The specification of the KeyPerformanceIndex to be create

language: language of the Key Performance Index

name: name of the Key Performance Index

description: description of the Key Performance Index

andKpiTerm: 'AND' terms to be included in the Key Performance Index

orKpiTerm: 'OR' terms to be included in the Key Performance Index

A note about the OR and AND terms about the KPI. The AND terms specify terms that MUST ALL be in the document. Out of the OR terms, atleast one must be present in the documents. Eg: If OR terms are "HELLO" and "BYE"; and AND terms are "EVERYONE" and "ALSO", the document must contain: ( EVERYONE AND ALSO) AND ( HELLO OR BYE ).
Note that if only one AND / OR term is specified, it does not matter if it is under OR or AND

Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json containing representing the created KPI.

Example

Request
POST /kpis
Content-Type: application/json;charset="UTF-8"
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json;charset="UTF-8"

                
...
                
              

DELETE /kpis/{id}

For an authenticated user, this method deletes a previously created KeyPerformanceIndex, as long as the KeyPerformanceIndex was created by the user, and is not referenced anywhere else. All associated observers are also deleted.

Request Parameters
name type description default constraints
id path The id of KeyPerformanceIndex for which the user wants to remove.   min: 1
sectorId query The id of the sector in the context of which the KeyPerformanceIndex is to be removed: If the KeyPerformanceIndex is not referenced by any other sector than the one identified by this parameter, it is removed. However, if the KeyPerformanceIndex is referenced by any other sectors, it is not removed. -1 int
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A boolean representing whether the operation was successful.

Example

Request
DELETE /kpis/{id}
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset="UTF-8"

                
...
                
              

GET /kpis/{id}

For an authenticated user, this method gets a previously created KeyPerformanceIndex, as long as the KeyPerformanceIndex was created by the user.

Request Parameters
name type description constraints
id path The id of KeyPerformanceIndex for which the user wants to retrive min: 1
Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json containing representing the KPI.

Example

Request
GET /kpis/{id}
Content-Type: */*
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset="UTF-8"

                
...
                
              

PUT /kpis/{id}

For an authenticated user, this method allows the user to modify a Key Performance Index created by the user

The Content-Type in the header must be set to: application/json;charset="UTF-8"

Request Parameters
name type description constraints
id path The id of the kpi to be modified min: 1
Request Body
media type data type description
application/json;charset="UTF-8" (custom) The new specification of the KeyPerformanceIndex to be modified

language: language of the Key Performance Index

name: name of the Key Performance Index

description: description of the Key Performance Index

andKpiTerm: 'AND' terms to be included in the Key Performance Index

orKpiTerm: 'OR' terms to be included in the Key Performance Index

Response Body
media type data type description
application/json;charset="UTF-8" (custom) A json containing representing the modified KPI.

Example

Request
PUT /kpis/{id}
Content-Type: application/json;charset="UTF-8"
Accept: application/json;charset="UTF-8"

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset="UTF-8"

                
...