The Audit API allows you to view audit records generated by the platform.
GET /api/data/audit
Optional Query Parameters:
user_id
- (string) The ID of the user by which to filter eventsgroup_id
- (string) The ID of the group by which to filter eventstarget_kind
- (string) The target_kind by which to filter eventstarget_id
- (string) The ID of the target object by which to filter eventsaction_key
- (string) The specific action key by which to filter eventsfrom
- (timestamp in RFC3339 format) - A timestamp to return events newer than this time.to
- (timestamp in RFC3339 format) - A timestamp to return events older than this time.order
- (string) The field by which to order events. Valid values: user_id
, group_id
, target_kind
, action_key
, ctime
. Defaults to ctime
page
- (integer) Which page of results to display. Defaults to 0.count
- (integer) Number of records to return per page. Defaults to 20.You will receive the following response:
{
"audit_events": [
{
"id": "59de4bb09221034b071d83db64950d34",
"user_id": "59790c0f1ab46239e59188bed540bfc7",
"action_key": "login",
"target_kind": "authenticate",
"target_id": "59790c0f1ab46239e59188bed540bfc7",
"time": "2017-10-11T16:49:52.758191Z"
},
{
"id": "59e12813db0201953dfe7214c4750e88",
"user_id": "59790c0f1ab46239e59188bed540bfc7",
"action_key": "enable",
"target_kind": "feature",
"target_id": "disabled_live_harvesting",
"time": "2017-10-13T20:54:43.14061Z"
},
...
],
"total": 71,
"page": 0
}
audit_events[].id
- (string) The ID of the eventaudit_events[].user_id
- (string) The ID of user that initiated the eventaudit_events[].target_kind
- (string) The type or category of the targetaudit_events[].action_key
- (string) The specific action taken on the targetaudit_events[].target_id
- (string) The ID of the target objectaudit_events[].time
- (string) The timestamp of the eventtotal
- (integer) The total number of records matching the querypage
- (integer) The page number of the page of resultsGET /api/data/audit/{id}
{id}
- (string) The ID of the audit record to getYou will receive the following response:
{
"id": "59e12813db0201953dfe7214c4750e88",
"user_id": "59790c0f1ab46239e59188bed540bfc7",
"action_key": "enable",
"target_kind": "feature",
"target_id": "disabled_live_harvesting",
"time": "2017-10-13T20:54:43.14061Z"
}
id
- (string) The ID of the eventuser_id
- (string) The ID of user that initiated the eventtarget_kind
- (string) The type or category of the targetaction_key
- (string) The specific action taken on the targettarget_id
- (string) The ID of the target objecttime
- (string) The timestamp of the eventadditional_id
- (string) This is an optional field that may be present on some events that represents an ID of an additional object. For example, adding a group to a location, the additional_id will be that of the group.GET /api/data/audit/filters
The response will be 200, with an array of objects:
{
"target_kinds": [
{
"name": "authenticate",
"action_keys": [
"login",
"update-password"
]
},
{
"name": "feature",
"action_keys": [
"enable"
]
},
{
"name": "group",
"action_keys": [
"create"
]
}
]
}
This documentation is generated from the latest version of GrayMeta Platform. For documentation relevant to your own deployed version, please use the documentation inside the application.
© 2021 GrayMeta, Inc.