Skip to content

Latest commit

 

History

History
504 lines (265 loc) · 15.1 KB

File metadata and controls

504 lines (265 loc) · 15.1 KB

Waitron

Endpoints for server provisioning

Informations

Version

2

Contact

Content negotiation

URI Schemes

  • http

Consumes

  • application/json

Produces

  • application/json

All endpoints

operations

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

Paths

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

Parameters

Name Source Type Go type Separator Required Default Description
hostname path string string Hostname
type path string string Build Type

All responses

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

Responses

200 - Machine config in JSON format.

Status: OK

Schema
404 - Unable to find host definition for '' '<build_type>' ''

Status: Not Found

Schema
500 - Bad machine data for '' '<build_type>' ''

Status: Internal Server Error

Schema

Remove the server from build mode (GetDoneHostnameToken)

GET /done/{hostname}/{token}

Remove the server from build mode

Parameters

Name Source Type Go type Separator Required Default Description
hostname path string string Hostname
token path string string Token

All responses

Code Status Description Has headers Schema
200 OK {"State": "OK"} schema
500 Internal Server Error Failed to finish build mode schema

Responses

200 - {"State": "OK"}

Status: OK

Schema
500 - Failed to finish build mode

Status: Internal Server Error

Schema

Check that Waitron is running (GetHealth)

GET /health

Check that Waitron is running

All responses

Code Status Description Has headers Schema
200 OK {"State": "OK"} schema

Responses

200 - {"State": "OK"}

Status: OK

Schema

Return details for the specified job token (GetJobToken)

GET /job/{token}

Return details for the specified job token

Parameters

Name Source Type Go type Separator Required Default Description
token path string string Token

All responses

Code Status Description Has headers Schema
200 OK Job details in JSON format. schema
404 Not Found Job not found schema

Responses

200 - Job details in JSON format.

Status: OK

Schema
404 - Job not found

Status: Not Found

Schema

Dictionary with jobs and status (GetStatus)

GET /status

Dictionary with jobs and status

All responses

Code Status Description Has headers Schema
200 OK Dictionary with jobs and status schema
500 Internal Server Error The error encountered schema

Responses

200 - Dictionary with jobs and status

Status: OK

Schema
500 - The error encountered

Status: Internal Server Error

Schema

Build status of the server (GetStatusHostname)

GET /status/{hostname}

Build status of the server

Parameters

Name Source Type Go type Separator Required Default Description
hostname path string string Hostname

All responses

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

Responses

200 - The status: (installing or installed)

Status: OK

Schema
404 - Failed to find active job for host

Status: Not Found

Schema

Render either the finish or the preseed template (GetTemplateTemplateHostnameToken)

GET /template/{template}/{hostname}/{token}

Render either the finish or the preseed template

Parameters

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

All responses

Code Status Description Has headers Schema
200 OK Rendered template schema
400 Bad Request Unable to render template schema

Responses

200 - Rendered template

Status: OK

Schema
400 - Unable to render template

Status: Bad Request

Schema

Dictionary with kernel, intrd(s) and commandline for pixiecore (GetV1BootMacaddr)

GET /v1/boot/{macaddr}

Dictionary with kernel, intrd(s) and commandline for pixiecore

Parameters

Name Source Type Go type Separator Required Default Description
macaddr path string string MacAddress

All responses

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

Responses

200 - Dictionary with kernel, intrd(s) and commandline for pixiecore

Status: OK

Schema
500 - failed to get pxe config:

Status: Internal Server Error

Schema

Put the server in build mode (PutBuildHostnameType)

PUT /build/{hostname}/{type}

Put the server in build mode

Consumes

  • application/json

Produces

  • application/json

Parameters

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.

All responses

Code Status Description Has headers Schema
200 OK {"State": "OK", "Token": } schema
500 Internal Server Error Failed to set build mode on hostname schema

Responses

200 - {"State": "OK", "Token": }

Status: OK

Schema
500 - Failed to set build mode on hostname

Status: Internal Server Error

Schema

Remove the server from build mode (PutCancelHostnameToken)

PUT /cancel/{hostname}/{token}

Remove the server from build mode

Consumes

  • application/json

Produces

  • application/json

Parameters

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.

All responses

Code Status Description Has headers Schema
200 OK {"State": "OK"} schema
500 Internal Server Error Failed to cancel build mode schema

Responses

200 - {"State": "OK"}

Status: OK

Schema
500 - Failed to cancel build mode

Status: Internal Server Error

Schema

Clear all completed jobs from the in-memory history of Waitron (PutCleanhistory)

PUT /cleanhistory

Clear all completed jobs from the in-memory history of Waitron

All responses

Code Status Description Has headers Schema
200 OK {"State": "OK"} schema
500 Internal Server Error Failed to clean history schema

Responses

200 - {"State": "OK"}

Status: OK

Schema
500 - Failed to clean history

Status: Internal Server Error

Schema

Models