PlanDocket

Audit Log

Business+

Retrieve activity logs.

Read Only This endpoint only supports GET requests.
Required scopes: audit

Endpoints

GET /api/v1/audit-log

List all log entries

GET /api/v1/audit-log/{id}

Retrieve a single entry

Query Parameters

Parameter Description
action Filter by action type
entity_type Filter by entity type
admin_id Filter by administrator ID
date_from Filter entries from this date (ISO 8601)
date_to Filter entries until this date (ISO 8601)
search Search term to filter results

Response Schema

Field Type
id integer
action string
entity_type string|null
entity_id integer|null
entity_title string|null
description string|null
old_values object|null
new_values object|null
admin_id integer|null
admin_name string|null
ip_address string|null
user_agent string|null
created_at string

Code Examples

curl -X GET "https://your-tenant.plandocket.com/api/v1/audit-log" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://your-tenant.plandocket.com';

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => $baseUrl . '/api/v1/audit-log',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);

print_r($data);
const apiKey = 'YOUR_API_KEY';
const baseUrl = 'https://your-tenant.plandocket.com';

const response = await fetch(`${baseUrl}/api/v1/audit-log`, {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

api_key = 'YOUR_API_KEY'
base_url = 'https://your-tenant.plandocket.com'

headers = {
    'Authorization': f'Bearer {api_key}',
    'Content-Type': 'application/json',
}

response = requests.get(f'{base_url}/api/v1/audit-log', headers=headers)
data = response.json()
print(data)

Sample Response

200 OK
{
  "data": {
    "audit-log_id": 1,
    "created_at": 1704067200,
    "updated_at": 1704067200
  },
  "meta": {
    "request_id": "req_abc123"
  }
}
Esc to close