Skip to main content
Version: latest

Create API Key

You can create an API key to authenticate API requests to Palette. Use the API key to make REST API calls without providing your username and password. The API keys are limited to a single tenant and user. If you are a tenant admin, you can create API keys for any user within the tenant.

Once you create an API key, you cannot view the key again. Save the key in a secure location, such as a password manager. This restrictions applies to both the Palette User Interface and the REST API. When you create an API key, you can set an expiration date for the key. The expiration date can be further customized after the key creation.

Tenant administrators have the ability to create an API on behalf of any user within the tenant. Select the Tenant tab below to learn more about creating an API key as a tenant admin.

Prerequisites

  • You must have a Palette account, and you must be logged in.

Create API Key

  1. Log in to Palette.

  2. Navigate to the User Menu, and select My API Keys.

    Image that points to the user drop-down Menu and points to the API key link

  3. Click on Add New API key.

  4. Fill out the following input fields:

Input FieldDescription
API Key NameAssign a name to the API key.
DescriptionProvide a description for the API key.
Expiration DateSelect an expiration date from the available options. You can also specify a custom date by selecting Custom.
  1. Click the Generate button.

  2. Copy the API key and save it in a secure location, such as a password manager.

warning

Ensure you save the API key in a secure location. You will not be able to view the API key again.

Validate

  1. Log in to Palette.

  2. Navigate to the User Menu, and select My API Keys.

  3. Verify your API key is listed in the table.

  4. Test your API against the Palette API. Issue the command below in your terminal, replace PLACE_YOUR_API_KEY_HERE with your API key.

API_KEY=PLACE_YOUR_API_KEY_HERE
  1. Use curl to send the HTTP request to the Palette API using your API key.
curl --location 'https://api.spectrocloud.com/v1/apiKeys' \
--header 'Accept: application/json' \
--header "apiKey: $API_KEY"