Query for events
This tutorial will demonstrate how you can use the Analytics API to query events from your MATTR VII tenant.
You can query the analytics database via our Self service portal as well.
The following request is an example of how you may query your events database:
Request
1GET https://YOUR_TENANT_URL/core/v1/analytics/events
2?requestIds=0QdK3jkDSPbOu1Sx9K2lM9
3&limit=10
4&cursor=Y3JlYXRlZEF0PTIwMjAtMDgtMjVUMDY6NDY6MDkuNTEwWiZpZD1h
This request queries the tenant for all analytic events that match the included requestIds
.
Response
1{
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"
28}
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 for the start of the request, and one 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.
Troubleshooting
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.