API Keys

You can find "API Keys" in the top "Security" menu when a project is selected.

API keys allow you to authenticate your requests to the LayerOps API. These keys are essential when you want to interact with LayerOps programmatically.

For detailed information about using the API, see our API documentation.

Configuration

To create an API key:

  1. Click on "Create secret"
  2. Fill in the form with:
    • Name: A name for your API key
    • Groups: The groups to attach to the API key. (See Groups)

api-key-create

This API Key is project-bound and can be assigned either all of your groups or a subset of them.

The project administrator can create an API Key with specific groups. This is useful for giving a user or machine access only to certain API endpoints.

Once created, you'll receive:

  • A Key ID - starts with "LYP"
  • An API Key Secret - make sure to save it as it will only be shown once

api-key-response

The API Key Secret will only be displayed once when you create the key. Make sure to save it securely, as you won't be able to retrieve it later.

Usage

To authenticate your API requests, you need to include both the Key ID and the API Key Secret in your requests. Here's an example:

curl -X 'GET' \
  'https://api.layerops.com/v1/workspaces/59f13788-310e-4c32-bde9-98c8f93061a0/environments' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: LYP6QBZDSGCZ54ROIPFZPKE9X:12c200a2-5817-4edb-b194-1694330dd3a9'
  • The 59f13788-310e-4c32-bde9-98c8f93061a0 is the workspace UUID. You can find it in the URL of the workspace or in the project dashboard.
  • The LYP6QBZDSGCZ54ROIPFZPKE9X is the Key ID.
  • The 12c200a2-5817-4edb-b194-1694330dd3a9 is the API Key Secret.
API keys are scoped to the project in which they were created.
For detailed information about using the API, see our API documentation.
Table of Contents