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>'
{
  "type": "<string>",
  "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": {}
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://planetscale.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

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

type
string
required

The response type. Always "list" for paginated responses.

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 | null
required

The ID of the first object in the current results, or null when there are no results

cursor_end
string | null
required

The ID of the last object in the current results, or null when there are no results

data
object[]
required