API Doc
Route Sandard
The routes are standardized with this rule:
Find all
GET /:role/:resources
Ex: /developer/projects
Find one by id
GET /:role/:resources/:id
Ex: /admin/projects/1
Create
POST /:role/:resources
Ex: /admin/projects
Update
PATCH /:role/:resources/:id/:field
Ex: /admin/projects/1/name
Delete
DELETE /:role/:resources/:id
Ex: /admin/projects
Body standard
For a write request, the payload should follow this:
{
"resource": {
"field_in_snake_case": "value"
}
}
Error message standard
The error messages are written in upper case and snake case
{RESOURCE}_{FIELD}_{ERROR REASON}
Ex: PROJECT_NAME_REQUIRED
Authentication
{"auth":{"username":"{{username}}","password":"{{password}}"}}
POST /api/auth/token HTTP/1.1
Host: {{host}}
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"auth": {
"username": "{{username}}",
"password": "{{password}}"
}
}
Successful response
No content
This endpoint return a access token.
Keep it and send it in Authorization header for all secured endpoint
Non standard endpoint
Launch a build from project
@Return executor id
3
{"build":{"ignore_steps":[]}}
POST /api/developer/builds/{projectId} HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"build": {
"ignore_steps": []
}
}
Successful response
No content
@Return queued tasks
@Return executed build
Check if notification configuration working
@Return 200, even if the email is not sent
romainlavabre98@gmail.com
POST /api/admin/config/mail/test/{recipient} HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
Ping, healtcheck
@Return void
@Return pagined project list
1
DESC
GET /api/developer/paginations/project HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
@Return pagined developer list
1
DESC
GET /api/developer/paginations/developer HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
@Return pagined secret list
1
DESC
GET /api/developer/paginations/secret HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
Last updated