List Projects
Get a list of projects with filtering and pagination.
Request
Method: GET
URL: /api/projects
Headers: Authorization: Bearer {token}
Example Request
curl -X GET "https://example.com/api/projects" \
-H "Authorization: Bearer {token}"
Success Response (200)
{
"records": [
{
"id": 1,
"title": "Sample Project",
"description": "Project description",
"client_id": 1,
"status": "in_progress",
"start_date": "1403-01-01",
"deadline": "1403-06-30",
"created_at": "1403-01-01"
}
],
"meta": {
"total": 10,
"current_page": 1,
"per_page": 20
}
}
Errors
| Code | Description |
|---|---|
| 401 | Invalid token |
Project Details
Get complete information about a project.
Request
Method: GET
URL: /api/projects/{id}
Headers: Authorization: Bearer {token}
Example Request
curl -X GET "https://example.com/api/projects/1" \
-H "Authorization: Bearer {token}"
Success Response (200)
{
"record": {
"id": 1,
"title": "Sample Project",
"description": "Full project description",
"client_id": 1,
"status": "in_progress",
"start_date": "1403-01-01",
"deadline": "1403-06-30",
"price": 50000000,
"labels": [],
"created_at": "1403-01-01"
}
}
Errors
| Code | Description |
|---|---|
| 401 | Invalid token |
| 404 | Project not found |
Create Project
Create a new project in the system.
Request
Method: POST
URL: /api/projects
Headers: Authorization: Bearer {token}
Content-Type: application/json
Example Request
curl -X POST "https://example.com/api/projects" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"title": "New Project",
"description": "Project description",
"client_id": 1,
"start_date": "1403-07-01",
"deadline": "1403-12-30"
}'
Success Response (201)
{
"record": {
"id": 2,
"title": "New Project",
"client_id": 1,
"start_date": "1403-07-01",
"deadline": "1403-12-30"
}
}
Errors
| Code | Description |
|---|---|
| 401 | Invalid token |
| 422 | Validation error |