Skip to Content
FeaturesAudit

Access Logs

See the API calls made with your credentials, and find the one you're looking for by its request ID.

Overview

Asset keeps an access log of the API calls made with your credentials. Use it to answer questions such as:

  • Did this call reach Asset, and what status did it get back?
  • Which calls failed this week, and why?
  • Who called an endpoint, from where?

The access log records the calls. To see the changes made to a Business' books, see the Audit Log.

Access log data is kept for 30 days.

What a record contains

FieldWhat it tells you
request_idThe ID of the call. It is the X-Request-Id header of the response.
timestampWhen Asset received the call.
client_idThe API client that made the call.
business_idThe Business the call acted on, if any.
methodThe HTTP method.
endpointThe endpoint that was called, as a route template.
pathThe path that was called, without the query string.
statusThe HTTP status Asset returned.
errorFor a failed call, the error returned.
error_detailsFor a validation error, which fields failed and why.
ip_address and user_agentWhere the call came from, and the User-Agent header it sent.

Find a call by its request ID

Every response carries an X-Request-Id header. Keep it in your own logs next to the call, and you can look the call up later, or quote it when you ask us about it.

Call GET /v0/tenant/access-log/{request_id} with the ID:

curl --request GET \
  --url "https://api.sandbox.getasset.com/v0/tenant/access-log/<request_id>" \
  --header 'Authorization: Bearer <token>'

List calls

Call GET /v0/tenant/access-log to list calls, newest first. All the filters are optional, and you can combine them:

ParameterFilters by
start, endA time range.
statusOne status code, such as 404.
status_classA class of status: 2xx, 3xx, 4xx or 5xx.
failedSend true to list only the calls that failed.
business_idThe Business a call acted on.
client_idThe API client that made the call.
endpointThe endpoint that was called.
methodGET, POST, PUT, PATCH or DELETE.
curl --request GET \
  --url "https://api.sandbox.getasset.com/v0/tenant/access-log?failed=true&status_class=4xx" \
  --header 'Authorization: Bearer <token>'

The list is paginated: send page_size, up to 100, and page_token to move between pages.

Questions? Reach out via our Contact form.

On this page