These docs are for v1. Click to read the latest docs for v2.

Key operations

In API Keys and Traffic Management you can perform various single and batch operations on keys that are part of the same collection. These include creating or importing keys, exporting keys, moving keys from one collection to another, editing information about individual keys, revoking keys, and restoring revoked keys. If you enable user quota at the collection level, you can also reset the quota counter for specific keys manually.

Create keys

You can create one key or multiple keys inside a collection by assigning them custom or automatically generated unique values and specifying other classificatory information if required. API keys serve as unique identifiers that enable edge servers to authenticate, track, and manage API consumers.

📘

API

You can also complete this task by using the API Keys and Traffic Management API. Run the Create keys and Generate keys operations.

  1. In API Keys and Traffic Management, from the key collections list, select the collection where you want to create keys.

  2. In the collection panel, on the Keys tab, click Create keys.

  3. In the Create key(s) window:

ActionSteps
If you want to enter key values manually,1. From the drop-down menu, select Enter value(s) manually.

2. In the Key value field, enter comma separated unique values for the keys that you create.

Based on the number of unique values you enter, the system automatically calculates the number of keys to create.
If you want the system to generate key values,1. From the drop-down menu, select Generate values.

2. In the Number of keys field, enter the number of keys that you want to generate.
  1. Optional: In the Key label field, enter a meaningful label for API Gateway reporting.
    API Gateway reports use key labels to display various data related to API usage. The more meaningful you make the label, the more easily you'll be able to identify your keys when analyzing API Gateway reports.

  2. To make key labels incremental, set the Increment label switch to Yes.

    📘

    The label's increment starts with an underscore character followed by a numerical value based on the number of keys that you enter. For example, if you choose to generate 8 keys, the increments range from "_0" to "_7". If you choose to generate 125 keys, the increments range from "_000" to "_124".

  3. Optional: In the Description text box, enter additional information related to the keys you create.

  4. Optional: In the Tags field, enter or select the tags that you want to associate with the keys.
    The maximum number of tags that you can add is 10. Tags are additional key categories that let you filter keys in a collection.

  5. Click Save.

Ensure that the collection where you created the keys has API endpoints and resources selected in the Access control list tab. API keys are usable only if you specify the endpoints and resources that API consumers can access with the keys. To associate keys with API endpoints and resources, follow Edit an access control list .

Import keys

If you already have API keys and do not want to create new ones, you can import to a collection a JSON, XML, or CSV file with details about your keys. The file that you import must contain your keys' unique values and other classificatory information if required.

📘

API

You can also complete this task by using the API Keys and Traffic Management API. Run the Import keys operation.

  1. In API Keys and Traffic Management, from the key collections list, select the collection that you want to import keys to.

  2. In the collection panel, on the Keys tab, click Import keys.

  3. In the Import keys window, in the File area, click Choose file and go to the file that you want to upload.
    Depending on the file type, you should present information about the keys that you import according to specific formatting rules.

📘

The value is the only mandatory element that you must include in the imported file. The label and tags are optional.

See the following examples:

<?xml version="1.0"?>
<keys>
  <key>
    <value>value</value>
    <label>label</label>
    <tags>tag1;tag2</tags>
  </key>
</keys>
[
 {
 "value": "value",
 "label": "label",
 "tags": ["tag1", "tag2"]
 },
 ...
]
VALUE,LABEL,TAGS
value1,label1,tag1;tag2
value2,label2,tag2;tag3
  1. Click Import.
    The imported keys appear in the collection.

Ensure that the collection where you imported the keys has API endpoints and resources selected in the Access control list tab. API keys are usable only if the endpoints and resources that can be accessed with the keys are specified. To associate keys with API endpoints and resources, follow Edit an access control list.

Export keys

You can export API keys included in a key collection to a JSON, CSV, or XML file. The export file includes metadata about the keys and their parent collection, the keys' status at the time of the export, and the remaining quota at the time of the export.

  1. In API Keys and Traffic Management, from the key collections list, select the collection that you want to export keys from.

  2. In the collection panel, on the Keys tab:

    • To export keys to a JSON file, click Export to JSON.
    • To export keys to a CSV file, from the drop-down, select Export to CSV.
    • To export keys to an XML file, from the drop-down, select Export to XML.

The file containing information about your keys appears in your default download folder.

Move keys

You can move one or multiple keys to a collection that already exists in API Keys and Traffic Management, or you can create a new collection and make it the destination for your keys. This option is particularly useful for preserving keys stored in a collection that you intend to delete.

📘

You can also complete this task by using the API Keys and Traffic Management API. Run the Move keys operation.

  1. In API Keys and Traffic Management, from the key collections list, select the collection that you want to move keys from.

  2. In the collection panel, on the Keys tab, select the keys that you want to move. Click Move keys.

  3. In the Move keys window:

ActionSteps
If you want to move keys to an existing collection,From the Move to collection menu, select a collection.
If you want to move keys to a new collection,1. In the New collection name field, enter a name for the new collection.

2. From the Access control group menu, select the group and contract pairing that you want to associate with the new collection.

3. Optional: In the Notes field, enter additional information related to the new collection.
  1. Click Move.
    The keys are moved to the collection that you specified and become associated with this collection's quota and ACL settings.

Edit keys

You can edit the label, value, description, and tags associated with any key that already exists in a collection.

📘

API

You can also complete this task by using the API Keys and Traffic Management API. Run the Edit a key operation.

  1. In API Keys and Traffic Management, from the key collections list, select the collection where you want to edit a key.

  2. In the collection panel, on the Keys tab, in the Actions column, click the ellipsis icon (...) associated with the key that you want to edit.
    You can only edit information about one key at a time.

  3. From the menu, select Edit/View key.

  4. In the Edit key window, make the necessary changes. Click Save.
    Key ID and Created at are the only fields that cannot be changed.

While your changes appear on the Keys tab and are propagate to the ​Akamai​ network, you can track progress by monitoring the pending icon () next to the affected key.

Revoke keys

You can revoke one or multiple keys inside a key collection. When you revoke keys, you do not delete them permanently because you can restore them within the next 120 days. After this period, the system removes the keys irreversibly. API consumers that identify with revoked keys cannot access the resources and endpoints listed in the Access control list tab of a particular collection.

📘

API

You can also complete this task by using the API Keys and Traffic Management API. Run the Revoke keys operation.

  1. In API Keys and Traffic Management, from the key collections list, select the collection you want to revoke keys in.

  2. In the collection panel, on the Keys tab, select the keys that you want to revoke. Click Revoke keys.

  3. In the Revoke keys window, click Revoke.
    This icon appears next to every revoked key: .

👍

Click to view the date when the key will be permanently deleted.

Restore revoked keys

You can restore one or multiple revoked keys inside a key collection within 120 days following the revocation. After this period, the system removes the keys irreversibly. API consumers that identify with restored keys regain access to previously unavailable endpoints and resources.

📘

API

You can also complete this task by using the API Keys and Traffic Management API. Run the Restore revoked keys operation.

  1. In API Keys and Traffic Management, from the key collections list, select the collection you want to restore keys in.

  2. In the collection panel, on the Keys tab, click Restore keys.

  3. In the Restore keys window, verify that you want to restore the selected keys and click Restore.
    API consumers can use the restored keys to access the associated private endpoints and resources.

Reset key quota

In API Keys and Traffic Management, you can monitor the remaining quota for each API key inside a collection. If a key is close to the quota threshold and you do not want to wait for the automatic quota reset to make the key usable again, you can reset the quota for the key manually.

📘

API

You can also complete this task by using the API Keys and Traffic Management API. Run the Reset key quota operation.

  1. In API Keys and Traffic Management, from the key collections list, select the collection that you want to reset quota in.

  2. In the collection panel, on the Keys tab, select one or more keys that you want to reset quota for.

  3. Click Reset quota.

  4. In the Reset key quota window, verify that you want to reset quota for the selected keys and click Reset.
    The remaining quota for the keys that you selected is set to 100%.

Assign keys

You can assign existing keys to another key collections, and set different settings for key per key collection, such as different Quota Limit.
Key can only exist in multiple key collections when Access Control List (ACL) of key collections does not overlap.
ACL overlaps when two or more key collections have the same endpoint assigned in ACL.

  1. In the collection panel, on the Keys tab, select one or more keys that you want to assign to a collection.

  2. Click Assign collection.

  3. In the Assign collection window, select collections you want your keys to be assigned to.
    Unless the collection ACLs overlap, you can assign keys to multiple collections.

  4. Click Assign to collections.

Unassign keys

You can unassign a key from collections but it has to be assigned to at least one collection.

  1. In the collection panel, on the Keys tab, select one or more keys that you want to unassign from the collection, and click Unassign collection.

  2. Confirm by clicking Unassign from collection.