Get Logs v3.1
API version | 3.1 |
---|---|
Last Update | 04/21/2021 |
Authentication | YES |
HTTP Method | POST |
Content Type | application/json |
Rate limited | YES |
Requests per rate limit | 10/min |
Response Format | JSON |
MetaAccess records events on your account. There are 3 types of event logs: admin event logs, device event logs, and webhook event logs. To retrieve event logs on your account, you can use this API. You can set filters in parameters to filter event logs you concern.
API URL
Request Parameters
Key | Datatype | Parameter Type | Required | Description | Default |
---|---|---|---|---|---|
access_token | string | URL | Yes | access token which archived from OAuth authentication step | |
event_category | string | Body | Yes | Specify what event logs you want to retrieve. Possible values can be:
| |
limit | int | Body | Optional | Specify a maximum number of event logs will be returned in the response. The value should be in [1,50]. If there are more event logs than what the limit asks for, HTTP code in a response will be 406. Event logs in the response are sorted by timestamp. | 20 |
page | int | Body | Optional | Specify a page number that event logs will be returned in. If the requested page exceeds the number of pages of event logs, HTTP code in a response will be 413. It means that the requested page number is too large, no event logs will be returned. | 1 |
start_time | long | Body | Optional | Specify a start time of the query's duration. The format should be Unix epoch time in milliseconds | |
end_time | long | Body | Optional | Specify an end time of the query's duration. The format should be Unix epoch time in milliseconds | |
age | int | Body | Optional | Specify age of the information in seconds. Maximum value is 86400 (1 day) For example: if you want to query event logs in last 5 minutes, you need set the "age" parameter to 300. | |
filter | object | Body | Optional | Specify filter criteria | |
filter.events | string | Body | Optional | Specify which events you want to retrieve. Values for admin event logs (event_category = admin) can be:
Values for device event logs (event_category=device) can be:
Values for category webhook can be:
| |
filter.agent_types | array<int> | Body | Optional | Only valid for device event logs (event_category = device). To filter event logs by an agent type. Values can be:
| |
filter.search | string | Body | Optional | Only valid for device event logs (event_category = device) or webhook event logs (event_category = webhook) Search by device name, device id. |
Response HTTP Code
See APIs
Response Parameters for admin event logs (event_category = admin):
Key | DataType | Description |
---|---|---|
timestamp | string | timestamp when the event occurs |
event | string | Event text |
details | string | Event details |
admin_name | string | Name of an admin who is related to the event |
admin_email | string | Email of an admin who is related to the event |
Response Parameters for Device event logs (event_category = device):
Key | DataType | Description |
---|---|---|
timestamp | string | timestamp when the event occurs |
event | string | Event text |
details | string | Event details |
device_id | string | Device id of a device that the event occurred on |
device_name | string | Device name that the event occurred on |
device_username | string | User logged-in ID who logged into a device when the event occurred |
device_group | string | A device's group name |
Response Parameters for Webhook event logs (event_category = webhook):
Key | DataType | Description |
---|---|---|
timestamp | string | timestamp when the event log occurs |
event | string | Event text |
details | string | Event details |
device_id | string | Device id of a device that the event occurred on |
device_name | string | Device name that the event occurred on |
response_code | string | Response code from a webhoook API |
response_body | string | Response body from a webhoook API |
Example
Example Request
Example Response
Example Request
Example Response
Example Request
Example Response
History
Version | URL |
---|---|
v3.0 | Get Logs v3.0 |
v2.0 | Get Logs v2.0 |
Was this page helpful?