Replays
API DocumentationEndpoint
GET
https://dev.usermetric.io/api/replays/
Parameters
| Parameters | Details | Description |
|---|---|---|
website_id
|
Required
Integer
|
|
user_id
|
Optional
Integer
|
|
session_id
|
Optional
Integer
|
|
visitor_id
|
Optional
Integer
|
|
is_offloaded
|
Optional
Integer
|
Allowed values: 0, 1 |
is_too_short
|
Optional
Integer
|
Allowed values: 0, 1 |
datetime_field
|
Optional
String
|
Allowed values: datetime, last_datetime, expiration_date |
datetime_start
|
Optional
String
|
Filter results starting from this datetime. Y-m-d H:i:s format. |
datetime_end
|
Optional
String
|
Filter results up to this datetime. Y-m-d H:i:s format. |
order_by
|
Optional
String
|
What field to order the results by. Allowed values are: replay_id, session_id, visitor_id, events, size, is_offloaded, is_too_short, datetime, last_datetime, expiration_date. |
order_type
|
Optional
String
|
The ordering of the results. Allowed values are: ASC for ascending ordering, and DESC for descending ordering. |
page
|
Optional
Integer
|
The page number that you want results from. Defaults to 1. |
results_per_page
|
Optional
Integer
|
How many results you want per page. Allowed values are: 10, 25, 50, 100, 250, 500, 1000. Defaults to 25. |
Example
curl --request GET \
--url 'https://dev.usermetric.io/api/replays/?website_id=1' \
--header 'Authorization: Bearer {api_key}' \
Response example
{
"data": [
{
"id": 1,
"session_id": 1,
"visitor_id": 1,
"website_id": 1,
"user_id": 1,
"events": 25,
"size": 123456,
"duration": 60,
"is_offloaded": false,
"is_too_short": false,
"datetime": "2026-09-22 02:53:19",
"last_datetime": "2026-09-22 02:53:19",
"expiration_date": "2027-09-22"
},
{
"id": 2,
"session_id": 2,
"visitor_id": 2,
"website_id": 1,
"user_id": 1,
"events": 3,
"size": 4096,
"duration": null,
"is_offloaded": false,
"is_too_short": true,
"datetime": "2026-09-22 02:53:19",
"last_datetime": null,
"expiration_date": "2027-09-22"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total_results": 2,
"total_pages": 1
},
"links": {
"first": "https://dev.usermetric.io/api/replays?website_id=1&page=1",
"last": "https://dev.usermetric.io/api/replays?website_id=1&page=1",
"next": null,
"prev": null,
"self": "https://dev.usermetric.io/api/replays?website_id=1&page=1"
}
}
Endpoint
GET
https://dev.usermetric.io/api/replays/{replay_id}
Example
curl --request GET \
--url 'https://dev.usermetric.io/api/replays/{replay_id}' \
--header 'Authorization: Bearer {api_key}' \
Response example
{
"data": {
"id": 1,
"session_id": 1,
"visitor_id": 1,
"website_id": 1,
"user_id": 1,
"events": 25,
"size": 123456,
"duration": 60,
"is_offloaded": false,
"is_too_short": false,
"datetime": "2026-09-22 02:53:19",
"last_datetime": "2026-09-22 02:53:19",
"expiration_date": "2027-09-22"
}
}
Endpoint
GET
https://dev.usermetric.io/api/replays/{replay_id}/data
Example
curl --request GET \
--url 'https://dev.usermetric.io/api/replays/{replay_id}/data' \
--header 'Authorization: Bearer {api_key}' \
Response example
{
"data": {
"id": 1,
"session_id": 1,
"visitor_id": 1,
"website_id": 1,
"rows": [
{
"type": 4,
"data": {
"href": "https://example.com/pricing",
"width": 1280,
"height": 900
},
"timestamp": 1700000000000
},
{
"type": 2,
"data": {
"node": {},
"initialOffset": {
"left": 0,
"top": 0
}
},
"timestamp": 1700000000120
},
{
"type": 3,
"data": {
"source": 1
},
"timestamp": 1700000001400
}
],
"pageviews": [
{
"type": 4,
"data": {
"href": "https://example.com/pricing",
"width": 1280,
"height": 900
},
"timestamp": 1700000000000,
"datetime": "2026-09-22 02:53:19",
"path": "/pricing",
"time": "12:00"
}
]
}
}
Endpoint
DELETE
https://dev.usermetric.io/api/replays/{replay_id}
Example
curl --request DELETE \
--url 'https://dev.usermetric.io/api/replays/{replay_id}' \
--header 'Authorization: Bearer {api_key}' \