Endpoints for server provisioning
2
- http
- application/json
- application/json
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /definition/{hostname}/{type} | get definition hostname type | Return the waitron configuration details for a machine. Note that "build type" is technically not required, depending on your config. |
| GET | /done/{hostname}/{token} | get done hostname token | Remove the server from build mode |
| GET | /health | get health | Check that Waitron is running |
| GET | /job/{token} | get job token | Return details for the specified job token |
| GET | /status | get status | Dictionary with jobs and status |
| GET | /status/{hostname} | get status hostname | Build status of the server |
| GET | /template/{template}/{hostname}/{token} | get template template hostname token | Render either the finish or the preseed template |
| GET | /v1/boot/{macaddr} | get v1 boot macaddr | Dictionary with kernel, intrd(s) and commandline for pixiecore |
| PUT | /build/{hostname}/{type} | put build hostname type | Put the server in build mode |
| PUT | /cancel/{hostname}/{token} | put cancel hostname token | Remove the server from build mode |
| PUT | /cleanhistory | put cleanhistory | Clear all completed jobs from the in-memory history of Waitron |
Return the waitron configuration details for a machine. Note that "build type" is technically not required, depending on your config. (GetDefinitionHostnameType)
GET /definition/{hostname}/{type}
Return the waitron configuration details for a machine
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| hostname | path |
string | string |
✓ | Hostname | ||
| type | path |
string | string |
✓ | Build Type |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | Machine config in JSON format. | schema | |
| 404 | Not Found | Unable to find host definition for '' '<build_type>' '' | schema | |
| 500 | Internal Server Error | Bad machine data for '' '<build_type>' '' | schema |
Status: OK
Status: Not Found
Status: Internal Server Error
GET /done/{hostname}/{token}
Remove the server from build mode
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| hostname | path |
string | string |
✓ | Hostname | ||
| token | path |
string | string |
✓ | Token |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | {"State": "OK"} | schema | |
| 500 | Internal Server Error | Failed to finish build mode | schema |
Status: OK
Status: Internal Server Error
GET /health
Check that Waitron is running
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | {"State": "OK"} | schema |
Status: OK
GET /job/{token}
Return details for the specified job token
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| token | path |
string | string |
✓ | Token |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | Job details in JSON format. | schema | |
| 404 | Not Found | Job not found | schema |
Status: OK
Status: Not Found
GET /status
Dictionary with jobs and status
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | Dictionary with jobs and status | schema | |
| 500 | Internal Server Error | The error encountered | schema |
Status: OK
Status: Internal Server Error
GET /status/{hostname}
Build status of the server
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| hostname | path |
string | string |
✓ | Hostname |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | The status: (installing or installed) | schema | |
| 404 | Not Found | Failed to find active job for host | schema |
Status: OK
Status: Not Found
GET /template/{template}/{hostname}/{token}
Render either the finish or the preseed template
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| hostname | path |
string | string |
✓ | Hostname | ||
| template | path |
string | string |
✓ | The template to be rendered | ||
| token | path |
string | string |
✓ | Token |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | Rendered template | schema | |
| 400 | Bad Request | Unable to render template | schema |
Status: OK
Status: Bad Request
GET /v1/boot/{macaddr}
Dictionary with kernel, intrd(s) and commandline for pixiecore
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| macaddr | path |
string | string |
✓ | MacAddress |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | Dictionary with kernel, intrd(s) and commandline for pixiecore | schema | |
| 500 | Internal Server Error | failed to get pxe config: | schema |
Status: OK
Status: Internal Server Error
PUT /build/{hostname}/{type}
Put the server in build mode
- application/json
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| hostname | path |
string | string |
✓ | Hostname | ||
| type | path |
string | string |
✓ | Build Type | ||
| {object} | body |
string | string |
✓ | Machine definition if desired. Can be used to override nearly all properties of a compiled machine. See examples directory for machine definition. |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | {"State": "OK", "Token": } | schema | |
| 500 | Internal Server Error | Failed to set build mode on hostname | schema |
Status: OK
Status: Internal Server Error
PUT /cancel/{hostname}/{token}
Remove the server from build mode
- application/json
- application/json
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| hostname | path |
string | string |
✓ | Hostname | ||
| token | path |
string | string |
✓ | Token | ||
| {object} | body |
string | string |
✓ | Machine definition if desired. Can be used to override nearly all properties of a compiled machine. See examples directory for machine definition. |
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | {"State": "OK"} | schema | |
| 500 | Internal Server Error | Failed to cancel build mode | schema |
Status: OK
Status: Internal Server Error
PUT /cleanhistory
Clear all completed jobs from the in-memory history of Waitron
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | {"State": "OK"} | schema | |
| 500 | Internal Server Error | Failed to clean history | schema |
Status: OK
Status: Internal Server Error