Developer API
Reports
This is the processed KPI data entries that appear on the reports. It includes the ability to query all types of KPIs including calculated KPIs.
Get all data entries
The data entries are filtered based on the search query string. The action will return a maximum of 10,000 entries.
Query string values
Name | Type | Read Only | Mandatory | Notes |
---|---|---|---|---|
kpiIds | string | yes | no | A comma separated list of the KPI IDs you want to query. KPI IDs are visible on the KPIs screen or can be queried via the KPIs API |
dateFrom | datetime | no | yes | Will default to today's date if not set. Format is YYYY-MM-DD. |
dateTo | datetime | no | yes | Will default to today's date if not sent. Format is YYYY-MM-DD. |
groupItemIds | string | no | yes | A comma separated list of the Group Item IDs you want to filter the data by. Group Item IDs can be queried via the Group Items API |
userIds | string | no | yes | A comma separated list of the User IDs you want to filter the data by. The User IDs can be queried via the Users API |
GET /api/reports/AllDataEntries?kpiIds=1,2,3&dateFrom=YYYY-MM-DD&dateTo=YYYY-MM-DD&groupItemIds=1,2,3&userIds=1,2,3
Using curl
curl https://{subdomain}.simplekpi.com/api/reports/AllDataEntries?kpiIds=1,2,3&dateFrom=2021-01-01&dateTo=2021-02-01 -v -u {email_address}:{token}
Example Response
Status: 200 OK [ { "kpiId": 12345, "kpiName": "Sales", "kpiDescription":"Sales KPI Description"", "itemId": 54321, "itemName": "Joe Bloggs", "periodId": "D", "period": "Daily", "labelFormat": "#,##0", "isPercentage": 0, "hasTarget": 1, "direction": "U", "directionName": "Up", "entryDate": "2021-01-10", "actual": 144.3822, "target": 151.0000, "notes": "This is a note" }, { "kpiId": 12345, "kpiName": "Sales", "kpiDescription":"Sales KPI Description"", "itemId": 54321, "itemName": "Joe Bloggs", "periodId": "D", "period": "Daily", "labelFormat": "#,##0", "isPercentage": 0, "hasTarget": 1, "direction": "U", "directionName": "Up", "entryDate": "2021-01-11", "actual": 156.4074, "target": 151.0000, "notes": "This is a note" } ]