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
| Field | What it tells you |
|---|---|
request_id | The ID of the call. It is the X-Request-Id header of the response. |
timestamp | When Asset received the call. |
client_id | The API client that made the call. |
business_id | The Business the call acted on, if any. |
method | The HTTP method. |
endpoint | The endpoint that was called, as a route template. |
path | The path that was called, without the query string. |
status | The HTTP status Asset returned. |
error | For a failed call, the error returned. |
error_details | For a validation error, which fields failed and why. |
ip_address and user_agent | Where 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:
| Parameter | Filters by |
|---|---|
start, end | A time range. |
status | One status code, such as 404. |
status_class | A class of status: 2xx, 3xx, 4xx or 5xx. |
failed | Send true to list only the calls that failed. |
business_id | The Business a call acted on. |
client_id | The API client that made the call. |
endpoint | The endpoint that was called. |
method | GET, 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.