Files
claude-plugins/infraestrutura/skills/easypanel-api/references/services-api.md
T
ealmeida faef9b47dc fix(project-manager): remover Dify KB das descriptions, marcar nota TODO
Dify foi removido 06-03-2026. Skills brainstorm/discover ainda referenciam-no
no corpo. Bump v1.2 + nota top-of-file. Reescrita workflow para próxima sessão.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 04:52:03 +01:00

4.3 KiB

EasyPanel API - Services

Verificado: 12-03-2026 (engenharia reversa do backend.js)

Service Types

Type Descricao
app Aplicacao (Node.js, Python, Go, Rust, etc.)
mysql MySQL database
mariadb MariaDB database
postgres PostgreSQL database
mongo MongoDB database
redis Redis cache

Criar Servico App

curl -s -X POST "http://localhost:3000/api/trpc/services.app.createService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"minha-api"}}'

Criar Servico Database

# PostgreSQL
curl -s -X POST "http://localhost:3000/api/trpc/services.postgres.createService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"minha-db"}}'

# MySQL
curl -s -X POST "http://localhost:3000/api/trpc/services.mysql.createService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"mysql-db"}}'

# Redis
curl -s -X POST "http://localhost:3000/api/trpc/services.redis.createService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"cache"}}'

Inspeccionar Servico (GET)

INPUT='{"json":{"projectName":"descomplicar","serviceName":"dashboard_descomplicar"}}'
ENCODED=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$INPUT'))")
curl -s "http://localhost:3000/api/trpc/services.app.inspectService?input=$ENCODED" \
  -H "Authorization: Bearer $TOKEN"

Response parcial:

{
  "projectName": "descomplicar",
  "name": "dashboard_descomplicar",
  "type": "app",
  "enabled": true,
  "token": "deploy-webhook-token",
  "source": {"type": "git", "repo": "https://...", "ref": "main"},
  "build": {"type": "nixpacks", "buildCommand": "npm run build"},
  "env": "VAR=value",
  "mounts": [],
  "ports": []
}

Deploy Servico

curl -s -X POST "http://localhost:3000/api/trpc/services.app.deployService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"minha-api"}}'

Stop / Start / Restart Servico

# Parar servico
curl -s -X POST "http://localhost:3000/api/trpc/services.app.stopService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"minha-api"}}'

# Iniciar servico
curl -s -X POST "http://localhost:3000/api/trpc/services.app.startService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"minha-api"}}'

# Reiniciar servico
curl -s -X POST "http://localhost:3000/api/trpc/services.app.restartService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"minha-api"}}'

IMPORTANTE: enableService e disableService NAO existem na versao instalada. Usar startService/stopService.

Destruir Servico

curl -s -X POST "http://localhost:3000/api/trpc/services.app.destroyService" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"projectName":"descomplicar","serviceName":"minha-api"}}'

Resumo de Endpoints

Endpoint Tipo Descricao Verificado
services.app.createService POST Criar servico app Sim
services.postgres.createService POST Criar PostgreSQL Sim
services.mysql.createService POST Criar MySQL Sim
services.redis.createService POST Criar Redis Sim
services.app.inspectService GET Inspeccionar servico Sim
services.app.deployService POST Fazer deploy Sim
services.app.stopService POST Parar servico Sim
services.app.startService POST Iniciar servico Sim
services.app.restartService POST Reiniciar servico Sim
services.app.destroyService POST Destruir servico Sim

Endpoints que NAO existem: enableService, disableService, redeployService


Actualizado: 12-03-2026