Hosts API
Generated from servtuner commit 5b46cdad0e5c.
GET /hosts
Section titled “GET /hosts”Lists hosts.
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | array of HostResource |
POST /hosts
Section titled “POST /hosts”Registers a host: a GPU machine outside Kubernetes, with its price.
Request body: HostCreate (application/json)
| Status | Meaning | Body |
|---|---|---|
201 |
Successful Response | HostResource |
DELETE /hosts/{host_id}
Section titled “DELETE /hosts/{host_id}”Refused (409) while a managed target names the host.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
host_id |
path | string |
Yes |
| Status | Meaning | Body |
|---|---|---|
204 |
Successful Response | None |
422 |
Validation Error | HTTPValidationError |
GET /hosts/{host_id}
Section titled “GET /hosts/{host_id}”Returns one host.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
host_id |
path | string |
Yes |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | HostResource |
422 |
Validation Error | HTTPValidationError |
PUT /hosts/{host_id}
Section titled “PUT /hosts/{host_id}”Replaces a host.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
host_id |
path | string |
Yes |
Request body: HostCreate (application/json)
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | HostResource |
422 |
Validation Error | HTTPValidationError |
POST /hosts/{host_id}/read-machine
Section titled “POST /hosts/{host_id}/read-machine”Read the machine through the launcher of a host target on it (GET /machine) and keep it as the host’s hardware. 422 when no host target names the host.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
host_id |
path | string |
Yes |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | HostResource |
422 |
Validation Error | HTTPValidationError |