Skip to main content
GET
/
organizations
/
{organization}
/
audit-log
List audit logs
curl --request GET \
  --url https://api.planetscale.com/v1/organizations/{organization}/audit-log \
  --header 'Authorization: Bearer <token>'
{
  "has_next": true,
  "has_prev": true,
  "cursor_start": "<string>",
  "cursor_end": "<string>",
  "data": [
    {
      "id": "<string>",
      "actor_id": "<string>",
      "actor_type": "<string>",
      "auditable_id": "<string>",
      "auditable_type": "<string>",
      "target_id": "<string>",
      "target_type": "<string>",
      "location": "<string>",
      "target_display_name": "<string>",
      "audit_action": "<string>",
      "action": "<string>",
      "actor_display_name": "<string>",
      "auditable_display_name": "<string>",
      "remote_ip": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "metadata": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

The name of the organization

Query Parameters

starting_after
string

If provided, returns results after the specified cursor

ending_before
string

If provided, returns results before the specified cursor

limit
integer
default:25

If provided, specifies the number of returned results (max 100)

Response

Returns the audit log events

has_next
boolean
required

Whether there is a next page of results

has_prev
boolean
required

Whether there is a previous page of results

cursor_start
string
required

The ID of the first object in the current results

cursor_end
string
required

The ID of the last object in the current results

data
object[]
required