Skip to content
Equnix Metal
show

Authentication copied!

Hint: Equinix Metal's API can be reached at https://api.equinix.com/metal/v1

Most of the endpoints in the API require authentication. Authenticating is done with an authentication token in the X-Auth-Token header.

curl -H 'X-Auth-Token: my_authentication_token'

Authentication tokens are used to identify the user your application is connecting to the API on behalf of. Think of authentication tokens as permanent sessions—the user creates authentication tokens, and your app can use them to connect to the API on their behalf until they delete the token.

Retrieve all user API keys copied!

GET
/user/api-keys

Returns all API keys for the current user.

  • Parameters
  • include
    array in query

    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.

    exclude
    array in query

    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.

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide

Create a API key copied!

POST
/user/api-keys

Creates a API key for the current user.

  • Parameters
  • auth_token
     (required) in body

    API key to create

    {
        "description": "string",
        "read_only": "boolean"
    }

Delete the API key copied!

DELETE
/user/api-keys/{id}

Deletes the current user API key.

  • Parameters
  • id
    string  (required) in path

    API Key UUID

Retrieve all API keys for the project. copied!

GET
/projects/{id}/api-keys

Returns all API keys for a specific project.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    include
    array in query

    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.

    exclude
    array in query

    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.

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide

Create an API key for a project. copied!

POST
/projects/{id}/api-keys

Creates an API key for a project.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    auth_token
     (required) in body

    API Key to create

    {
        "description": "string",
        "read_only": "boolean"
    }

Delete the API key copied!

DELETE
/api-keys/{id}

Deletes the API key.

  • Parameters
  • id
    string  (required) in path

    API Key UUID