v1
latestOpenAPI 3.0.22026-08-062794201004.1 KBModel Services API Keys (AI Data Plane)
List API keys
Lists all API keys for the given region in an organization.
In order to access this endpoint, the provided API key must have at least one of the following roles:
- Organization Owner
To learn more, see Organization, Project, and Database Access Overview.
get/v4/organizations/{organizationId}/aiServices/models/apiKeys
Query parameters
pageinteger
Sets the page you would like to view.
perPageinteger
Sets the number of results you would like to have on each page.
sortBystring[]
Sets the order of how you would like to sort the results and the key you would like to order by. Valid fields to sort the results are: name, createdAt, expiry.
sortDirection'asc' | 'desc'
The order in which the items will be sorted.
filterBystring
Example:region:eq:us-east-1
Filter criteria in the format 'field:operator:value'. Supported operators are 'eq' (equals). Currently, only 'region' is supported as a filter field. Example: region:eq:us-east-1
Response
Successfully listed all the API keys.
Example response
{
"data": [
{
"keyId": "60a95d98-8660-488c-a1e0-25b90e926a1e",
"name": "MyLanguageModelAPIKey",
"description": "API key for accessing GPT-4 models",
"expiry": 180,
"allowedCIDRs": [
"192.168.1.0/24",
"10.0.0.0/8"
],
"allowedModels": [
{
"id": "5ca127fe-49da-4a6a-aef9-08393b97643f",
"name": "GPT-4"
},
{
"id": "6db238gf-50eb-5b7b-bfg0-09404c08754g",
"name": "Claude 3"
}
],
"region": "us-east-1",
"audit": {
"createdBy": "ffffffff-aaaa-1414-eeee-000000000000",
"createdAt": "2021-09-01T12:34:56Z",
"modifiedBy": "ffffffff-aaaa-1414-eeee-000000000000",
"modifiedAt": "2021-09-01T12:34:56Z",
"version": 1
}
}
],
"cursor": {
"pages": {
"page": 2,
"next": 3,
"previous": 1,
"last": 10,
"perPage": 10,
"totalItems": 10
},
"hrefs": {
"first": "https://cloud.couchbase.com/v4/users?page=1&perPage=10",
"last": "https://cloud.couchbase.com/v4/users?page=1&perPage=10",
"previous": "https://cloud.couchbase.com/v4/users?page=1&perPage=10",
"next": "https://cloud.couchbase.com/v4/users?page=1&perPage=10"
}
}
}