mr-provisioner API API Reference
Provision in style
Request Content-Types: application/json, multipart/form-data
Response Content-Types: application/json
Schemes: http, https
Version: 1.0
Authentication
Bearer
Send an authorization header with a bearer token. Set the value to Bearer <someToken>
.
Machines
List machines
This endpoint returns a list of either all machines or all machines assigned to the user.
If set, restrict machines to those matching the given query.
If true, show all machines instead of just machines assigned to me.
Response Example (200 OK)
[
{
"id": "integer",
"name": "string",
"hostname": "string",
"arch": "string",
"initrd_id": "integer",
"kernel_id": "integer",
"kernel_opts": "string",
"preseed_id": "integer",
"netboot_enabled": "boolean"
}
]
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Reserve a machine matching a query
This endpoint assigns an unused machine, optionally matching criteria in a query, to the user.
undefined
Request Example
{
"query": "string",
"reason": "string"
}
The newly assigned machine
No machine matching the criteria is available
Unexpected error
Response Example (200 OK)
{
"id": "integer",
"name": "string",
"hostname": "string",
"arch": "string",
"initrd_id": "integer",
"kernel_id": "integer",
"kernel_opts": "string",
"preseed_id": "integer",
"netboot_enabled": "boolean"
}
Response Example (404 Not Found)
{
"error_type": "string",
"errors": [
"string"
]
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get machine
This endpoint returns a machine.
(no description)
Response Example (200 OK)
{
"id": "integer",
"name": "string",
"hostname": "string",
"arch": "string",
"initrd_id": "integer",
"kernel_id": "integer",
"kernel_opts": "string",
"preseed_id": "integer",
"netboot_enabled": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Modify machine
This endpoint modifies a machine's provisioning information.
undefined
(no description)
Request Example
{
"subarch": "string",
"initrd_id": "integer",
"kernel_id": "integer",
"kernel_opts": "string",
"preseed_id": "integer",
"netboot_enabled": "boolean"
}
Response Example (200 OK)
{
"id": "integer",
"name": "string",
"hostname": "string",
"arch": "string",
"initrd_id": "integer",
"kernel_id": "integer",
"kernel_opts": "string",
"preseed_id": "integer",
"netboot_enabled": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get machine power state
This endpoint returns a machine's power state.
(no description)
A machine power state
Unexpected error
Response Example (200 OK)
{
"state": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Change machine power state
This endpoint changes a machine's power state.
undefined
(no description)
Request Example
{
"state": "string"
}
Empty (Accepted)
Unexpected error
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get machine state
This endpoint returns a machine's state.
(no description)
A machine state
Unexpected error
Response Example (200 OK)
{
"state": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Effect a machine state change
This endpoint changes a machine's state:
provision
: enables netboot on the machine, pxe-reboots it, and sets the state toprovisioning
.
undefined
(no description)
Request Example
{
"state": "string"
}
New machine state
Unexpected error
Response Example (202 Accepted)
{
"state": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Change machine state without further side-effects
This endpoint changes a machine's state without further side-effects.
undefined
(no description)
Request Example
{
"state": "string"
}
New machine state
Unexpected error
Response Example (200 OK)
{
"state": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Establish console connection credentials/information
This endpoint creates ephemeral console connection credentials and provides connection details.
If the host
field of the response is null
, the websocket connection should be to the same host as the API call.
The websocket URL to connect to is built as follows: ws://[host or API host]:[port]/ws?token=[token]
, or using wss://
instead of ws://
if using secure sockets.
(no description)
Console connection information
Unexpected error
Response Example (202 Accepted)
{
"host": "string",
"port": "integer",
"token": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
List machine interfaces
This endpoint returns a machine's interfaces.
(no description)
A machine's interfaces
Unexpected error
Response Example (200 OK)
[
{
"id": "integer",
"identifier": "string",
"mac": "string",
"network_name": "string",
"subnetv4": "string",
"netmaskv4": "string",
"prefixlenv4": "string",
"static_pool_v4": "string",
"reserved_pool_v4": "string",
"config_type_v4": "string",
"configured_ipv4": "string",
"lease_ipv4": "string",
"last_seen_date": "string"
}
]
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get a machine interface
This endpoint returns a machine's interfaces.
(no description)
(no description)
A machine interface
Unexpected error
Response Example (200 OK)
{
"id": "integer",
"identifier": "string",
"mac": "string",
"network_name": "string",
"subnetv4": "string",
"netmaskv4": "string",
"prefixlenv4": "string",
"static_pool_v4": "string",
"reserved_pool_v4": "string",
"config_type_v4": "string",
"configured_ipv4": "string",
"lease_ipv4": "string",
"last_seen_date": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Modify machine interface
This endpoint modifies a machine interface.
undefined
(no description)
(no description)
Request Example
{
"identifier": "string",
"config_type_v4": "string",
"configured_ipv4": "string"
}
The modified interface
Unable to assign an IP automatically or conflicting identifier
Unexpected error
Response Example (200 OK)
{
"id": "integer",
"identifier": "string",
"mac": "string",
"network_name": "string",
"subnetv4": "string",
"netmaskv4": "string",
"prefixlenv4": "string",
"static_pool_v4": "string",
"reserved_pool_v4": "string",
"config_type_v4": "string",
"configured_ipv4": "string",
"lease_ipv4": "string",
"last_seen_date": "string"
}
Response Example (409 Conflict)
{
"error_type": "string",
"errors": [
"string"
]
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
List machine assignees
This endpoint returns a machine's assignees.
(no description)
A machine's assignees
Unexpected error
Response Example (200 OK)
[
{
"id": "integer",
"user": "string",
"reason": "string"
}
]
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Assign machine to a user (create a new assignment)
This endpoint adds an assignee to a machine.
undefined
(no description)
Request Example
{
"user": "string",
"reason": "string"
}
The newly assigned assignee object
Unexpected error
Response Example (201 Created)
{
"id": "integer",
"user": "string",
"reason": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get a machine assignee
This endpoint returns a machine's assignee.
(no description)
(no description)
A machine assignee
Unexpected error
Response Example (200 OK)
{
"id": "integer",
"user": "string",
"reason": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Modify machine assignee
This endpoint modifies a machine assignee.
undefined
(no description)
(no description)
Request Example
{
"reason": "string"
}
The modified assignee
Unexpected error
Response Example (200 OK)
{
"id": "integer",
"user": "string",
"reason": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Remove a machine assignee
This endpoint removes a machine assignee.
(no description)
(no description)
Empty
Unexpected error
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get own machine assignee
This endpoint returns a machine's assignee if the caller is assigned to this particular machine.
(no description)
Caller's assignment to this machine
Unexpected error
Response Example (200 OK)
{
"id": "integer",
"user": "string",
"reason": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Modify machine assignment when the caller of the call is the assignee
This endpoint modifies a machine assignee.
undefined
(no description)
Request Example
{
"reason": "string"
}
The modified assignee
Unexpected error
Response Example (200 OK)
{
"id": "integer",
"user": "string",
"reason": "string"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Remove a machine from the caller's list of assignments
This endpoint removes the caller of the endpoint from the assignees list of a machine.
(no description)
Empty
Unexpected error
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Images
List images
This endpoint returns a list of either all machines or all machines assigned to the user.
If true, show all machines instead of just my own images.
Response Example (200 OK)
[
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"arch": "string",
"upload_date": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
]
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Create image
This endpoint creates a new image with a multipart file upload.
The file to upload.
JSON of ImageCreateOrModify type:
Response Example (201 Created)
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"arch": "string",
"upload_date": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get image
This endpoint returns an image.
(no description)
Response Example (200 OK)
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"arch": "string",
"upload_date": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Modify image
This endpoint modifies an image's metadata.
undefined
(no description)
Request Example
{
"description": "string",
"type": "string",
"arch": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (200 OK)
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"arch": "string",
"upload_date": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Delete image
This endpoint deletes an image.
(no description)
Empty
Unexpected error
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Preseeds
List preseeds
This endpoint returns a list of either all machines or all machines assigned to the user.
If true, show all machines instead of just my own preseeds.
Response Example (200 OK)
[
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
]
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Create preseed
This endpoint creates a new preseed.
undefined
Request Example
{
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (201 Created)
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Get preseed
This endpoint returns an preseed.
(no description)
Response Example (200 OK)
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Modify preseed
This endpoint modifies an preseed's metadata.
undefined
(no description)
Request Example
{
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (200 OK)
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Delete preseed
This endpoint deletes an preseed.
(no description)
Empty
Unexpected error
Response Example (default )
{
"error_type": "string",
"errors": [
"string"
]
}
Schema Definitions
Machine: object
- id: integer
- name: string
-
Name
- hostname: string
-
Hostname
- arch: string
-
Architecture
- initrd_id: integer
-
ID of initrd to use for netboot
- kernel_id: integer
-
ID of kernel to use for netboot
- kernel_opts: string
-
Kernel command line
- preseed_id: integer
-
ID of preseed to use for installation/boot
- netboot_enabled: boolean
-
Whether machine should netboot
Example
{
"id": "integer",
"name": "string",
"hostname": "string",
"arch": "string",
"initrd_id": "integer",
"kernel_id": "integer",
"kernel_opts": "string",
"preseed_id": "integer",
"netboot_enabled": "boolean"
}
MachineModify: object
- subarch: string
-
Name of a subarchitecture of the machine's architecture
- initrd_id: integer
-
ID of initrd to use for netboot
- kernel_id: integer
-
ID of kernel to use for netboot
- kernel_opts: string
-
Kernel command line
- preseed_id: integer
-
ID of preseed to use for installation/boot
- netboot_enabled: boolean
-
Whether machine should netboot
Example
{
"subarch": "string",
"initrd_id": "integer",
"kernel_id": "integer",
"kernel_opts": "string",
"preseed_id": "integer",
"netboot_enabled": "boolean"
}
MachineInterface: object
- id: integer
- identifier: string
- mac: string
- network_name: string
- subnetv4: string
- netmaskv4: string
- prefixlenv4: string
- static_pool_v4: string
- reserved_pool_v4: string
- config_type_v4: string static, dynamic-reserved, dynamic
- configured_ipv4: string
- lease_ipv4: string
- last_seen_date: string
Example
{
"id": "integer",
"identifier": "string",
"mac": "string",
"network_name": "string",
"subnetv4": "string",
"netmaskv4": "string",
"prefixlenv4": "string",
"static_pool_v4": "string",
"reserved_pool_v4": "string",
"config_type_v4": "string",
"configured_ipv4": "string",
"lease_ipv4": "string",
"last_seen_date": "string"
}
MachineInterfaceModify: object
- identifier: string
- config_type_v4: string static, dynamic-reserved, dynamic
- configured_ipv4: string
Example
{
"identifier": "string",
"config_type_v4": "string",
"configured_ipv4": "string"
}
MachineAssignee: object
- id: integer
- user: string
- reason: string
Example
{
"id": "integer",
"user": "string",
"reason": "string"
}
MachineAssigneeCreate: object
- user: string
- reason: string
Example
{
"user": "string",
"reason": "string"
}
MachinePowerStateModify: object
- state: string on, off, reboot, pxe_reboot, bios_reboot, disk_reboot
Example
{
"state": "string"
}
MachineState: object
- state: string ready, provisioning, error, unknown
Example
{
"state": "string"
}
MachineReservation: object
- query: string
-
A valid query, e.g. (= bmc_type "moonshot") or
null
to match any machine. - reason: string
Example
{
"query": "string",
"reason": "string"
}
ConsoleConnection: object
- host: string
- port: integer
- token: string
Example
{
"host": "string",
"port": "integer",
"token": "string"
}
Image: object
- id: integer
- name: string
- description: string
- type: string Kernel, Initrd, bootloader
- arch: string
- upload_date: string
- user: string
- known_good: boolean
- public: boolean
Example
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"arch": "string",
"upload_date": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
ImageCreateOrModify: object
- description: string
- type: string Kernel, Initrd
- arch: string
- known_good: boolean
- public: boolean
Example
{
"description": "string",
"type": "string",
"arch": "string",
"known_good": "boolean",
"public": "boolean"
}
Preseed: object
- id: integer
- name: string
- description: string
- type: string preseed, kickstart, autoyast
- content: string
- user: string
- known_good: boolean
- public: boolean
Example
{
"id": "integer",
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"user": "string",
"known_good": "boolean",
"public": "boolean"
}
PreseedCreateOrModify: object
- name: string
- description: string
- type: string preseed, kickstart, autoyast
- content: string
- known_good: boolean
- public: boolean
Example
{
"name": "string",
"description": "string",
"type": "string",
"content": "string",
"known_good": "boolean",
"public": "boolean"
}