Realtime
The Realtime endpoint allows viewing analytics of real-time users and interactions with a maximum 7 day range. This end point allows real-time analytics to be viewed for Apps, Stories, Pathways OR Streams.
v1/analytics/realtime/apps
Get real-time analytics for an app or a list of apps.v1/analytics/realtime/pathways
Get real-time analytics for a pathways or a list of pathways.v1/analytics/realtime/streams
Get real-time analytics for a stream or a list of streams.v1/analytics/realtime/stories
Get real-time analytics for a story or a list of stories.There are two optional parameter on the real-time endpoints. The items parameter allows you to filter items based on the name or ID of the item. If the item parameter is not provided the endpoint will return the latest 10 items.
For range this option allows you to select a predefined range from 0 - 7.
Key | Type |
items | Array Strings
Name or ID of the items to filter. |
range | Int
The range option to use. Defaults to 1. |
0 | The Last Hour |
1 Default | Last 24 Hours |
2 | Last 2 Days |
3 | Last 3 Days |
4 | Last 4 Days |
5 | Last 5 Days |
6 | Last 6 Days |
7 | Last 7 Days |
The example below makes a call to the
realtime/pathways
endpoint without a items parameter.curl -X POST \
v1/analytics/realtime/pathways \
-H 'Authorization: Basic <Your Base64 Encoded Token>'\
The example below makes a call to the
realtime/apps
endpoint with a single item in the items parameter.curl -X POST \
v1/analytics/realtime/apps \
-H 'Authorization: Basic <Your Base64 Encoded Token>'\
-d '{
"items" : ["Learning App"]
}'
The example below makes a call to the
realtime/stories
endpoint with an items parameter set to two stories. curl -X POST \
v1/analytics/realtime/stories \
-H 'Authorization: Basic <Your Base64 Encoded Token>'\
-d '{
"items" : ["Story A","Story B"]
}'
Whichever
realtime
endpoint you are using a successful response will return an array of items with each item containing a context item (app, pathway, stream or story) and corresponding realtime
data. The example below shows a successful response when using the realtime/apps
endpoint.{
"status": "success",
"data": [
{
"app": {
"name": "Falkor",
"version": "2.10.1",
"type": "app",
"ID": "io.falkor.demo"
},
"realtime": [
{
"range": [
"2022-02-18T10:49:40+02:00",
"2022-02-19T10:49:40+02:00"
],
"sessions": 1375,
"interactions": 4567
},
{
"range": [
"2022-02-19T10:49:40+02:00",
"2022-02-20T10:49:40+02:00"
],
"sessions": 1266,
"interactions": 3984
},
...etc
]
},
{
"app": {
"name": "The Everyday App",
"version": "2.10.1",
"type": "app",
"ID": "io.falkor.theeverydayapp"
},
"realtime": [
{
"range": [
"2022-02-18T10:49:40+02:00",
"2022-02-19T10:49:40+02:00"
],
"sessions": 310,
"interactions": 645
},
{
"range": [
"2022-02-19T10:49:40+02:00",
"2022-02-20T10:49:40+02:00"
],
"sessions": 157,
"interactions": 320
},
...etc
]
},
...etc
],
"hash": "a936c922af60b3849d2c44b93c1ae37b",
"response_time": 0.22345805168151855
}
Last modified 1yr ago