v1

latestOpenAPI 3.1.02026-07-177545150.1 KB
Server Management

Toggle Service Api

Toggle a service's enabled/disabled state via JWT authentication (External API).

This endpoint provides the same functionality as POST /api/internal/toggle but uses modern JWT Bearer token authentication.

Authentication: JWT Bearer token (via nginx X-User header) Authorization: Requires valid JWT token from auth system

Request body (form data):

  • path (required): Service path
  • new_state (required): New state (true=enabled, false=disabled)

Response: Returns the updated service status.

Example:

curl -X POST https://registry.example.com/api/servers/toggle \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -F "path=/myservice" \
  -F "new_state=true"
post/api/servers/toggle

Response

Successful Response

{"stackTrail":"paths:/api/servers/toggle:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}