1. Token API

ListAll

The ListAll endpoint lists all API keys in your solution.

Relative Route/
HTTP VerbGET

Query string parameters

The following table lists the available query string parameters, which are all optional:

NameFormatDescription
scopesArray of stringsDefines the scopes of the returned keys. If not provided, all keys are returned.
labelStringDefines the label or part of the label to filter the keys. All keys containing this string are returned. If not provided, all keys are returned.
pagesizeIntegerDefines the number of results returned per page. Default: 20.
pagenumberIntegerDefines the page number to return. Default: 1 (returns the first page of results).
filterRevokedBooleanIf this is set to true, only active API keys are returned. If set to false, keys are returned regardless of whether they are active. Default: false.
createdByStringIf you only want to return API keys created by a specific user, assign their user name to this parameter. Otherwise, the query returns keys regardless of who created them.

The scopes parameter can appear multiple times in the query string, as shown in the following example:

https://edge.sitecorecloud.io/api/apikey/v1?scopes=audience-delivery&scopes=content-someid&label=mine&pagesize=50&pagenumber=3&filterRevoked=true&createdby=ADN

Response body

The response includes a list of API keys for each tenant.

{
 "totalCount": 2,
 "pageSize": 20,
 "currentPage": 1,
 "totalPages": 1,
 "hasNext": false,
 "hasPrevious": false,
 "keys": [
  {
   "TenantId": "Sitecore-tenant-id",
   "Hash": "example_hash",
   "IsRevoked": false,
   "Label": "Example key",
   "Scopes": ["scope1", "scope2"],
   "CreatedBy": "ADN",
   "Created": "2023-01-23"
  },
  {
   "TenantId": "Sitecore-tenant-id",
   "Hash": "example_hash_2",
   "IsRevoked": false,
   "Label": "Example key 2",
   "Scopes": ["scope3", "scope4"],
   "CreatedBy": "ADN",
   "Created": "2023-01-23"
  }
 ]
}
If you have suggestions for improving this article, let us know!