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

Drawing
Worfklow

Authentication

post
Body
objectOptionalExample: {"auth":{"username":"{{username}}","password":"{{password}}"}}
Responses
200
Successful response
application/json
post
POST /api/auth/token HTTP/1.1
Host: {{host}}
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "auth": {
    "username": "{{username}}",
    "password": "{{password}}"
  }
}
200

Successful response

No content

This endpoint return a access token.

Keep it and send it in Authorization header for all secured endpoint

UserInfo

get
Authorizations
Responses
200
Successful response
application/json
get
GET /api/user/info HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

Non standard endpoint

Launch a build from project

@Return executor id

LaunchBuildByProjectId

post
Authorizations
Path parameters
projectIdintegerRequiredExample: 3
Body
objectOptionalExample: {"build":{"ignore_steps":[]}}
Responses
200
Successful response
application/json
post
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": []
  }
}
200

Successful response

No content

@Return queued tasks

GetQueueds

get
Authorizations
Responses
200
Successful response
application/json
get
GET /api/developer/builds/queueds HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

@Return executed build

GetExecuteds

get
Authorizations
Responses
200
Successful response
application/json
get
GET /api/developer/builds/executeds HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

Check if notification configuration working

@Return 200, even if the email is not sent

TestEmail

post
Authorizations
Path parameters
recipientstringRequiredExample: romainlavabre98@gmail.com
Body
Responses
200
Successful response
application/json
post
POST /api/admin/config/mail/test/{recipient} HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

Ping, healtcheck

@Return void

Ping

get
Responses
200
Successful response
application/json
get
GET /api/guest/ping HTTP/1.1
Host: {{host}}
Accept: */*
200

Successful response

No content

@Return pagined project list

ProjectPagination

get
Authorizations
Query parameters
pageintegerOptionalExample: 1
orderBystringOptionalExample: DESC
Responses
200
Successful response
application/json
get
GET /api/developer/paginations/project HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

@Return pagined developer list

DeveloperPagination

get
Authorizations
Query parameters
pageintegerOptionalExample: 1
orderBystringOptionalExample: DESC
Responses
200
Successful response
application/json
get
GET /api/developer/paginations/developer HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

@Return pagined secret list

SecretPagination

get
Authorizations
Query parameters
pageintegerOptionalExample: 1
orderBystringOptionalExample: DESC
Responses
200
Successful response
application/json
get
GET /api/developer/paginations/secret HTTP/1.1
Host: {{host}}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

Last updated