Skip to main content

Logs

List Logs

Get a list of logs for the Tenant.

GET
https://api.basistheory.com/logs
Copy

Permissions

log:read

Request

curl "https://api.basistheory.com/logs" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>"

Query Parameters

ParameterRequiredTypeDefaultDescription
entity_typefalsestringnullAn optional entity type to filter the list of logs by. (e.g., token, card, bank, application, tenant)
entity_idfalsestringnullThe unique identifier of the entity_type to filter the list of logs by.
start_datefalsedatenullAn ISO 8601 formatted date to filter logs where created_at is greater than or equal to
end_datefalsedatenullAn ISO 8601 formatted date to filter logs where created_at is less than

Response

Returns a paginated object with the data property containing an array of logs. Providing any query parameters will filter the results. Returns an error if logs could not be retrieved.

{
"pagination": {...},
"data": [
{
"tenant_id": "77cb0024-123e-41a8-8ff8-a3d5a0fa8a08",
"actor_id": "fb124bba-f90d-45f0-9a59-5edca27b3b4a",
"actor_type": "application",
"entity_type": "token",
"entity_id": "c06d0789-0a38-40be-b7cc-c28a718f76f1",
"operation": "read",
"message": "Token retrieved",
"created_at": "2021-03-01T08:23:14+00:00"
},
{...},
{...}
]
}

List Entity Types

Get a list of entity types that may be referenced from the logs.

GET
https://api.basistheory.com/logs/entity-types
Copy

Permissions

log:read

Request

curl "https://api.basistheory.com/logs/entity-types" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>"

Response

Returns a non-paginated array of entity types.

[
{
"display_name": "Application",
"value": "application"
},
{
"display_name": "Bank",
"value": "bank"
},
{
"display_name": "Card",
"value": "card"
},
{
"display_name": "Proxy",
"value": "proxy"
},
...
]

Log Object

AttributeTypeDescription
tenant_iduuidThe Tenant ID which owns the entity
actor_iduuid(Optional) The ID of the actor which performed the operation
actor_typestring(Optional) The type of actor which performed the operation (e.g., user, application)
entity_typestringThe entity type of the log (e.g., token, card, bank, application, tenant)
entity_idstringThe unique identifier of the entity_type
operationstringThe log operation (e.g., create, update, read, delete)
messagestringThe log message
created_atdateCreated date of the token in ISO 8601 format

Entity Type Object

AttributeTypeDescription
display_namestringA readable string name for the entity type
valuestringThe system name of the entity. Referenced by a log's entity_type