Retrieve organization audit logs

Retrieve the audit logs of an organization.

If large amounts of data are being retrieved, your call could time out after 30 seconds. To prevent this from occurring, we recommend using pagination in the query parameters.

Request
Security:
query Parameters
limit
string^[1-9]\d*$
Default: "0"

Set the maximum number of pagination results to receive.

Example: limit=1
offset
string^[1-9]\d*$
Default: "0"

Set the number of results to skip over before receiving pagination results.

Example: offset=1
start
required
string <date-time> (Start date and time)

Filter by a start date and time, in ISO 8601 format.

Example: start=2020-01-01T14:48:00.000Z
end
required
string <date-time> (End date and time)

Filter by an end date and time, in ISO 8601 format.

Example: end=2020-01-01T14:48:00.000Z
userId
string (User ID as string)

Filter by the ID of the user.

Example: userId=32
partnerId
string

Filter by the partner ID that the user who performed the action is associated with. Obtain this from GET /partner-contact.

Example: partnerId=62
userType
string

Filter the results based on the desired user type, whether partner or user. This is necessary because the same userId can be assigned to a partner and a user.

Enum: "user" "partnerContact"
Example: userType=partnerContact
orgId
string (Organization ID as string) ^[1-9]\d*$

Filter by the organization ID that the user who performed the action is associated with. Obtain this from GET /organizations.

Example: orgId=17
imei
string

Filter by the IMEI number of the device. The IMEI number can be found on a sticker on the device or on the back of the device box.

Example: imei=12345678
entityId
string

Filter the results based on desired entity. Filter by IMEI for devices, by orgId for organizations, or by userId for users. Retrieves changes made to the devices, organizations, or users associated with the ID provided.

Example: entityId=123456
entityType
string

Filter the results based on desired entity type, whether the operation was performed on a device, a user, a reseller, or an organization.

Enum: "user" "reseller" "device" "organization"
Example: entityType=device
entityOrganizationId
string (Organization ID as string) ^[1-9]\d*$

Filter the results based on the Organization ID of the entity. Search for entities belonging to a specific organization.

Example: entityOrganizationId=17
entityPartnerId
string

Filter the results based on the Partner ID of the entity. Search for entities belonging to a specific partner.

Example: entityPartnerId=62
Responses
200

Successful operation

400

Bad request error

401

Unauthorized error

403

Forbidden error

404

Not found error

500

Internal server error

get/audit-logs
Request samples
curl -i -X GET \
  'https://api-prod.surfsight.net/v2/audit-logs?limit=1&offset=1&start=2020-01-01T14%3A48%3A00.000Z&end=2020-01-01T14%3A48%3A00.000Z&userId=32&partnerId=62&userType=partnerContact&orgId=17&imei=12345678&entityId=123456&entityType=device&entityOrganizationId=17&entityPartnerId=62' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "data": [
    ],
  • "metadata": {
    }
}