Jan 31, 2024 — New API Keys and Traffic Management version
almost 2 years ago
A new version (v2) of API Keys and Traffic Management is now available.
The previous one (v1) is deprecated and will sunset at the end of July 2024.
The new version of the product supports the already existing functionality and includes the following changes:
- Possibility to assign the
keyobject to many collections. The object contains an array of the collections that store basic information about the assigned key collections. Previously,keycontained information about only one collection. - The
keyValueobject is now an array of strings with separated key values. Previously, the values were gathered in a single string separated by a comma, semicolon, or a new line. - In the following endpoints the arrays, previously returned as JSON arrays, are wrapped into the parent objects:
- /v2/collections
- /v2/counters
- /v2/counters/{counterId}keys
- /v2/tags
- The
headersConfigobject for quota contains two arrays. Each one specifies the headers sent to the client depending on the quota state. Previously, it was sent as an object of booleans. - The
headersConfigobject for throttling is now sent as an object with two arrays specifying the headers sent to the client and the ones sent to the origin server. Previously, it was sent as an object of booleans. - The
grantedACLandrulesobjects were renamed into theaclEntriesandthrottlingRulesobjects, and restructured.aclEntriesincludes three arrays:endpointIds,resourceIds, andmethodIds.throttlingRulesincludesaclEntries, and two arrays of integers:keyIdsandkeyCollectionIds. - The endpoints responsible for importing keys were moved from
/v1/keys/importto/v2/collections/{collectionId}/import-keys. Now,collectionIdis specified in the URL path parameter, the format of the imported file is specified by the request headerContent-Type, and the file is passed as a request body. - Two new endpoints were introduced:
- /v2/keys/assign
- /v2/keys/unassign
