1 つの組織の API キーを返します。組織 API キーは、組織へのプログラムによるアクセスを許可します。API キーを使用して、ユーザー インターフェイスから MongoDB Cloud にログインすることはできません。このリソースを使用するには、リクエスト元のサービス アカウントまたは API キーに組織メンバーのロールが必要です。
プロジェクトを含む組織を識別する一意の 24 桁の 16 進数 string。認証済みユーザーがアクセスできるすべての組織を取得するには、/orgs エンドポイントを使用します。
形式は次のパターンと一致する必要があります: ^([a-f0-9]{24})$。
更新したい組織 API を識別する、ユニークな 24 桁の 16 進数の文字列。
形式は次のパターンと一致する必要があります: ^([a-f0-9]{24})$。
アプリケーションがレスポンスを envelope JSON オブジェクトにラップするかどうかを示すフラグ。一部の API クライアントは、HTTP レスポンス ヘッダーまたはステータス コードにアクセスできません。これを修正するには、クエリで envelope=true を設定します。結果のリストを返すエンドポイントは、結果オブジェクトをエンベロープとして使用します。アプリケーションは、レスポンス本体にステータス パラメータを追加します。
デフォルト値はfalseです。
レスポンス本体を pretty-print 形式にするかどうかを示すフラグ。
デフォルト値はfalseです。
curl \
--request GET 'https://cloud.mongodb.com/api/atlas/v1.0/orgs/4888442a3354817a7320eb61/apiKeys/{apiUserId}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"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"
}
]
}
{
"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"
}