Retrieve the organization ID
Retrieve the organization ID
This is for:
System AdministratorMost Coveo Platform REST API operations require that you specify a value for the organizationId parameter.
As its name implies, this parameter expects the unique and permanent ID of an existing Coveo organization as an argument.
The organization ID is automatically generated and contains a string of random characters.
For example: companysearch83n293c8 or a1b2c3d4e5cvoorg.
Use the Get all organizations operation to find the unique and permanent ID of a Coveo organization. You can also find it in the Coveo Administration Console.
Request template
GET https://platform.cloud.coveo.com/rest/organizations HTTP/1.1
Accept: application/json
Authorization: Bearer <MyAccessToken>
In the Authorization HTTP header:
-
Replace
<MyAccessToken>with an access token that grants the privilege to view the target Coveo organization (that is, the View access level level on the Organization domain) (see Create a Custom key, Manage privileges, Get the privileges of an access token, and Get your Coveo access token).
The body of a successful response (200 OK) is an array in which each element contains information about a Coveo organization your access token allows you to view.
The id property of each element is the unique and permanent ID of the corresponding Coveo organization.
|
|
Note
If you authenticate this call using a Coveo OAuth2 token whose corresponding identity has the privilege to view more than one Coveo organization (that is, the View access level on the Organization domain), the body of a successful response contains information about each of those organizations. Otherwise, if you authenticate this call using a valid API key, the body of a successful response only contains information about the Coveo organization this API key was created in. |
Sample request
Request - Getting information about the Coveo organizations an access token is allowed to see
GET https://platform.cloud.coveo.com/rest/organizations HTTP/1.1
Accept: application/json
Authorization: Bearer **********-****-****-****-************
Successful response - 200 OK
[
{
"createdDate": 1460705726000,
"displayName": "My Coveo Organization",
"emailNotificationsEnabled": false,
"id": "a1b2c3d4e5cvoorg",
"owner": {
"email": "asmith@example.com"
},
"readOnly": false
}
]