Packet Host Organizations API
Organizations Management. Check out the product docs to learn more about [Organizations](https://metal.equinix.com/developers/docs/accounts/).
Organizations Management. Check out the product docs to learn more about [Organizations](https://metal.equinix.com/developers/docs/accounts/).
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 Organizations API
version: 1.0.0
servers:
- url: https://api.equinix.com/metal/v1
security:
- x_auth_token: []
tags:
- description: Organizations Management. Check out the product docs to learn more about [Organizations](https://metal.equinix.com/developers/docs/accounts/).
name: Organizations
paths:
/organizations:
get:
description: Returns a list of organizations that are accessible to the current user.
operationId: findOrganizations
parameters:
- description: Include, exclude or show only personal organizations.
in: query
name: personal
schema:
$ref: '#/components/schemas/findOrganizations_personal_parameter'
- description: Include, exclude or show only organizations that have no projects.
in: query
name: without_projects
schema:
$ref: '#/components/schemas/findOrganizations_personal_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/OrganizationList'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
summary: Retrieve all organizations
tags:
- Organizations
x-equinix-metal-paginated-property: Organizations
post:
description: Creates an organization.
operationId: createOrganization
parameters:
- 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/OrganizationInput'
description: Organization to create
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Organization'
description: created
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unprocessable entity
summary: Create an organization
tags:
- Organizations
/organizations/{id}:
delete:
description: Deletes the organization.
operationId: deleteOrganization
parameters:
- description: Organization UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'204':
description: no content
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
summary: Delete the organization
tags:
- Organizations
get:
description: Returns a single organization's details, if the user is authorized to view it.
operationId: findOrganizationById
parameters:
- description: Organization 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/Organization'
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 an organization's details
tags:
- Organizations
put:
description: Updates the organization.
operationId: updateOrganization
parameters:
- description: Organization 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/OrganizationInput'
description: Organization to update
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Organization'
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
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unprocessable entity
summary: Update the organization
tags:
- Organizations
/organizations/{id}/customdata:
get:
description: Provides the custom metadata stored for this organization in json format
operationId: findOrganizationCustomdata
parameters:
- description: Organization UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'200':
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 the custom metadata of an organization
tags:
- Organizations
/organizations/{id}/invitations:
get:
description: Returns all invitations in an organization.
operationId: findOrganizationInvitations
parameters:
- 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: 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
- description: Organization UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationList'
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 organization invitations
tags:
- Organizations
post:
description: 'In order to add a user to an organization, they must first be invited.
To invite to several projects the parameter `projects_ids:[a,b,c]` can be used'
operationId: createOrganizationInvitation
parameters:
- description: Organization 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
requestBody:
$ref: '#/components/requestBodies/InvitationInput'
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Invitation'
description: created
'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
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unprocessable entity
summary: Create an invitation for an organization
tags:
- Organizations
/organizations/{id}/operating-systems:
get:
description: Returns a listing of available operating systems for the given organization
operationId: findOperatingSystemsByOrganization
parameters:
- description: Organization 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
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OperatingSystemList'
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 operating systems visible by the organization
tags:
- Organizations
/organizations/{id}/payment-methods:
get:
description: Returns all payment methods of an organization.
operationId: findOrganizationPaymentMethods
parameters:
- description: Organization 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: 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/PaymentMethodList'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
summary: Retrieve all payment methods of an organization
tags:
- Organizations
post:
description: Creates a payment method.
operationId: createPaymentMethod
parameters:
- description: Organization 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
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethodCreateInput'
description: Payment Method to create
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethod'
description: created
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unprocessable entity
summary: Create a payment method for the given organization
tags:
- Organizations
/organizations/{id}/plans:
get:
description: Returns a listing of available plans for the given organization
operationId: findPlansByOrganization
parameters:
- description: Organization 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/PlanList'
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 plans visible by the organization
tags:
- Organizations
/organizations/{id}/projects:
get:
description: Returns a collection of projects that belong to the organization.
operationId: findOrganizationProjects
parameters:
- description: Organization UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
- description: Filter results by name.
in: query
name: name
schema:
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
- 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/ProjectList'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
summary: Retrieve all projects of an organization
tags:
- Organizations
x-equinix-metal-paginated-property: Projects
post:
description: Creates a new project for the organization
operationId: createOrganizationProject
parameters:
- description: Organization 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/ProjectCreateInput'
description: Project to create
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
description: created
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unprocessable entity
summary: Create a project for the organization
tags:
- Organizations
/organizations/{id}/transfers:
get:
description: Provides a collection of project transfer requests from or to the organization.
operationId: findOrganizationTransfers
parameters:
- description: Organization 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
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TransferRequestList'
description: ok
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: forbidden
summary: Retrieve all project transfer requests from or to an organization
tags:
- Organizations
components:
schemas:
ProjectCreateFromRootInput_type:
description: The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers.
enum:
- default
- vmce
type: string
findOrganizations_personal_parameter:
enum:
- include
- exclude
- only
type: string
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
# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/packet-host/refs/heads/main/openapi/packet-host-organizations-api-openapi.yml