Endpoint
POST /api/services/{domain}/{service}/restart
Path Parameters
The domain/namespace of the service
The service name to restart
Request Body
Optional new configuration data to apply when restarting the service.The format depends on the service’s expected configuration format (JSON, TOML, binary, etc.)
Response
Status message indicating restart success or failure
Examples
Restart Without Configuration
curl -X POST http://localhost:9481/api/services/example/hello/restart
{
"status": "Service restarted successfully"
}
Restart With New Configuration
curl -X POST http://localhost:9481/api/services/ai/txt2img/restart \
-H "Content-Type: application/json" \
-d '{"model": "stable-diffusion-v2", "device": "cuda"}'
{
"status": "Service restarted with new configuration"
}
Use Cases
Update Model Configuration
Restart an AI service to load a different model:
curl -X POST http://localhost:9481/api/services/ai/inference/restart \
-H "Content-Type: application/json" \
-d '{"model_path": "/models/llama-3-70b.gguf"}'
Apply Resource Limits
Restart with updated resource constraints:
curl -X POST http://localhost:9481/api/services/data/processor/restart \
-H "Content-Type: application/json" \
-d '{"max_memory_mb": 2048, "max_threads": 4}'
Reload Configuration File
Restart service to pick up configuration file changes:
curl -X POST http://localhost:9481/api/services/example/myservice/restart
Status Codes
Service restarted successfully
Notes
- Restarting a service will interrupt any ongoing requests
- The service may take a few seconds to become available after restart
- Configuration format depends on the service implementation
- Use Quiesce for graceful shutdown before restart if needed
- Restart does not reload the component from the repository; use Reload for that
See Also