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
| Header | Value | Description |
|---|---|---|
| Cookie | session=<session_cookie> | Session cookie set by the login flow. |
| Authorization | Bearer prapi_your_key | Preferred API-key header. Never send API keys in URLs. |
| x-api-key | prapi_your_key | Alternative API-key header. |
| x-api-token | prapi_your_key | Legacy API-key header kept for backward compatibility. |
Parameters
| Name | In | Required | Description |
|---|---|---|---|
| page | query | No | Page number for paginated results. |
| pageSize | query | No | Requested page size where supported by the endpoint. |
| action | query | No | Filter by audit action. |
| userId | query | No | Filter 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...
Request
GET /api/admin/audit-logs?page=1&pageSize=20curl Equivalent
curl "https://playroom.date/api/admin/audit-logs?page=1&pageSize=20"Sample Response
Sample Response Body
{
"success": true,
"data": {
"logs": []
},
"error": null
}