API Reference

GAGOS exposes a REST API for all functionality. Base URL: /api/v1

Health & Info

GET /api/health      # Health check
GET /api/version     # Version info

Network Tools

Ping

POST /api/v1/network/ping
{
  "host": "google.com",
  "count": 4
}

DNS Lookup

POST /api/v1/network/dns
{
  "host": "example.com",
  "record_type": "A"
}

Port Check

POST /api/v1/network/port-check
{
  "host": "db.example.com",
  "port": 5432
}

Traceroute

POST /api/v1/network/traceroute
{
  "host": "8.8.8.8",
  "max_hops": 30
}

Kubernetes

Resources

GET /api/v1/k8s/namespaces
GET /api/v1/k8s/nodes
GET /api/v1/k8s/pods/:namespace
GET /api/v1/k8s/services/:namespace
GET /api/v1/k8s/deployments/:namespace
GET /api/v1/k8s/configmaps/:namespace
GET /api/v1/k8s/secrets/:namespace

Operations

POST /api/v1/k8s/apply              # Create/Update resource
DELETE /api/v1/k8s/:kind/:ns/:name  # Delete resource
POST /api/v1/k8s/scale              # Scale deployment

CI/CD

Pipelines

GET    /api/v1/cicd/pipelines
POST   /api/v1/cicd/pipelines
GET    /api/v1/cicd/pipelines/:id
DELETE /api/v1/cicd/pipelines/:id
POST   /api/v1/cicd/pipelines/:id/trigger

Runs

GET  /api/v1/cicd/runs
GET  /api/v1/cicd/runs/:id
POST /api/v1/cicd/runs/:id/cancel

SSH Hosts

GET    /api/v1/cicd/ssh/hosts
POST   /api/v1/cicd/ssh/hosts
PUT    /api/v1/cicd/ssh/hosts/:id
DELETE /api/v1/cicd/ssh/hosts/:id
POST   /api/v1/cicd/ssh/hosts/:id/test

Freestyle Jobs

GET    /api/v1/cicd/freestyle/jobs
POST   /api/v1/cicd/freestyle/jobs
PUT    /api/v1/cicd/freestyle/jobs/:id
DELETE /api/v1/cicd/freestyle/jobs/:id
POST   /api/v1/cicd/freestyle/jobs/:id/build

Database

PostgreSQL

POST /api/v1/db/postgres/connect
POST /api/v1/db/postgres/query
POST /api/v1/db/postgres/tables
POST /api/v1/db/postgres/schema

MySQL

POST /api/v1/db/mysql/connect
POST /api/v1/db/mysql/query
POST /api/v1/db/mysql/tables

Redis

POST /api/v1/db/redis/connect
POST /api/v1/db/redis/keys
POST /api/v1/db/redis/get
POST /api/v1/db/redis/command

S3 Storage

POST /api/v1/storage/s3/connect
POST /api/v1/storage/s3/buckets
POST /api/v1/storage/s3/objects
POST /api/v1/storage/s3/upload
POST /api/v1/storage/s3/download
POST /api/v1/storage/s3/presign

Elasticsearch

POST /api/v1/elasticsearch/connect
POST /api/v1/elasticsearch/health
POST /api/v1/elasticsearch/indices
POST /api/v1/elasticsearch/search
POST /api/v1/elasticsearch/query

Dev Tools

POST /api/v1/devtools/base64/encode
POST /api/v1/devtools/base64/decode
POST /api/v1/devtools/hash
POST /api/v1/devtools/cert/parse
POST /api/v1/devtools/ssh/generate
POST /api/v1/devtools/json/format
POST /api/v1/devtools/diff

Authentication

All API endpoints require authentication via session cookie obtained from login.

POST /api/auth/login
{
  "password": "your-password"
}

POST /api/auth/logout