返回指定组织的所有组织 API 密钥。 组织 API 密钥授予对组织的编程访问权限。您无法使用API密钥通过控制台登录MongoDB Cloud。
唯一的 24-十六进制数字 string,用于标识包含项目的组织。使用 /orgs 终结点检索经过身份验证的用户访问权限检索的所有组织。
格式应符合以下模式:^([a-f0-9]{24})$。
指示应用程序是否将响应包装在envelope JSON 对象中的标志。某些 API 客户端无法访问 HTTP 响应标头或状态代码。要修复此问题,请在查询中设置 Envelope=true。返回结果列表的端点将结果对象用作 envelope。应用程序将状态参数添加到响应正文中。
默认值为false 。
指示MongoDB Cloud 是否计算响应的项目总数的标志。设立为 false 时, MongoDB Cloud 可能会跳过额外的计数操作。当计数可用而无需额外计算时,响应仍可能包括 totalCount。
默认值为true 。
响应每页返回的列项数。
最小值为 1,最大值为 500。默认值为 100。
显示响应返回的当前总对象集的页面编号。
最小值为 1。默认值为 1。
指示响应正文是否应采用 prettyprint 格式的标记。
默认值为false 。
curl \
--request GET 'https://cloud.mongodb.com/api/atlas/v1.0/orgs/4888442a3354817a7320eb61/apiKeys' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"desc": "string",
"id": "32b6e34b3d91647abb20e7b8",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"privateKey": "55c3bbb6-b4bb-0be1-e66d20841f3e",
"publicKey": "zmmrboas",
"roles": [
{
"groupId": "32b6e34b3d91647abb20e7b8",
"orgId": "32b6e34b3d91647abb20e7b8",
"roleName": "string"
}
]
}
],
"totalCount": 42
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 401,
"errorCode": "NOT_ORG_GROUP_CREATOR",
"reason": "Unauthorized"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 403,
"errorCode": "CANNOT_CHANGE_GROUP_NAME",
"reason": "Forbidden"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"error": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"reason": "Not Found"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 500,
"errorCode": "UNEXPECTED_ERROR",
"reason": "Internal Server Error"
}