Skip to main content
Event API

The Event API lets you see how users have been interacting with the Insites platform

Andrew Waite avatar
Written by Andrew Waite
Updated over a year ago

This page explains how to use our API to list of events from Insites. Every time a user takes an action in Insites or an API key is used, this is logged as an event. You can use our event API to mine the activity in your Insites account.

All requests to our API should be authenticated. Our API is RESTful and communicates using JSON.
​
​


Fetch a list of events

Method: GET

The following parameters can be passed via GET to get more specific results:

Property

Definition

Required

before

ISO8601 date – Specify a time bracket between which you want events for.

No

after

ISO8601 date – Specify a time bracket between which you want events for.

No

Example

curl "https://api.insites.com/api/v1/events" --header "api-key:[YOUR API KEY]"

Expected response

If successful, you would expect a 200 response, with a body like this:

{
"events": [
{
"event_id": 12345,
"primary_type": "Logged out",
"secondary_type": null,
"store_date": "2017-06-08 10:55:19.055503",
"username": "user@company.com",
"account": "company_account_id",
"action": "User logged out",
"substitutions": null,
"old_value": null,
"new_value": null,
"report_id": null,
"additional": null
},
{
"event_id": 12346,
"primary_type": "Viewed usage statistics",
"secondary_type": null,
"store_date": "2017-06-08 10:47:49.234182",
"username": "user@company.com",
"account": "company_account_id",
"action": "Viewed usage statistics",
"substitutions": null,
"old_value": null,
"new_value": null,
"report_id": null,
"additional": null
}
]
}

Results are limited to 5000 per call, and are ordered with the latest events first.

All possible responses

Code

Reason

200

List of events.

Did this answer your question?