# Get user events
You can return all user’s events.
GET
/users-by-id/:custom_id/events/
Attributes | Type | Required | Description |
---|---|---|---|
custom_id | integer | no | The unique identifier for the user which is provided by the client. |
Lookup | Description | Example usage |
---|---|---|
count_from | A date from when stats should be counted | ?count_from=2021-05-16 |
count_to | A date utill stats should be counted | ?count_from=2022-05-16 |
# Request
- CURL
- JavaScript
- PHP
- Python
curl -X GET -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2"
"https://<your_app_subdomain>.user.com/api/public/users-by-id/:custom_id/events/"
# Response
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"id": 600714,
"client": 3577959,
"timestamp": "2016-11-22T12:53:41.020361Z",
"items": [],
"event": "MyNewEvent",
"event_id": 550
},
{
"id": 573849,
"client": 3577959,
"timestamp": "2016-11-18T11:34:30.765917Z",
"items": [],
"event": "NewOrder",
"event_id": 583
},
{
"id": 573847,
"client": 3577959,
"timestamp": "2016-11-18T11:34:27.088702Z",
"items": [],
"event": "MyNewEvent",
"event_id": 550
},
...
]
}