openapi: 3.2.0 info: contact: email: support@equinixmetal.com name: Equinix Metal API Team description: '# Introduction Equinix Metal provides a RESTful HTTP API which can be reached at .' license: name: Equinix Metal url: https://metal.equinix.com/legal/ termsOfService: https://metal.equinix.com/legal/ title: Metal SSH Keys API version: 1.0.0 servers: - url: https://api.equinix.com/metal/v1 security: - x_auth_token: [] tags: - description: Manage SSH keys. See project endpoints to list and create project-level SSH keys. externalDocs: url: https://metal.equinix.com/developers/docs/accounts/ssh-keys/ name: SSH Keys paths: /devices/{id}/ssh-keys: get: description: Returns a collection of the device's ssh keys. operationId: findDeviceSSHKeys parameters: - description: Project UUID in: path name: id required: true schema: format: uuid type: string - description: Search by key, label, or fingerprint in: query name: Search string 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 responses: '200': content: application/json: schema: $ref: '#/components/schemas/SSHKeyList' description: ok '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: unauthorized summary: Retrieve a device's ssh keys tags: - SSH Keys /projects/{id}/ssh-keys: get: description: Returns a collection of the project's ssh keys. operationId: findProjectSSHKeys parameters: - description: Project UUID in: path name: id required: true schema: format: uuid type: string - description: Search by key, label, or fingerprint in: query name: query 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 responses: '200': content: application/json: schema: $ref: '#/components/schemas/SSHKeyList' description: ok '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: unauthorized summary: Retrieve a project's ssh keys tags: - SSH Keys post: description: Creates a ssh key. operationId: createProjectSSHKey parameters: - description: Project 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/SSHKeyCreateInput' description: ssh key to create required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/SSHKey' 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 ssh key for the given project tags: - SSH Keys /ssh-keys: get: description: Returns a collection of the user’s ssh keys. operationId: findSSHKeys parameters: - description: Search by key, label, or fingerprint in: query name: search 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 responses: '200': content: application/json: schema: $ref: '#/components/schemas/SSHKeyList' description: ok '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: unauthorized summary: Retrieve all ssh keys tags: - SSH Keys post: description: Creates a ssh key. operationId: createSSHKey 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 requestBody: $ref: '#/components/requestBodies/SSHKeyCreateInput' responses: '201': content: application/json: schema: $ref: '#/components/schemas/SSHKey' 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 ssh key for the current user tags: - SSH Keys /ssh-keys/{id}: delete: description: Deletes the ssh key. operationId: deleteSSHKey parameters: - description: ssh key 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 '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: forbidden '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: not found summary: Delete the ssh key tags: - SSH Keys get: description: Returns a single ssh key if the user has access operationId: findSSHKeyById parameters: - description: SSH Key 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/SSHKey' 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 ssh key tags: - SSH Keys put: description: Updates the ssh key. operationId: updateSSHKey parameters: - description: SSH Key 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/SSHKeyInput' description: ssh key to update required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/SSHKey' 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 ssh key tags: - SSH Keys components: schemas: SSHKeyInput: example: label: label key: key tags: - tags - tags properties: key: type: string label: type: string tags: items: type: string type: array 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 SSHKey: example: updated_at: 2000-01-23 04:56:07+00:00 fingerprint: fingerprint created_at: 2000-01-23 04:56:07+00:00 href: href id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 label: label entity: href: href key: key tags: - tags - tags properties: created_at: format: date-time type: string entity: $ref: '#/components/schemas/Href' fingerprint: type: string href: type: string id: format: uuid type: string key: type: string label: type: string updated_at: format: date-time type: string tags: items: type: string type: array type: object SSHKeyList: example: ssh_keys: - updated_at: 2000-01-23 04:56:07+00:00 fingerprint: fingerprint created_at: 2000-01-23 04:56:07+00:00 href: href id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 label: label entity: href: href key: key tags: - tags - tags - updated_at: 2000-01-23 04:56:07+00:00 fingerprint: fingerprint created_at: 2000-01-23 04:56:07+00:00 href: href id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 label: label entity: href: href key: key tags: - tags - tags properties: ssh_keys: items: $ref: '#/components/schemas/SSHKey' type: array type: object Href: example: href: href properties: href: type: string required: - href type: object SSHKeyCreateInput: example: label: label instances_ids: - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 key: key tags: - tags - tags properties: instances_ids: description: "List of instance UUIDs to associate SSH key with, when empty array is sent all instances belonging\n to entity will be included" items: format: uuid type: string type: array key: type: string label: type: string tags: items: type: string type: array type: object requestBodies: SSHKeyCreateInput: content: application/json: schema: $ref: '#/components/schemas/SSHKeyCreateInput' description: ssh key to create required: true securitySchemes: x_auth_token: description: 'HTTP header containing the User or Project API key that will be used to authenticate the request. ' in: header name: X-Auth-Token type: apiKey x-displayName: X-Auth-Token x-tagGroups: - name: Accounts and Organization tags: - Authentication - Emails - Invitations - Memberships - Organizations - OTPs - PasswordResetTokens - PaymentMethods - Projects - SSHKeys - SupportRequest - TransferRequests - TwoFactorAuth - Users - UserVerificationTokens - name: Services and Billing tags: - Events - Facilities - Incidents - Invoices - Licenses - Metros - Plans - Usages - name: Servers tags: - Devices - Batches - Capacity - HardwareReservations - OperatingSystems - Ports - SelfServiceReservations - SpotMarket - Userdata - Volumes - name: Networking tags: - BGP - Interconnections - IPAddresses - MetalGateways - VLANs - VRFs