MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home

SSH キー

注意

グループとプロジェクトは同義語です。 あなたの {PROJECT-ID}はプロジェクト ID と同じです。 既存のグループの場合、グループ/プロジェクト ID は同じままです。 このページでは、説明を参照するときに、より一般的な用語の グループ を使用します。 エンドポイントは ドキュメントに記載されているままです。

sshKeysリソースには、Cloud Manager のクラウドサービス プロバイダーとの統合を通じてサーバーをプロビジョニングするときに選択できる公開鍵が表示されます。 新しいサーバーをプロビジョニングすると、 Cloud Managerは公開キーをサーバーの許可されたキー リストに追加します。 プロビジョニングされたサーバーにログするには、対応する秘密キーが必要です。

Cloud Managerとクラウドサービス プロバイダーの統合の詳細については、「 サーバーのプロビジョニング 」を参照してください。

ベース URL: https://cloud.mongodb.com/api/public/v1.0

GET /groups/{PROJECT-ID}/sshKeys
GET /groups/{PROJECT-ID}/sshKeys/KEY-ID
GET /groups/{PROJECT-ID}/sshKeys/byName/KEY-NAME
POST /groups/{PROJECT-ID}/sshKeys
DELETE /groups/{PROJECT-ID}/sshKeys/KEY-ID
{
"id" : "545e3e3ae4b08a04fbc21005",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}
名前
タイプ
説明

id

string

Unique identifier.

name

string

Cloud Manager Provisioning Settingsに表示される公開キーの名前。 プロビジョニングの詳細については、「サーバーのプロビジョニング 」を参照してください。

publicKey

string

公開キーの内容。

関係
説明

自己

Me

http://mms.mongodb.com/group

SSH キーが属するプロジェクト

curl -u "username:apiKey" --digest -i "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"totalCount" : 1,
"results" : [ {
"id" : "545e3e3ae4b08a04fbc21005",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}, { ...} ],
"links" : []
}
curl -u "username:apiKey" --digest -i "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys/545e3e3ae4b08a04fbc21005"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"id" : "545e3e3ae4b08a04fbc21005",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}
curl -u "username:apiKey" --digest -i -H "Content-Type: application/json" -X POST "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys" --data '
{
"name" : "myKey",
"publicKey" : "<ssh-key>"
}'
HTTP/1.1 201 Created
{
"id" : "54c7a8bee4b0b5a9451be44e",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}
curl -u "username:apiKey" --digest -i -X DELETE "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys/545e3e3ae4b08a04fbc21005"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}

このエンドポイントは、レスポンス本体を返しません。

項目一覧