Packet Host HardwareReservations API
Hardware Reservation Management. Check out the product docs to learn more about [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/).
Hardware Reservation Management. Check out the product docs to learn more about [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/).
openapi: 3.0.0
info:
contact:
email: support@equinixmetal.com
name: Equinix Metal API Team
description: "# Introduction\nEquinix Metal provides a RESTful HTTP API which can be reached at <https://api.equinix.com/metal/v1>. This document describes the API and how to use it.\n\nThe API allows you to programmatically interact with all\nof your Equinix Metal resources, including devices, networks, addresses, organizations,\nprojects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API.\n\nThe API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at <https://metal.equinix.com/developers/api>.\n\n# Common Parameters\n\nThe Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them.\n\n## Pagination\n\nPagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters.\n\nThe `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type.\n\n## Sorting\n\nWhere offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending).\n\n## Filtering\n\nFiltering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter.\n\nFor example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request:\n\n```sh\ncurl -H 'X-Auth-Token: my_authentication_token' \\\n https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4\n```\n\nOnly IP addresses with the `type` field set to `public_ipv4` will be returned.\n\n## Searching\n\nSearching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints.\n\nTo search resources you can use the `search` query parameter.\n\n## Include and Exclude\n\nFor resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource.\n\n```json\n{\n ...\n \"project\": {\n \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\"\n }\n}\n```\n\nIf you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter.\n\nFor example:\n\n```sh\ncurl -H 'X-Auth-Token: my_authentication_token' \\\n https://api.equinix.com/metal/v1/user?include=projects\n```\n\nThe `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented.\n\nTo have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`).\n\n```sh\ncurl -H 'X-Auth-Token: my_authentication_token' \\\n https://api.equinix.com/metal/v1/user?include=emails,projects,memberships\n```\n\nYou may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`):\n\n```sh\ncurl -H 'X-Auth-Token: my_authentication_token' \\\n https://api.equinix.com/metal/v1/user?include=memberships.projects\n```\n\nTo exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field.\n"
license:
name: Equinix Metal
url: https://metal.equinix.com/legal/
termsOfService: https://metal.equinix.com/legal/
title: Metal Authentication HardwareReservations API
version: 1.0.0
servers:
- url: https://api.equinix.com/metal/v1
security:
- x_auth_token: []
tags:
- description: 'Hardware Reservation Management. Check out the product docs to learn more about [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/).
'
externalDocs:
url: https://metal.equinix.com/developers/docs/deploy/reserved/
name: HardwareReservations
paths:
/hardware-reservations/{id}:
get:
description: Returns a single hardware reservation
operationId: findHardwareReservationById
parameters:
- description: HardwareReservation UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
- description: 'Nested attributes to include. Included objects will return their full
attributes. Attribute names can be dotted (up to 3 levels) to included deeply
nested objects.'
explode: false
in: query
name: include
schema:
items:
type: string
type: array
style: form
- description: 'Nested attributes to exclude. Excluded objects will return only the href
attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply
nested objects.'
explode: false
in: query
name: exclude
schema:
items:
type: string
type: array
style: form
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/HardwareReservation'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
summary: Retrieve a hardware reservation
tags:
- HardwareReservations
/hardware-reservations/{id}/activate:
post:
description: Activate a spare hardware reservation
operationId: activateHardwareReservation
parameters:
- description: Hardware Reservation UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
- description: 'Nested attributes to include. Included objects will return their full
attributes. Attribute names can be dotted (up to 3 levels) to included deeply
nested objects.'
explode: false
in: query
name: include
schema:
items:
type: string
type: array
style: form
- description: 'Nested attributes to exclude. Excluded objects will return only the href
attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply
nested objects.'
explode: false
in: query
name: exclude
schema:
items:
type: string
type: array
style: form
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/activateHardwareReservation_request'
description: Note to attach to the reservation
required: false
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/HardwareReservation'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
summary: Activate a spare hardware reservation
tags:
- HardwareReservations
/hardware-reservations/{id}/move:
post:
description: Move a hardware reservation to another project
operationId: moveHardwareReservation
parameters:
- description: Hardware Reservation UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
- description: 'Nested attributes to include. Included objects will return their full
attributes. Attribute names can be dotted (up to 3 levels) to included deeply
nested objects.'
explode: false
in: query
name: include
schema:
items:
type: string
type: array
style: form
- description: 'Nested attributes to exclude. Excluded objects will return only the href
attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply
nested objects.'
explode: false
in: query
name: exclude
schema:
items:
type: string
type: array
style: form
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/moveHardwareReservation_request'
description: Destination Project UUID
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/HardwareReservation'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
summary: Move a hardware reservation
tags:
- HardwareReservations
/projects/{id}/hardware-reservations:
get:
description: Provides a collection of hardware reservations for a given project.
operationId: findProjectHardwareReservations
parameters:
- description: Project UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
- description: Search by facility code, plan name, project name, reservation short ID or device hostname
in: query
name: query
schema:
type: string
- description: Filter by hardware reservation state
in: query
name: state
schema:
$ref: '#/components/schemas/findProjectHardwareReservations_state_parameter'
- description: Filter hardware reservation that is provisionable
in: query
name: provisionable
schema:
$ref: '#/components/schemas/findProjectHardwareReservations_provisionable_parameter'
- description: 'Nested attributes to include. Included objects will return their full
attributes. Attribute names can be dotted (up to 3 levels) to included deeply
nested objects.'
explode: false
in: query
name: include
schema:
items:
type: string
type: array
style: form
- description: 'Nested attributes to exclude. Excluded objects will return only the href
attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply
nested objects.'
explode: false
in: query
name: exclude
schema:
items:
type: string
type: array
style: form
- description: Page to return
in: query
name: page
schema:
default: 1
format: int32
maximum: 100000
minimum: 1
type: integer
- description: Items returned per page
in: query
name: per_page
schema:
default: 10
format: int32
maximum: 1000
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/HardwareReservationList'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
summary: Retrieve all hardware reservations for a given project
tags:
- HardwareReservations
x-equinix-metal-paginated-property: HardwareReservations
components:
schemas:
Project:
example:
devices:
- href: href
- href: href
volumes:
- href: href
- href: href
created_at: 2000-01-23 04:56:07+00:00
type: null
memberships:
- href: href
- href: href
bgp_config:
href: href
tags:
- tags
- tags
max_devices: '{}'
ssh_keys:
- href: href
- href: href
updated_at: 2000-01-23 04:56:07+00:00
invitations:
- href: href
- href: href
members:
- href: href
- href: href
organization:
website: website
address:
country: country
address: address
address2: address2
city: city
coordinates:
latitude: latitude
longitude: longitude
state: state
zip_code: zip_code
projects:
- href: href
- href: href
credit_amount: 1.4658129
created_at: 2000-01-23 04:56:07+00:00
description: description
billing_address:
country: country
address: address
address2: address2
city: city
coordinates:
latitude: latitude
longitude: longitude
state: state
zip_code: zip_code
memberships:
- href: href
- href: href
enforce_2fa_at: 2000-01-23 04:56:07+00:00
twitter: twitter
updated_at: 2000-01-23 04:56:07+00:00
terms: 5
members:
- href: href
- href: href
name: name
logo: logo
customdata: '{}'
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
name: name
network_status: '{}'
customdata: '{}'
href: href
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
payment_method:
href: href
properties:
bgp_config:
$ref: '#/components/schemas/Href'
created_at:
format: date-time
type: string
customdata:
type: object
devices:
items:
$ref: '#/components/schemas/Href'
type: array
href:
type: string
id:
format: uuid
type: string
invitations:
items:
$ref: '#/components/schemas/Href'
type: array
max_devices:
type: object
members:
items:
$ref: '#/components/schemas/Href'
type: array
memberships:
items:
$ref: '#/components/schemas/Href'
type: array
name:
description: The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis.
maxLength: 80
minLength: 1
type: string
network_status:
type: object
organization:
$ref: '#/components/schemas/Organization'
payment_method:
$ref: '#/components/schemas/Href'
ssh_keys:
items:
$ref: '#/components/schemas/Href'
type: array
updated_at:
format: date-time
type: string
volumes:
items:
$ref: '#/components/schemas/Href'
type: array
type:
$ref: '#/components/schemas/Project_type'
tags:
items:
type: string
type: array
type: object
Device_state:
description: "The current state the instance is in.\n\n* When an instance is initially created it will be in the `queued` state until it is picked up by the provisioner.\n* Once provisioning has begun on the instance it's state will move to `provisioning`.\n* When an instance is deleted, it will move to `deprovisioning` state until the deprovision is completed and the instance state moves to `deleted`.\n* If an instance fails to provision or deprovision it will move to `failed` state.\n* Once an instance has completed provisioning it will move to `active` state.\n* If an instance is currently powering off or powering on it will move to `powering_off` or `powering_on` states respectively. \n* When the instance is powered off completely it will move to the `inactive` state.\n* When an instance is powered on completely it will move to the `active` state.\n* Using the reinstall action to install a new OS on the instance will cause the instance state to change to `reinstalling`.\n* When the reinstall action is complete the instance will move to `active` state."
enum:
- queued
- provisioning
- deprovisioning
- reinstalling
- active
- inactive
- failed
- powering_on
- powering_off
- deleted
type: string
Plan_specs_cpus_inner:
example:
count: 6
type: type
properties:
count:
type: integer
type:
type: string
type: object
Mount:
example:
format: format
options:
- options
- options
device: device
point: point
properties:
device:
type: string
format:
type: string
point:
type: string
options:
items:
type: string
type: array
type: object
IPAssignment:
example:
address: address
parent_block:
netmask: netmask
cidr: 2
href: href
network: network
created_at: 2000-01-23 04:56:07+00:00
type: null
enabled: true
manageable: true
network: network
address_family: 5
public: true
management: true
netmask: netmask
metro: null
next_hop: next_hop
cidr: 5
href: href
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
global_ip: true
gateway: gateway
assigned_to:
href: href
properties:
address:
type: string
address_family:
type: integer
assigned_to:
$ref: '#/components/schemas/Href'
cidr:
type: integer
created_at:
format: date-time
type: string
enabled:
type: boolean
gateway:
type: string
global_ip:
type: boolean
href:
type: string
id:
format: uuid
type: string
manageable:
type: boolean
management:
type: boolean
metro:
$ref: '#/components/schemas/IPAssignment_metro'
netmask:
type: string
network:
type: string
parent_block:
$ref: '#/components/schemas/ParentBlock'
public:
type: boolean
state:
$ref: '#/components/schemas/IPAssignment_state'
next_hop:
description: 'Only set when this is a Metal Gateway Elastic IP Assignment.
The IP address within the Metal Gateway to which requests to the Elastic IP are forwarded.
'
format: ipv4
type: string
type:
$ref: '#/components/schemas/IPAssignment_type'
type: object
HardwareReservation:
example:
custom_rate: 1050.5
created_at: 2000-01-23 04:56:07+00:00
project:
devices:
- href: href
- href: href
volumes:
- href: href
- href: href
created_at: 2000-01-23 04:56:07+00:00
type: null
memberships:
- href: href
- href: href
bgp_config:
href: href
tags:
- tags
- tags
max_devices: '{}'
ssh_keys:
- href: href
- href: href
updated_at: 2000-01-23 04:56:07+00:00
invitations:
- href: href
- href: href
members:
- href: href
- href: href
organization:
website: website
address:
country: country
address: address
address2: address2
city: city
coordinates:
latitude: latitude
longitude: longitude
state: state
zip_code: zip_code
projects:
- href: href
- href: href
credit_amount: 1.4658129
created_at: 2000-01-23 04:56:07+00:00
description: description
billing_address:
country: country
address: address
address2: address2
city: city
coordinates:
latitude: latitude
longitude: longitude
state: state
zip_code: zip_code
memberships:
- href: href
- href: href
enforce_2fa_at: 2000-01-23 04:56:07+00:00
twitter: twitter
updated_at: 2000-01-23 04:56:07+00:00
terms: 5
members:
- href: href
- href: href
name: name
logo: logo
customdata: '{}'
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
name: name
network_status: '{}'
customdata: '{}'
href: href
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
payment_method:
href: href
switch_uuid: switch_uuid
short_id: short_id
termination_time: 2000-01-23 04:56:07+00:00
provisionable: true
need_of_service: true
href: href
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
device: null
facility:
features:
- baremetal
- backend_transfer
- global_ipv4
address:
country: country
address: address
address2: address2
city: city
coordinates:
latitude: latitude
longitude: longitude
state: state
zip_code: zip_code
code: code
ip_ranges:
- 2604:1380::/36
- 147.75.192.0/21
metro: null
name: name
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
plan:
legacy: true
line: line
available_in_metros:
- price:
hour: 1.23
href: href
- price:
hour: 1.23
href: href
description: description
available_in:
- price:
hour: 1.23
href: href
- price:
hour: 1.23
href: href
type: null
specs:
features:
txt: true
uefi: true
raid: true
memory:
total: total
cpus:
- count: 6
type: type
- count: 6
type: type
drives:
- size: 3.84TB
count: 1
type: type
category: null
- size: 3.84TB
count: 1
type: type
category: null
nics:
- count: 2
type: type
- count: 2
type: type
deployment_types:
- null
- null
name: name
categories:
- categories
- categories
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
class: m3.large.x86
pricing: '{}'
slug: m3.large.x86
spare: true
properties:
created_at:
format: date-time
type: string
custom_rate:
description: Amount that will be charged for every billing_cycle.
example: 1050.5
format: float
type: number
device:
$ref: '#/components/schemas/Device'
facility:
$ref: '#/components/schemas/Facility'
href:
type: string
id:
format: uuid
type: string
need_of_service:
description: Whether this Device requires assistance from Equinix Metal.
type: boolean
plan:
$ref: '#/components/schemas/Plan'
project:
$ref: '#/components/schemas/Project'
provisionable:
description: Whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.
type: boolean
short_id:
description: Short version of the ID.
format: string
type: string
spare:
description: Whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Equinix Metal
type: boolean
switch_uuid:
description: Switch short id. This can be used to determine if two devices are connected to the same switch, for example.
type: string
termination_time:
description: Expiration date for the reservation.
format: date-time
type: string
type: object
activateHardwareReservation_request:
properties:
description:
type: string
type: object
Address:
example:
country: country
address: address
address2: address2
city: city
coordinates:
latitude: latitude
longitude: longitude
state: state
zip_code: zip_code
properties:
address:
type: string
address2:
type: string
city:
type: string
coordinates:
$ref: '#/components/schemas/Coordinates'
country:
type: string
state:
type: string
zip_code:
type: string
required:
- address
- country
- zip_code
type: object
Error:
description: Error responses are included with 4xx and 5xx HTTP responses from the API service. Either "error" or "errors" will be set.
properties:
error:
description: A description of the error that caused the request to fail.
type: string
errors:
description: A list of errors that contributed to the request failing.
items:
description: An error message that contributed to the request failing.
type: string
type: array
type: object
VirtualNetwork:
example:
vxlan: 4
instances:
- href: href
- href: href
description: description
created_at: 2000-01-23 04:56:07+00:00
assigned_to_virtual_circuit: true
tags:
- tags
- tags
metal_gateways:
- gateway_address: 10.1.2.1/27
updated_at: 2000-01-23 04:56:07+00:00
vlan: 1001
created_at: 2000-01-23 04:56:07+00:00
href: href
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
- gateway_address: 10.1.2.1/27
updated_at: 2000-01-23 04:56:07+00:00
vlan: 1001
created_at: 2000-01-23 04:56:07+00:00
href: href
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
metro_code: metro_code
metro:
href: href
href: href
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
facility:
href: href
assigned_to:
href: href
properties:
assigned_to:
$ref: '#/components/schemas/Href'
assigned_to_virtual_circuit:
description: True if the virtual network is attached to a virtual circuit. False if not.
type: boolean
description:
type: string
facility:
$ref: '#/components/schemas/Href'
href:
type: string
created_at:
format: date-time
type: string
id:
format: uuid
type: string
instances:
description: A list of instances with ports currently associated to this Virtual Network.
items:
$ref: '#/components/schemas/Href'
type: array
metal_gateways:
description: A list of metal gateways currently associated to this Virtual Network.
items:
$ref: '#/components/schemas/MetalGatewayLite'
type: array
metro:
$ref: '#/components/schemas/Href'
metro_code:
description: The Metro code of the metro in which this Virtual Network is defined.
type: string
vxlan:
type: integer
tags:
items:
type: string
type: array
type: object
MetalGateway_state:
description: The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted.
enum:
- ready
- active
- deleting
type: string
Meta:
example:
next:
href: href
total: 0
last:
href: href
previous:
href: href
last_page: 1
self:
href: href
first:
href: href
current_page: 6
properties:
first:
$ref: '#/components/schemas/Href'
last:
$ref: '#/components/schemas/Href'
next:
$ref: '#/components/schemas/Href'
previous:
$ref: '#/components/schemas/Href'
self:
$ref: '#/components/schemas/Href'
total:
type: integer
current_page:
type: integer
last_page:
type: integer
type: object
ParentBlock:
example:
netmask: netmask
cidr: 2
href: href
network: network
properties:
cidr:
type: integer
href:
type: string
netmask:
type: string
network:
type: string
type: object
Plan_available_in_inner:
example:
price
# --- truncated at 32 KB (86 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/packet-host/refs/heads/main/openapi/packet-host-hardwarereservations-api-openapi.yml