Complete reference for HelpDesk API endpoints.
Base URL: http://localhost:8080/api/v1
All responses return JSON with consistent structure.
{
"success": true,
"data": {},
"message": "Operation successful",
"meta": {
"total": 10,
"per_page": 15,
"current_page": 1
}
}{
"success": false,
"data": null,
"message": "Operation failed",
"errors": ["Error message 1"]
}GET /departments List all departments
POST /departments Create department
GET /departments/{id} Get department
PUT /departments/{id} Update department
DELETE /departments/{id} Delete department
GET /locations List all locations
POST /locations Create location
GET /locations/{id} Get location
PUT /locations/{id} Update location
DELETE /locations/{id} Delete location
GET /users List all users
POST /users Create user
GET /users/{id} Get user
PUT /users/{id} Update user
DELETE /users/{id} Delete user
GET /roles List all roles
POST /roles Create role
GET /roles/{id} Get role
PUT /roles/{id} Update role
DELETE /roles/{id} Delete role
GET /permissions List all permissions
POST /permissions Create permission
GET /permissions/{id} Get permission
PUT /permissions/{id} Update permission
DELETE /permissions/{id} Delete permission
GET /tickets List all tickets
POST /tickets Create ticket
GET /tickets/{id} Get ticket
PUT /tickets/{id} Update ticket
DELETE /tickets/{id} Delete ticket
GET /ticket-categories List categories
POST /ticket-categories Create category
GET /ticket-categories/{id} Get category
PUT /ticket-categories/{id} Update category
DELETE /ticket-categories/{id} Delete category
GET /ticket-priorities List priorities
POST /ticket-priorities Create priority
GET /ticket-priorities/{id} Get priority
PUT /ticket-priorities/{id} Update priority
DELETE /ticket-priorities/{id} Delete priority
GET /ticket-statuses List statuses
POST /ticket-statuses Create status
GET /ticket-statuses/{id} Get status
PUT /ticket-statuses/{id} Update status
DELETE /ticket-statuses/{id} Delete status
GET /ticket-assignments List assignments
POST /ticket-assignments Create assignment
GET /ticket-assignments/{id} Get assignment
PUT /ticket-assignments/{id} Update assignment
DELETE /ticket-assignments/{id} Delete assignment
GET /ticket-comments List comments
POST /ticket-comments Create comment
GET /ticket-comments/{id} Get comment
PUT /ticket-comments/{id} Update comment
DELETE /ticket-comments/{id} Delete comment
GET /ticket-attachments List attachments
POST /ticket-attachments Create attachment
GET /ticket-attachments/{id} Get attachment
PUT /ticket-attachments/{id} Update attachment
DELETE /ticket-attachments/{id} Delete attachment
GET /ticket-history List history entries
POST /ticket-history Create history entry
GET /ticket-history/{id} Get history entry
PUT /ticket-history/{id} Update history entry
DELETE /ticket-history/{id} Delete history entry
All list endpoints support pagination:
page=1 Page number (default: 1)
per_page=15 Records per page (default: 15)
Example:
curl "http://localhost:8080/api/v1/tickets?page=2&per_page=20"curl -X POST http://localhost:8080/api/v1/tickets \
-H "Content-Type: application/json" \
-d '{
"title": "Printer not responding",
"description": "Office printer offline",
"category_id": 1,
"priority_id": 2,
"status_id": 1
}'curl -X PUT http://localhost:8080/api/v1/tickets/1 \
-H "Content-Type: application/json" \
-d '{
"status_id": 5,
"assigned_to": 3
}'curl "http://localhost:8080/api/v1/users?page=1&per_page=20"For interactive API testing:
- Start server:
php spark serve - Open http://localhost:8080/api/docs
- Use "Try it out" feature on any endpoint
200- Successful GET201- Successful POST (created)400- Invalid input404- Resource not found500- Server error
For API documentation support, contact: zoran@makrevski.com