integrationkisi-api

How to get whole Kisi unlock history of a user using Kisi API?


I want to get the total no of unlocks event for each user on Kisi. As I checked the Kisi API, I can use Kisi Events API for that. I can set the action, actor_id params to get only unlocks among the various kind of events. The problem is the limit of the pagination of this API. As far as I know, the limit of a page is 100, and get next page using next cursor in the header of response, but it is not working correctly. Though I have added the next cursor in the request header, I am getting the same response with the case when I don't put that field in the request header. Please let me know if there is any other good way to get the whole unlocks history using Kisi API.


Solution

  • There's currently no way to run something like a count query against the Kisi events API so your attempt to paginate through the events makes sense.

    Without a code snippet, it's hard to say what's going wrong. Please update your question with the request you sent (remember to redact any API tokens) and the response.

    If you have a lot of events, paging through them just to count unlocks would be very slow (the Kisi events API is quite slow, and rate limited as well). A good way to solve your problem is to set up an Events Webhook integration and store statistics yourself, for example in BigQuery or a Postgres database, then you can run any type of processing and analytics you want.

    If you only need to count unlocks for this user once, please contact Kisi Support and they might be able to run a one-off query for you.