Actions
Torque Vault Server » History » Revision 8
« Previous |
Revision 8/11
(diff)
| Next »
Trần Lâm Trường, 08/26/2026 03:33 PM
Torque Vault Server¶
Plans¶
- Migrate the source code from Gitlab to Gitea.
- Switch to
developbranch to continue development. - Standardize responses from API:
-
Overview:
All APIs in the system follow a consistent response contract based on RESTful principles.
Principles:- HTTP status codes are the source of truth for the outcome of a request.
- Successful responses return data in the
datafield. - Error responses return a standardized
codeandmessage. - Paginated collection responses include a
metaobject containing pagination information. - Validation errors include an additional
errorsfield with field-level validation details. - All endpoints must follow the same response structure to ensure consistency across frontend, backend, and external integrations.
-
Success response:
- List resource (no pagination):
GET /api/v1/able-work-order?wo_id=1
=>200 OK
- List resource (pagination):
GET /api/v1/work-orders?page=1&page_size=20
=>200 OK
{ "data": [ WorkOrder_Object, WorkOrder_Object, ], "meta": { "page": 1, "page_size": 20, "total_pages": 7 } }- Retrieve detail:
GET /api/v1/work-orders/1
=>200 OK
- Create resource:
POST /api/v1/work-orders
=>201 Created
- Update resource:
PUT/PATCH /api/v1/work-orders/1
=>200 OK
- Delete resource:
DELETE /api/v1/work-orders/1
=>204 No Content
- List resource (no pagination):
-
Error response:
- Validation Error:
POST /api/v1/work-orders
=>400 Bad Request
{ "code": "VALIDATION_ERROR", "message": "Validation failed", "errors": { "make": [ "This field is required." ], "employee": [ "This field is required." ] } }- Resource Not Found:
PATCH /api/v1/work-orders/1
=>404 Not Found
- Validation Error:
-
- Develop an API endpoint for the mobile app home screen to retrieve all work orders whose status is Open, Retorque, Servicing, or Re-servicing.
- Migrate the
Help / Instructionsfeature fromwalmartbranch todevelopbranch. - Improve Backend, cache, rate limit,..
- CI CD integration.
Updated by Trần Lâm Trường about 1 month ago · 11 revisions