RapidPM REST API documentation.
| Environment | URL |
|---|---|
| Production | https://rapidpm.uk/api |
| Test | https://test.rapidpm.uk/api |
| Local | http://localhost:8080/api |
All API requests (except login) require a JWT token in the Authorization header:
Authorization: Bearer <token>
POST /api/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123"
}
Response:
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"user_id": 1,
"email": "user@example.com",
"name": "John Doe"
}
}
GET /api/health
Response:
{
"status": "healthy"
}
GET /api/metrics
Returns Prometheus-format metrics.
GET /api/projects
Response:
{
"projects": [
{
"project_id": 1,
"project_name": "Website Redesign",
"company_id": 1,
"start": "2024-01-01",
"end": "2024-06-30"
}
]
}
GET /api/projects/{project_id}
POST /api/projects
Content-Type: application/json
{
"project_name": "New Project",
"company_id": 1,
"start": "2024-01-01",
"end": "2024-12-31"
}
PUT /api/projects/{project_id}
Content-Type: application/json
{
"project_name": "Updated Name"
}
DELETE /api/projects/{project_id}
GET /api/get_gantt_data/{project_id}
Returns all tasks for a project formatted for Gantt chart display.
Response:
{
"tasks": [
{
"task_id": 1,
"task_name": "Design Phase",
"planned_start": "2024-01-01",
"planned_end": "2024-01-31",
"progress": 0.5,
"parent_task_id": null,
"display_order": 1
}
]
}
POST /api/tasks
Content-Type: application/json
{
"task_name": "New Task",
"project_id": 1,
"planned_start": "2024-01-01",
"planned_end": "2024-01-15"
}
PUT /api/update_task_data
Content-Type: application/json
{
"task_id": 1,
"task_name": "Updated Task Name",
"progress": 0.75
}
PUT /api/reorder_tasks
Content-Type: application/json
{
"project_id": 1,
"task_id": 5,
"dropIndex": 2,
"fromIndex": 5
}
DELETE /api/tasks/{task_id}
GET /api/artefacts?project_id={project_id}
GET /api/artefacts/{artefact_id}
POST /api/artefacts
Content-Type: multipart/form-data
file: <file>
artefact_name: "Document.docx"
project_id: 1
container_id: 1
PUT /api/artefacts/{artefact_id}
Content-Type: application/json
{
"artefact_name": "Updated Name"
}
DELETE /api/artefacts/{artefact_id}
GET /api/download/{artefact_id}
Returns file content with appropriate Content-Type header.
GET /api/users/me
GET /api/users?company_id={company_id}
PUT /api/users/{user_id}
Content-Type: application/json
{
"name": "New Name"
}
GET /api/timesheets?user_id={user_id}&start={date}&end={date}
POST /api/timesheets
Content-Type: application/json
{
"user_id": 1,
"task_id": 1,
"date": "2024-01-15",
"hours": 8,
"description": "Worked on feature X"
}
PUT /api/timesheets/{timesheet_id}
Content-Type: application/json
{
"hours": 6
}
DELETE /api/timesheets/{timesheet_id}
GET /api/v1/onlyoffice/editor/{artefact_id}?mode={view|edit}
Returns OnlyOffice editor configuration including JWT token.
POST /api/v1/onlyoffice/callback
Content-Type: application/json
{
"key": "document_key",
"status": 2,
"url": "https://onlyoffice.../download"
}
GET /api/v1/onlyoffice/health
All errors follow this format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message"
}
}
| Code | HTTP Status | Description |
|---|---|---|
AUTH_INVALID |
401 | Invalid credentials |
AUTH_EXPIRED |
401 | Token expired |
NOT_FOUND |
404 | Resource not found |
FORBIDDEN |
403 | Permission denied |
VALIDATION_ERROR |
400 | Invalid input |
SERVER_ERROR |
500 | Internal error |
X-RateLimit-Remaining shows remaining requestsList endpoints support pagination:
GET /api/projects?page=1&per_page=20
Response includes:
{
"items": [...],
"total": 100,
"page": 1,
"per_page": 20,
"pages": 5
}