Equinix Metal offers two different types of API keys:
- API keys which are associated with specific user accounts. User-associated API keys have all the same permissions across all the Projects and Organizations that the user has access to.
- Project API keys which are associated with a specific Project. Project API keys can only be used to access resources within that project.
You can limit both types of keys to read-only access at creation time.
Note - API Keys created and managed in Equinix Metal are scoped to Equinix Metal only. Learn more about using the Fabric, Network Edge, and other Equinix APIs on https://developer.equinix.com/catalog.
Creating Your API Keys¶
You can create an API key for your user in the Equinix Metal console or through the API itself. You can make multiple keys for your user account.
To create an API key in the console, navigate to the API Keys tab of your user account, and click Add New Key. Add a description for the key, and chose whether it has Read/Write or Read-only permissions.
To create an API key associated with your user account, send a
POST request to the
/user/api-keys endpoint. Use the body parameters to add a description or to set the key as read-only.
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
Managing Your API Keys¶
You are only able to manage the User API Keys associated with your own user account. You are not able to manage any other user's API keys.
Your API keys are listed in the API Keys tab of your user account.
To retrieve all the API keys associated with your user account, sent a
GET request to the
curl -X GET -H 'X-Auth-Token: <API_TOKEN>' \
Deleting Your API Keys¶
API keys can be deleted without affecting any of the resources created with them.
Note - API keys that are associated with users are not able to be managed on an Org or Project level. You are not able to manage any other user's API keys. If you need to remove a user's API key access from an Org or Project, you will have to remove their user from the Org or Project.
To delete an API key from the console, navigate to the API Keys tab of your user account, and click Delete next to key you want to delete.
To delete an API key from the API, send a
DELETE request to the
curl -X DELETE -H 'X-Auth-Token: <API_TOKEN>' \