Skip to content

codex-team/devops-toolbox-api

Repository files navigation

DevOps Toolbox API

Development guide

To run application in Docker:

  1. Fill .env file with necessary values (see .env.example)
  2. Run the docker-compose: Development mode with hot-reloading:
    docker-compose -f docker-compose.dev.yml up
    Production mode:
    docker-compose -f docker-compose.prod.yml up

API

REST API routes

The REST API used for communication between agents and the backend.

Authorization

All the REST request requires the authorization via the Authorization header:

Authorization: Bearer <Integration Token>

PUT /services

Route for updating the information about the services running of observed server.

Fields
Field Type Required Description
services Service[] yes List of all found services
Example
{
    "services": [
        {
            "type": "nginx",
            "payload": [
                {
                    "server_name": "api.notes.codex.so",
                    "listen": [
                        "443"
                    ],
                    "proxy_pass": [
                        "http://127.0.0.1:5500/"
                    ]
                }
            ]
        }
    ]
}
Response
Field Type Description
success boolean true on successful saving, otherwise false
workspace Workspace Updated workspace info

CTProto API

The communication between the backend and clients is going through the CodeX Transport Protocol.

All supported messages will be listed below.

authorize

Message for authorization required by protocol.

Payload
Field Type Required Description
token string yes Client Authorization token
Example
{
  "type": "authorize",
  "messageId": "deo2BInCZC",
  "payload": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
  }
}
Response
Field Type Description
workspaceIds string[] Owned workspaces ids

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published