Professional Documents
Culture Documents
<label>:<size>(<tag>[,<tag>[,...])][,<label>:
...]
If multiple fabrics names are specified, the machine can be in any of the specified fabrics. To
request multiple possible fabrics to match, this parameter must be repeated in the request with
each value.
If multiple fabrics names are specified, the machine must NOT be in ANY of them. To request
exclusion of multiple fabrics, this parameter must be repeated in the request with each value.
If multiple fabrics class types are specified, the machine can be in any matching fabric. To
request multiple possible fabrics class types to match, this parameter must be repeated in the
request with each value.
If multiple fabrics names are specified, the machine must NOT be in ANY of them. To request
exclusion of multiple fabrics, this parameter must be repeated in the request with each value.
Returns 409 if a suitable machine matching the constraints could not be found.
This places the machines back into the pool, ready to be reallocated.
param machines system_ids of the machines which are to be released. (An empty list is
acceptable).
param comment Optional comment for the event log.
type comment unicode
return The system_ids of any machines that have their status changed by this call. Thus,
machines that were already released are excluded from the result.
Returns 400 if any of the machines cannot be found. Returns 403 if the user does not have
permission to release any of the machines. Returns a 409 if any of the machines could not be
released due to their current state.
param zone Zone name. If omitted, the zone is "none" and the nodes will be taken out of
their physical zones.
param nodes system_ids of the nodes whose zones are to be set. (An empty list is
acceptable).
Network
Manage a network.
DELETE /api/2.0/networks/{name}/
GET /api/2.0/networks/{name}/
Only MAC addresses for nodes visible to the requesting user are returned.
PUT /api/2.0/networks/{name}/
param name A simple name for the network, to make it easier to refer to. Must consist
only of letters, digits, dashes, and underscores.
param ip Base IP address for the network, e.g. 10.1.0.0. The host bits will be zeroed.
param netmask Subnet mask to indicate which parts of an IP address are part of the
network address. For example, 255.255.255.0.
param vlan_tag Optional VLAN tag: a number between 1 and 0xffe (4094) inclusive, or
zero for an untagged network.
param description Detailed description of the network for the benefit of users and
administrators.
Networks
GET /api/2.0/networks/
List networks.
param node Optionally, nodes which must be attached to any returned networks. If more than
one node is given, the result will be restricted to networks that these nodes have in common.
POST /api/2.0/networks/
Define a network.
Node
DELETE /api/2.0/nodes/{system_id}/
Returns 404 if the node is not found. Returns 403 if the user does not have permission to delete
the node. Returns 204 if the node is successfully deleted.
GET /api/2.0/nodes/{system_id}/
Returns a {detail_type: xml, ...} map, where detail_type is something like "lldp" or
"lshw".
Note that this is returned as BSON and not JSON. This is for efficiency, but mainly because
JSON can't do binary content without applying additional encoding like base-64.
This method is reserved for admin users and returns a 403 if the user is not one.
This returns the power parameters, if any, configured for a node. For some types of power control
this will include private information such as passwords and secret keys.
Commissioning results
GET /api/2.0/installation-results/
Node Script
DELETE /api/2.0/scripts/{name}
Delete a script.
GET /api/2.0/scripts/{name}
Download a script.
param revision What revision to download, latest by default. Can use rev as a shortcut.
type revision integer
param to What revision in the script's history to revert to. This can either be an ID or a
negative number representing how far back to go.
type to integer
PUT /api/2.0/scripts/{name}
GET /api/2.0/nodes/{system_id}/results/{id}/
param filters A comma seperated list to show only results that ran with a script name
or tag.
type filters unicode
param output Can be either combined, stdout, stderr, or all. By default only the
combined output is returned.
type output unicode
param filetype Filetype to output, can be txt or tar.xz
type format unicode
GET /api/2.0/nodes/{system_id}/results/
param type Only return scripts with the given type. This can be commissioning, testing,
or installion. Defaults to showing all.
type type unicode
param include_output Include base64 encoded output from the script.
type include_output bool
param filters A comma seperated list to show only results with a script name or tag.
type filters unicode
Node Scripts
GET /api/2.0/scripts/
param type Only return scripts with the given type. This can be testing or
commissioning. Defaults to showing both.
type script_type unicode
param include_script Include the base64 encoded script content.
type include_script bool
param filters A comma seperated list to show only results with a script name or tag.
type filters unicode
POST /api/2.0/scripts/
Nodes
GET /api/2.0/nodes/
Nodes are sorted by id (i.e. most recent last) and grouped by type.
param hostname An optional hostname. Only nodes relating to the node with the
matching hostname will be returned. This can be specified multiple times to see multiple
nodes.
type hostname unicode
param mac_address An optional MAC address. Only nodes relating to the node owning
the specified MAC address will be returned. This can be specified multiple times to see
multiple nodes.
type mac_address unicode
param id An optional list of system ids. Only nodes relating to the nodes with matching
system ids will be returned.
type id unicode
param domain An optional name for a dns domain. Only nodes relating to the nodes in
the domain will be returned.
type domain unicode
param zone An optional name for a physical zone. Only nodes relating to the nodes in
the zone will be returned.
type zone unicode
param agent_name An optional agent name. Only nodes relating to the nodes with
matching agent names will be returned.
type agent_name unicode
Returns whether or not the given MAC address is registered within this MAAS (and attached to a
non-retired node).
param zone Zone name. If omitted, the zone is "none" and the nodes will be taken out of
their physical zones.
param nodes system_ids of the nodes whose zones are to be set. (An empty list is
acceptable).
Notification
DELETE /api/2.0/notifications/{id}/
GET /api/2.0/notifications/{id}/
Returns HTTP 403 FORBIDDEN if this notification is not relevant (targeted) to the invoking
user.
PUT /api/2.0/notifications/{id}/
Notifications
GET /api/2.0/notifications/
Create a notification.
param message The message for this notification. May contain basic HTML; this will be
sanitised before display.
param context Optional JSON context. The root object must be an object (i.e. a
mapping). The values herein can be referenced by message with Python's "format" (not
%) codes.
param category Optional category. Choose from: error, warning, success, or info.
Defaults to info.
param ident Optional unique identifier for this notification.
param user Optional user ID this notification is intended for. By default it will not be
targeted to any individual user.
param users Optional boolean, true to notify all users, defaults to false, i.e. not targeted
to all users.
param admins Optional boolean, true to notify all admins, defaults to false, i.e. not
targeted to all admins.
Note: if neither user nor users nor admins is set, the notification will not be seen by anyone.
Package Repositories
GET /api/2.0/package-repositories/
POST /api/2.0/package-repositories/
Package Repository
DELETE /api/2.0/package-repositories/{id}/
GET /api/2.0/package-repositories/{id}/
PUT /api/2.0/package-repositories/{id}/
DELETE /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
Delete partition.
Returns 404 if the node, block device, or partition are not found.
GET /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
Read partition.
Returns 404 if the node, block device, or partition are not found.
POST /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
op=format
Format a partition.
Returns 403 when the user doesn't have the ability to format the partition. Returns 404 if the
node, block device, or partition is not found.
POST /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
op=mount
Returns 403 when the user doesn't have the ability to mount the partition. Returns 404 if the
node, block device, or partition is not found.
POST /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
op=unformat
Unformat a partition.
POST /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
op=unmount
Returns 400 if the partition is not formatted or not currently mounted. Returns 403 when the user
doesn't have the ability to unmount the partition. Returns 404 if the node, block device, or
partition is not found.
Partitions
GET /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partitions/
Returns 404 if the node or the block device are not found.
POST /api/2.0/nodes/{system_id}/blockdevices/{device_id}/partitions/
Returns 404 if the node or the block device are not found.
Pod
DELETE /api/2.0/pods/{id}/
Returns 404 if the pod is not found. Returns 403 if the user does not have permission to delete the
pod. Returns 204 if the pod is successfully deleted.
GET /api/2.0/pods/{id}/
GET /api/2.0/pods/{id}/ op=parameters