API Reference

Audit

Audit-log access and administrative observability.

Lists audit log records with pagination and optional filters.

Authentication

Admin session.

Modes: logged-in user, API key

API key: audit:read

Permissions or Scopes

view_audit_logs

Request Headers

HeaderValueDescription
Cookiesession=<session_cookie>Session cookie set by the login flow.
AuthorizationBearer prapi_your_keyPreferred API-key header. Never send API keys in URLs.
x-api-keyprapi_your_keyAlternative API-key header.
x-api-tokenprapi_your_keyLegacy API-key header kept for backward compatibility.

Parameters

NameInRequiredDescription
pagequeryNoPage number for paginated results.
pageSizequeryNoRequested page size where supported by the endpoint.
actionqueryNoFilter by audit action.
userIdqueryNoFilter by actor user ID.

Validation

  • Request parameters and JSON payloads are validated server-side.
  • Mutating session-authenticated requests require CSRF validation.
  • Permission checks run before privileged data is returned or modified.

Errors

400 Invalid input, missing parameters, or validation failure.

401 Authentication is missing or invalid.

403 The authenticated principal lacks the required permission or scope.

404 The requested resource was not found.

500 Unexpected server error.

Rate Limits

No endpoint-specific public rate limit is documented. Authentication and abuse controls still apply.

Examples and Try It

Request examples, sample output, and the live tester below apply only to this endpoint.

cURL

curl -H "Authorization: Bearer prapi_your_key" "https://playroom.date/api/admin/audit-logs"

JavaScript / TypeScript

const response = await fetch('https://playroom.date/api/admin/audit-logs', {
  method: 'GET',
  headers: {
    "Authorization": "Bearer prapi_your_key"
  },
});
const data = await response.json();

Python

import requests

headers = {"Authorization": "Bearer prapi_your_key"}
response = requests.get('https://playroom.date/api/admin/audit-logs', headers=headers)
print(response.json())

Example Output

{
  "success": true,
  "data": {
    "logs": []
  },
  "error": null
}

Try It

Checking sign-in state...

Auth: No authentication

Request

GET /api/admin/audit-logs?page=1&pageSize=20

curl Equivalent

curl "https://playroom.date/api/admin/audit-logs?page=1&pageSize=20"
Sample Response

Sample Response Body

{
  "success": true,
  "data": {
    "logs": []
  },
  "error": null
}