Skip to main content

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.bounded, all.Instance.read, all.User, all.User.bounded, all.User.read, instanceAuditLogs.*, or instanceAuditLogs.get.

Request Path Components​

Path ComponentDescriptionExample
INSTANCE_IDID associated with the instance575ec7417ae143cd83dc4a96

Request Query Parameters​

NameRequiredDescriptionDefaultExample
sortFieldNField to sort the results by. Accepted values are: creationDate, responseStatus, actorNamecreationDatesortField=creationDate
sortDirectionNDirection to sort the results by. Accepted values are: asc, descdescsortDirection=asc
pageNWhich page of results to return0page=0
perPageNHow many items to return per page100perPage=10
startNStart of time range for audit log querystart=1465790400000
endNEnd of time range for audit log queryend=1465790400000
auditLogFilterNFilters 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​

NameRequiredDescriptionDefault
AuthorizationYThe 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​

CodeTypeDescription
200Instance Audit LogsCollection of instance audit logs

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError 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"
    • ▶
      {} 3 keys
      • ▶
        {} 1 key
        • ▶
          {} 1 key
          • ▶
            {} 2 keys

        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.