http://127.0.0.1:9093
The access-token header is required for all requests. You can find your token in ~/.eternal/config.yaml.
All responses follow this JSON structure:
{
"code": 200,
"message": "success",
"data": { ... }
}GET /v1/processes
Returns a list of all services, their current running status, and whether they are enabled to start on boot.
Response:
{
"code": 200,
"message": "success",
"data": [
{
"name": "test-service",
"status": "running",
"enabled": true
}
]
}GET /v1/processes/:name
Returns the status of a specific service.
Response:
{
"code": 200,
"message": "success",
"data": {
"name": "test-service",
"status": "running"
}
}PUT /v1/processes/:name
Creates a new service configuration.
Request Body:
{
"exec": "sleep 100", // Required: Command to execute
"dir": "/tmp" // Optional: Working directory
}Response:
{
"code": 200,
"message": "service created"
}POST /v1/processes/:name/start
Starts a stopped service.
Response:
{
"code": 200,
"message": "process started successfully",
"data": {
"name": "test_service",
"status": "running"
}
}POST /v1/processes/:name/stop
Stops a running service.
Response:
{
"code": 200,
"message": "process stopped successfully",
"data": {
"name": "test_service",
"status": "stopped"
}
}POST /v1/processes/:name/restart
Restarts a service.
Response:
{
"code": 200,
"message": "process restarted successfully",
"data": {
"name": "test_service",
"status": "running"
}
}POST /v1/processes/:name/enable
Enables a service to start automatically on daemon startup.
Response:
{
"code": 200,
"message": "service enabled",
"data": {
"name": "test_service",
"status": "stopped"
}
}POST /v1/processes/:name/disable
Disables a service from starting automatically.
Response:
{
"code": 200,
"message": "service disabled",
"data": {
"name": "test_service",
"status": "stopped"
}
}DELETE /v1/processes/:name
Stops the service (if running), disables it, and deletes the configuration file.
Response:
{
"code": 200,
"message": "service deleted"
}