Query for Events

This tutorial will demonstrate how you can use the Analytics API to query events from your tenant.

The following request is an example of how you may query your events database. It queries for events that are associated with a particular request that we want to look into.


Copy to clipboard.
1GET https://YOUR_TENANT_URL/core/v1/analytics/events

This request will query the tenant for all analytics events that match the included requestIds.


Copy to clipboard.
2    "data": [
3        {
4            "id": "f570ff36-9035-439c-8e25-dc0cd67b4b4a",
5            "type": "DID_RETRIEVE_LIST_SUCCESS",
6            "timestamp": "2023-08-20T22:32:59.151Z",
7            "category": "did",
8            "requestId": "0QdK3jkDSPbOu1Sx9K2lM9",
9            "metadata": {
10                "nextCursor": "Y3JlYXRlZEF0PTIwMjMtMDctMzFUMDAlM0EyMSUzQTMwLjUyN1omaWQ9Yzk3NmQ0YmEtNjE2OC00MTkyLWE4YjAtNjE3NzNiZmNhM2M3",
11                "entriesCount": 8
12            },
13            "data": null
14        },
15        {
16            "id": "d7a38f9a-374f-4e4d-9cc0-42149d61540a",
17            "type": "DID_RETRIEVE_LIST_START",
18            "timestamp": "2023-08-20T22:32:59.148Z",
19            "category": "did",
20            "requestId": "0QdK3jkDSPbOu1Sx9K2lM9",
21            "metadata": {
22                "limit": 100
23            },
24            "data": null
25        }
26    ],
27    "nextCursor": "dGltZXN0YW1wPTIwMjMtMDgtMjBUMjIlM0EzMiUzQTU5LjE0OFomaWQ9ZDdhMzhmOWEtMzc0Zi00ZTRkLTljYzAtNDIxNDlkNjE1NDBh"

The response includes the following elements:

  • data: This array includes all the events that matched the query parameters. The example response includes two events that were part of a DID retrieval request. One event for the start of the request, and one even for the successful completion. Each event includes the following parameters:

    • id: Event identifier.

    • type: Event type.

    • timestamp: Event creation date and time.

    • category: Event category.

    • requestId: Request identifier.

    • metadata: Available metadata will vary based on Event type and logging level.

    • data: Available data will vary based on Event type and logging level.

  • nextCursor: This element is used for pagination the response. Refer to our API Reference for more information.


The following queries would result in a 400 - Bad Request response:

  • Invalid category.

  • Invalid type.

  • Invalid dateTo/dateFrom.

If you provide a non-existent requestId or eventId, the response will include an empty list.