Scope: read = GET only; read_write = create/comment/close.
| Name | Key Prefix | Scope | Created By | Created | Expires | Last Used | Status | Actions |
|---|---|---|---|---|---|---|---|---|
| No API keys found. Generate one above. | ||||||||
| = htmlspecialchars($key['key_name']) ?> | = htmlspecialchars($key['key_prefix']) ?>… |
= htmlspecialchars($scope) ?> = htmlspecialchars($scope) ?> | = htmlspecialchars($key['display_name'] ?? $key['username'] ?? 'Unknown') ?> | = date('Y-m-d H:i', strtotime($key['created_at'])) ?> | = $key['expires_at'] ? date('Y-m-d', strtotime($key['expires_at'])) . ($expired ? ' (Expired)' : '') : 'Never' ?> | = $key['last_used'] ? date('Y-m-d H:i', strtotime($key['last_used'])) : 'Never' ?> | Active Revoked | — |
Include the API key in your requests using the Authorization header:
Authorization: Bearer YOUR_API_KEY
Scopes: a read key may only use the GET endpoints;
a read_write key may also create tickets, post comments, and change status.
All endpoints are Bearer-authenticated and rate-limited. Comments and status changes made via
the API are attributed to the key's name.
Create a ticket (read_write):
curl -X POST = $apiBase ?>/create_ticket_api.php \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"My ticket","category":"General","type":"Issue","priority":3}'
List / triage the queue (read). Filters: status, priority (1-5), host (title match), page, limit:
curl "= $apiBase ?>/api/tickets_api.php?status=Open&priority=2&limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"
Read one ticket + its comments (read):
curl "= $apiBase ?>/api/tickets_api.php?ticket_id=123456789" \
-H "Authorization: Bearer YOUR_API_KEY"
Post a comment (read_write). markdown_enabled is optional:
curl -X POST = $apiBase ?>/api/ticket_comment_api.php \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ticket_id":"123456789","comment_text":"Investigating.","markdown_enabled":true}'
Change / close status (read_write, workflow-validated). comment is required for transitions that require one (e.g. closing) and is posted as the reason:
curl -X POST = $apiBase ?>/api/ticket_status_api.php \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ticket_id":"123456789","status":"Closed","comment":"Resolved: disk replaced."}'
Keep keys secure and rotate them regularly. Scope automation keys to read unless they need to write.