Key and Quota Management API Data

This section details the JSON objects that the Key and Quota Management API provides as data.

Download the JSON schemas for this API.

The data schema tables below list membership requirements as follows:

Member is required to be present, regardless of whether its value is empty or null.
Member is optional, and may be omitted in some cases.

Collection

Encapsulates information about a collection.

Download schema: keyCollectionDto-schema.json

Sample GET response:

{
    "id": 55055,
    "name": "jwt",
    "description": "example",
    "keyCount": 41,
    "dirty": false,
    "contractId": "3-13H55B5",
    "groupId": 1024,
    "grantedACL": [
        "ENDPOINT-240184",
        "RESOURCE-10261",
        "RESOURCE-10260",
        "RESOURCE-10601",
        "RESOURCE-10600"
    ],
    "dirtyACL": [],
    "quota": {
        "enabled": false,
        "value": 100,
        "interval": "HOUR_1",
        "headers": {
            "denyLimitHeaderShown": true,
            "denyRemainingHeaderShown": true,
            "denyNextHeaderShown": true,
            "allowLimitHeaderShown": true,
            "allowRemainingHeaderShown": true,
            "allowResetHeaderShown": true
        }
    }
}

Collection Members

Member Type Required Description
contractId String The unique identifier for the contract with Akamai under which you provision the collection.
description String The description that you provide for the collection.
dirty Boolean Whether the collection contains changes that are being propagated to the Akamai network.
dirtyACL Array The endpoints or resources with ACL changes that are being propagated to the Akamai network.
grantedACL Array The endpoints or resources accessible to API consumers that identify with keys included in the collection.
groupId Integer The unique identifier for the group in the Luna portal under which you provision the collection.
id Integer The unique identifier for the collection.
keyCount Integer The number of keys included in the collection.
name String The name of the collection.
quota Collection.quota Encapsulates information about quota settings for the collection.

Collection.quota  

Encapsulates information about quota settings for the collection.

Member Type Required Description
enabled Boolean Whether you enabled quota settings in the collection.
headers Collection.quota.headers Encapsulates information about the criteria for sending the quota limit response headers.
interval Enumeration The time period for the quota limit in UTC, either HOUR_1 to reset at the start of each hour, HOUR_6 at the start of each sixth hour, HOUR_12 for twice daily, DAY for midnight each day, WEEK for midnight on each Monday, or MONTH for midnight on the first day of each month.
value Integer The number of requests that each key from the collection can send to an API within the specified time period.

Collection.quota.headers  

Encapsulates information about the criteria for sending the quota limit response headers.

Member Type Required Description
allowLimitHeaderShown Boolean Whether to send the X-RateLimit-Limit header in a response when the quota remains.
allowRemainingHeaderShown Boolean Whether to send the X-RateLimit-Remaining header in a response when the quota remains.
allowResetHeaderShown Boolean Whether to send the X-RateLimit-Reset header in a response when the quota remains.
denyLimitHeaderShown Boolean Whether to send the X-RateLimit-Limit header in a response when the quota is full.
denyNextHeaderShown Boolean Whether to send the X-RateLimit-Next header in a response when the quota is full.
denyRemainingHeaderShown Boolean Whether to send the X-RateLimit-Remaining header in a response when the quota is full.

Quota

Encapsulates information about quota settings.

Download schema: quotaCommand-schema.json

Sample GET response:

{
    "enabled": true,
    "value": 177,
    "interval": "HOUR_1",
    "headers": {
        "denyLimitHeaderShown": true,
        "denyRemainingHeaderShown": true,
        "denyNextHeaderShown": true,
        "allowLimitHeaderShown": true,
        "allowRemainingHeaderShown": true,
        "allowResetHeaderShown": true
    }
}

Quota Members

Member Type Required Description
enabled Boolean Whether you enabled quota settings in the collection.
headers Quota.headers Encapsulates information about the criteria for sending the quota limit response headers.
interval Enumeration The time period for the quota limit in UTC, either HOUR_1 to reset at the start of each hour, HOUR_6 at the start of each sixth hour, HOUR_12 for twice daily, DAY for midnight each day, WEEK for midnight on each Monday, or MONTH for midnight on the first day of each month.
value Integer The number of requests that each key from the collection can send to an API within the specified time period.

Quota.headers  

Encapsulates information about the criteria for sending the quota limit response headers.

Member Type Required Description
allowLimitHeaderShown Boolean Whether to send the X-RateLimit-Limit header in a response when the quota remains.
allowRemainingHeaderShown Boolean Whether to send the X-RateLimit-Remaining header in a response when the quota remains.
allowResetHeaderShown Boolean Whether to send the X-RateLimit-Reset header in a response when the quota remains.
denyLimitHeaderShown Boolean Whether to send the X-RateLimit-Limit header in a response when the quota is full.
denyNextHeaderShown Boolean Whether to send the X-RateLimit-Next header in a response when the quota is full.
denyRemainingHeaderShown Boolean Whether to send the X-RateLimit-Remaining header in a response when the quota is full.

Key

Encapsulates information about a key.

Download schema: keyDto-schema.json

Sample GET response:

{
    "id": 89003,
    "value": "cf527010-63e8-45ae-91e2-29757180631e",
    "label": "Weather",
    "tags": [
        "internal",
        "single"
    ],
    "collectionName": "InternalCollection",
    "collectionId": 58002,
    "description": "Key with weather label",
    "revoked": false,
    "dirty": true,
    "createdAt": "2017-09-04T11:49:13.632Z",
    "revokedAt": null,
    "terminationAt": null,
    "quotaUsage": 10,
    "quotaUsageTimestamp": "2017-11-02T09:12:23.891Z",
    "quotaUpdateState": "NONE"
}

Key Members

Member Type Required Description
collectionId Integer The unique identifier for the collection that includes the key.
collectionName String The name of the collection that includes the key.
createdAt String Read-only. The ISO 8601 timestamp for when the key was created.
description String The description that you provide for the key.
dirty Boolean Read-only. Whether changes to the key’s status are being propagated to the Akamai network.
id Integer The unique identifier for the key.
label String The label that you assign to the key.
quotaUpdateState Enumeration Read-only. The key’s quota reset status. Either NONE if no quota reset is in progress, QUEUED if the key is awaiting a quota reset, or PROCESSING if the key’s quota is currently being reset. When the quota resets, the status automatically changes from PROCESSING to NONE.
quotaUsage Integer Read-only. The current quota usage for the key. The value is -1 if the current usage is unknown.
quotaUsageTimestamp String Read-only. The ISO 8601 timestamp for when the key’s quota was updated.
revoked Boolean Read-only. Whether you revoked the key.
revokedAt String, Null Read-only. The ISO 8601 timestamp for when the key was revoked.
tags Array The additional categories associated with the key that you can use as filters.
terminationAt String, Null Read-only. The ISO 8601 timestamp for when the key will be deleted.
value String The value of the key.

CreateKey

Encapsulates information about a key to create.

Download schema: createNewKeyCommand-schema.json

Sample POST request:

{
    "collectionId": 58002,
    "mode": "CREATE_ONE",
    "tags": [
        "single",
        "new"
    ],
    "value": "ef527010-63e8-45ae-91e2-29757180631e",
    "label": "Test key",
    "description": "For test purposes only"
}

CreateKey Members

Member Type Required Description
collectionId Integer The unique identifier for the collection that includes the key.
collectionName String The name of the collection that includes the key.
createdAt String Read-only. The ISO 8601 timestamp for when the key was created.
description String The description that you provide for the key.
dirty Boolean Read-only. Whether changes to the key’s status are being propagated to the Akamai network.
id Integer The unique identifier for the key.
label String The label that you assign to the key.
mode Enumeration The key creation mode, either CREATE_ONE for creating a single key, or GENERATE_MULTIPLE for creating more than one key.
revoked Boolean Read-only. Whether you revoked the key.
revokedAt String Read-only. The ISO 8601 timestamp for when the key was revoked.
tags Array The additional categories associated with the key that you can use as filters.
terminationAt String Read-only. The ISO 8601 timestamp for when the key will be deleted.
value String The value of the key.

ImportKeys

Encapsulates information about an import file with details about API keys.

Download schema: importKeysCommand-schema.json

Sample POST request:

{
    "name": "import.json",
    "content": "[\n    {\n        \"value\": \"cf527010-63e8-45ae-91e2-29757180631e\",\n        \"label\": \"Weather \",\n        \"tags\": [\n            \"new\",\n            \"blue\"\n        ]\n    },\n    {\n        \"value\": \"cf557010-63e8-45fg-94e2-29757180631e\",\n        \"label\": \"Weather\",\n        \"tags\": [\n            \"new\",\n            \"red\"\n        ]\n    }\n]",
    "size": 271,
    "collectionId": 58002
}

ImportKeys Members

Member Type Required Description
collectionId Integer The unique identifier for the collection where keys should be imported.
content String The XML, CSV, or JSON data structure with details about keys to import.
name String The name of the file with keys to import.
size Integer The size of the file in bytes.

GenerateKeys

Encapsulates information about keys to generate.

Download schema: generateKeysCommand-schema.json

Sample POST request:

{
    "collectionId": 58002,
    "mode": "GENERATE_MULTIPLE",
    "tags": [
        "group",
        "generated"
    ],
    "count": 20,
    "incrementLabel": true,
    "label": "GeneratedKeys",
    "description": "Keys for bigger group"
}

GenerateKeys Members

Member Type Required Description
collectionId Integer The unique identifier for the collection that includes the key.
collectionName String The name of the collection that includes the key.
count Integer The number of keys to generate.
createdAt String Read-only. The ISO 8601 timestamp for when the key was created.
description String The description that you provide for the key.
dirty Boolean Read-only. Whether changes to the key’s status are being propagated to the Akamai network.
id Integer The unique identifier for the key.
incrementLabel Boolean Whether an automatic increment is appended to the label of each key.
label String The label that you assign to the key.
mode Enumeration The key creation mode, either CREATE_ONE for creating a single key, or GENERATE_MULTIPLE for creating more than one key.
revoked Boolean Read-only. Whether you revoked the key.
revokedAt String Read-only. The ISO 8601 timestamp for when the key was revoked.
tags Array The additional categories associated with the key that you can use as filters.
terminationAt String Read-only. The ISO 8601 timestamp for when the key will be deleted.
value String The value of the key.

MoveKeys

Encapsulates information about keys to move from one collection to another.

Download schema: moveKeysCommand-schema.json

Sample POST request:

{
    "newCollectionName": "NewCollection",
    "newCollectionDescription": "New collection of moved keys",
    "newCollectionContractId": "3-13H55B",
    "newCollectionGroupId": 1024,
    "keys": [
        89016,
        89015,
        89014
    ]
}

MoveKeys Members

Member Type Required Description
collectionId Integer The unique identifier for the existing destination collection.
keys Array The unique identifiers for the keys to move.
newCollectionContractId String The unique identifier for the contract with Akamai under which you provision the new destination collection.
newCollectionDescription String The description that you provide for the new destination collection.
newCollectionGroupId Integer The unique identifier for the group in the Luna portal under which you provision the new destination collection.
newCollectionName String The name that you assign to the new destination collection.

RevokeRestoreKeys

Encapsulates information about keys to revoke or restore.

Download schema: revokeKeysCommand-schema.json

Sample POST request:

{
    "keys": [
        89011,
        89012,
        89013
    ]
}

RevokeRestoreKeys Members

Member Type Required Description
keys Array The unique identifiers for the keys to revoke or restore.

Query

Encapsulates information about the available report filters and objects to report on.

Download schema: report-request-schema.json

Sample POST request:

{
    "filters": {
        "api_key": [
            "1234"
        ]
    }
}

Query Members

Member Type Required Description
filters Query.filters Encapsulates information about the custom quota reports filter, with the filter’s name keying an array containing the filter’s set of values.

Query.filters  

Encapsulates information about the custom quota reports filter, with the filter’s name keying an array containing the filter’s set of values.

Member Type Required Description
api_key Array The list of API key identifiers.

Report

Encapsulates the response report, including aggregated data and reflecting details on the request.

Download schema: report-response-schema.json

Sample POST response:

{
    "metadata": {
        "name": "rapidkey-by-quota",
        "version": "1",
        "groupBy": [
            "api_key"
        ],
        "interval": "FIVE_MINUTES",
        "start": "2018-05-16T00:00:00Z",
        "end": "2018-05-18T00:00:00Z",
        "availableDataEnds": "2018-05-17T09:00:50.771902Z",
        "suggestedRetryTime": null,
        "rowCount": 17,
        "filters": [
            {
                "name": "api_key",
                "values": [
                    "219002",
                    "245001"
                ]
            }
        ],
        "columns": [
            {
                "name": "groupBy",
                "label": "api_key"
            },
            {
                "name": "quotaUsage",
                "label": "Quota Used"
            }
        ],
        "objectType": "rapidfile",
        "objectIds": [
            "ymdfile"
        ]
    },
    "data": [
        {
            "api_key": " (244253)",
            "apikeyCollection": "100/hour",
            "time_interval": "0",
            "quotaUsage": "0"
        },
        {
            "api_key": " (244250)",
            "apikeyCollection": "100/twelve hours",
            "time_interval": "2",
            "quotaUsage": "0"
        },
        {
            "api_key": " (224173)",
            "apikeyCollection": "1000/month",
            "time_interval": "5",
            "quotaUsage": "0"
        }
    ],
    "summaryStatistics": {}
}

Report Members

Member Type Required Description
data Report.data[n] Encapsulates information about the report data rows suitable for aggregation. The value of the groupBy array serves as a key for each row to indicate the metric by which the row is grouped and sorted.
metadata Report.metadata Encapsulates information about the requested data set based on the request’s parameters and the contents of the query object. Provides information for use in the report output.
summaryStatistics Object Encapsulates summary statistics for a report. This is not applicable for quota reports and is always empty.

Report.data[n]  

Encapsulates information about the report data rows suitable for aggregation. The value of the groupBy array serves as a key for each row to indicate the metric by which the row is grouped and sorted.

Member Type Required Description
api_key String The API key description and the API key identifier in parentheses.
apikeyCollection String The maximum quota allowed per API key and the quota interval in a given key collection.
quotaUsage String The quota used by an API key in a given period.
startdatetime String The ISO–6801 timestamp indicating the start of each record in a report.
time_interval Enumeration The identifier for the quota interval, either 0 for an hour, 1 for six hours, 2 for twelve hours, 3 for a day, 4 for a week, or 5 for a month.

Report.metadata  

Encapsulates information about the requested data set based on the request’s parameters and the contents of the query object. Provides information for use in the report output.

Member Type Required Description
availableDataEnds String, Null For unfinalized report data, the ISO–8601 timestamp that indicates the date until which the data is available. Otherwise, the value is null for finalized data.
columns Report.metadata.columns[n] The list of interface labels for the data member.
end String The ISO–8601 timestamp indicating the end date for the requested data. This reflects the value of the Generate a Report operation’s end parameter.
filters Report.metadata.filters[n] Encapsulates information about the filters specified in the request.
groupBy Array The list of fields by which data is grouped and sorted. The groupBy field is specified in each data row.
interval Enumeration The duration of each record in the report, either FIVE_MINUTES, HOUR, DAY, WEEK, or MONTH. This reflects the value of the Generate a Report operation’s interval parameter.
name String The name of the current report type.
objectIds Array The list of internal identifiers related to reports. For quota reports, the array always contains a single entry: ymdfile.
objectType String The internal identifier related to reports. For quota reports, the value is always rapidfile.
rowCount Integer The total number of data records included in the report.
start String The ISO–8601 timestamp indicating the start date for the requested data. This reflects the value of the Generate a Report operation’s start parameter.
suggestedRetryTime String, Null For unfinalized report data, the ISO–8601 timestamp that indicates the estimated report completion date. Otherwise, the value is null for finalized data.
uri String The URL called to retrieve the report data.
version String The version of the current report type.

Report.metadata.columns[n]  

The list of interface labels for the data member.

Member Type Required Description
label String The interface label to assign to the corresponding name member.
name String The name of the corresponding data member.

Report.metadata.filters[n]  

Encapsulates information about the filters specified in the request.

Member Type Required Description
name String The name of the filter specified in the request or included in the default set for a given report type.
value Array The list of requested filter values.

Last modified: 5/22/2018