This article describes how to retrieve data from the DevicePilot API
DevicePilot KPI results can be access via our API for display in your own product and dashboards. To make this as simple for you as possible, we supply an npm library that handles the work for you
As you would expect, to install this you simply use:
npm install devicepilot
You can see all the details, and example code on our npm page: https://www.npmjs.com/package/devicepilot.
You'll need two things to get the KPI
- An API token
You can get this from our tokens page: https://app.devicepilot.com/#/settings/tokens - A KPI id
You can get this by editing the KPI on the Cohort page, and taking the ID from the URL:
With these two, you can access KPI results using the package.