Api Keys
Create API Key
Changed onCreates a new API key under an organization.
Organization Owners can create Organization and Project scoped API keys.
Project Owner and Project Creator can create project scoped keys.
To learn more, see Organization, Project, and Database Access Overview.
post/v4/organizations/{organizationId}/apikeys
Request
- Base URLhttps://cloudapi.cloud.couchbase.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"name": "Production",
"description": "API key to manage production Capella Cluster.",
"allowedCIDRs": [
"0.0.0.0/0"
],
"organizationRoles": [
"organizationMember"
],
"resources": [
{
"id": "ffffffff-aaaa-1414-eeee-000000000000",
"roles": [
"projectDataReaderWriter",
"projectManager"
]
}
]
}Response
Successfully created an API key under an organization.
Example response
{
"id": "IS9DrRsw4KWFS72Zhbj4xmhllHvPcdCL",
"token": "QktxVUtFU1dKV1FlMmxwbzJBYXdnTVlRemFZdlRDZTg6eFh4dzU4JUYjekJVYWZPY3lqdUwwYkJoTjZSTmlzRWFIRHF0b1h4a08yazBpQjJ1bms1OW4yTUhAenRib3IhVQ=="
}Changes
- info
added the new
organizationBillingAdminenum value to the request property/ - info
added the new
organizationBillingViewerenum value to the request property/ - info
added the new
organizationReadOnlyenum value to the request property/
- info