Getting the apiKeyId

The apiKeyId is a required parameter in any Coveo Cloud Platform REST API operation that interacts with a single specific API key.

Use the Get all api keys for this organization operation to find the apiKeyId of an API key in a specific Coveo Cloud organization:

Request template

GET https://platform.cloud.coveo.com/rest/organizations/<MyOrganizationId>/apiKeys HTTP/1.1
 
Accept: application/json
Authorization: Bearer <MyAccessToken>

In the request path:

In the Authorization HTTP header:

The body of a successful response contains information about all API keys in the target Coveo Cloud organization, if not already done.

To find the apiKeyId:

  1. In the response body, use the displayName or description parameter values to find the API key for which you want to get the apiKeyId.

  2. Copy for the id property value of the API key.

The only time you can get the full unmasked value property of an API key is when you initially create that key.

Sample Request

Getting information about all API keys in a specific Coveo Cloud organization

GET https://platform.cloud.coveo.com/rest/organizations/mycoveocloudv2organizationg8tp8wu3/apiKeys HTTP/1.1
 
Accept: application/json
Authorization: Bearer **********-****-****-****-************

Successful response - 200 OK

[
  {
    "id": "wduuqg3ip2c3i3gpopapxhcgxe", // This is the `apiKeyId` of the `My Source API Key` API key.
    "value": "**********-****-****-****-********1b3e",
    "organizationId": "mycoveocloudv2organization",
    "displayName": "My Source API Key",
    "description": "An API key to edit and view sources.",
    ...
  },
  ...
]
Recommended Articles