Instance Audit Logs Actions
https://api.losant.com/instance/INSTANCE_ID
/audit-logs
Below are the various requests that can be performed against the Instance Audit Logs resource, as well as the expected parameters and the potential responses.
Get
Returns the audit logs for the instance
Method And Url
GET https://api.losant.com/instance/INSTANCE_ID
/audit-logs
Authentication
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Instance
, all.Instance.read
, all.User
, all.User.read
, instanceAuditLogs.*
, or instanceAuditLogs.get
.
Request Path Components
Path Component | Description | Example |
---|---|---|
INSTANCE_ID | ID associated with the instance | 575ec7417ae143cd83dc4a96 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
sortField | N | Field to sort the results by. Accepted values are: creationDate, responseStatus, actorName | creationDate | sortField=creationDate |
sortDirection | N | Direction to sort the results by. Accepted values are: asc, desc | desc | sortDirection=asc |
page | N | Which page of results to return | 0 | page=0 |
perPage | N | How many items to return per page | 100 | perPage=10 |
start | N | Start of time range for audit log query | start=1465790400000 | |
end | N | End of time range for audit log query | end=1465790400000 | |
auditLogFilter | N | Filters for the audit log query. See Instance Audit Log Filter for more details. | auditLogFilter[primaryTarget][0][type]=Organization&auditLogFilter[primaryTarget][1][type]=ApiToken&auditLogFilter[primaryTarget][1][id]=575ec8687ae143cd83dc4a97&auditLogFilter[actor][0][type]=User&auditLogFilter[actor][0][id]=575ed70c7ae143cd83dc4aa9 |
Request Headers
Name | Required | Description | Default |
---|---|---|---|
Authorization | Y | The token for authenticating the request, prepended with Bearer |
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X GET \
https://api.losant.com/instance/INSTANCE_ID/audit-logs
Successful Responses
Code | Type | Description |
---|---|---|
200 | Instance Audit Logs | Collection of instance audit logs |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if instance was not found |
Schemas
Error
Schema for errors returned by the API
Error Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
Error Example
- ▶{} 2 keys
- "NotFound"
- "Application was not found"
Instance Audit Log Filter
Schema for the filter of an instance audit log query
Instance Audit Log Filter Schema
- ▶{} 4 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 5 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- false
Instance Audit Log Filter Example
- ▶{} 2 keys
- ▶[] 2 items
- ▶[] 1 item
Instance Audit Logs
Schema for a collection of Instance Audit Logs
Instance Audit Logs Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 8 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 2 keys
- ▶{} 2 keys
Instance Audit Logs Example
- ▶{} 8 keys
- ▶[] 1 item
- 1
- 4
- 1
- 0
- "creationDate"
- "desc"
- "575ed6e87ae143cd83dc4aa8"
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.