Get the apiKeyId
Get the apiKeyId
This is for:
System AdministratorThe apiKeyId
is a required parameter in any Coveo 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 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:
- Replace
<MyOrganizationId>
with the actual ID of the target Coveo organization (see Retrieve the organization ID).
In the Authorization
HTTP header:
-
Replace
<MyAccessToken>
with an access token (API key or OAuth2 token) that grants you the privilege to view API keys in the target organization (see Get your Coveo access token and Get the privileges of an access token).It’s impossible to authenticate this call using an API key, since an API key can’t have the privilege to edit or view other API keys.
The body of a successful response contains information about all API keys in the target Coveo organization, if not already done.
To find the apiKeyId
:
-
In the response body, use the
displayName
ordescription
parameter values to find the API key for which you want to get theapiKeyId
. -
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 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.",
...
},
...
]