AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。

オートメーション構成の取得(機密情報の編集)

プロジェクトのオートメーション構成によって、MongoDB プロセスとエージェントの最終状態が決まります。 MongoDB Agent は、指定された目的に従って配置を構築します。

重要

プロジェクトのオートメーション構成には、パスワードやキー値などの機密情報が含まれる場合があります。このリソースは、機密情報が編集されたオートメーション構成を取得します。編集されていないオートメーション構成を取得するには、/groups/{グループ ID}/automationConfig エンドポイントとなる接続されたデバイスを使用します。

このリソースにはProject Automation Adminロールが必要です。

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

GET /groups/{PROJECT-ID}/automationConfig/noSecrets
名前
タイプ
必要性
説明

プロジェクトID

string

必須

オートメーション構成を所有するグループの一意の識別子。

次のクエリ パラメータは 任意です。

名前
タイプ
必要性
説明
default

pretty

ブール値

任意

レスポンス本体をpretty-print形式にするかどうかを示すフラグ。

false

envelope

ブール値

任意

応答をエンベロープでラップするかどうかを示すフラグ。

一部の API クライアントは、HTTP レスポンス ヘッダーまたはステータス コードにアクセスできません。これを修正するには、クエリで envelope=true を設定します。

1 つの結果を返すエンドポイントの場合、レスポンス本体には次のものが含まれます。

  • status: HTTPレスポンス コード

  • content: 期待される応答本体

false

このエンドポイントは、HTTP リクエスト本体パラメータを使用しません。

これらのパラメーターを確認するには、「オートメーション構成パラメーター 」を参照してください。

curl --user "{publicApiKey}:{privateApiKey}" --digest \ --header "Accept: application/json" \ --include \ --request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/automationConfig/noSecrets?pretty=true" \ --output currentAutomationConfigRedacted.json
HTTP/1.1 401 UnauthorizedContent-Type: application/json;charset=ISO-8859-1Date: {dateInUnixFormat}WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=falseContent-Length: {requestLengthInBytes}Connection: keep-alive
HTTP/1.1 200 OKVary: Accept-EncodingContent-Type: application/jsonStrict-Transport-Security: max-age=300Date: {dateInUnixFormat}Connection: keep-aliveContent-Length: {requestLengthInBytes}X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}

次の例レスポンス ボディは、機密情報がリダクションされたオートメーション構成の例を示しています。/groups/{PROJECT-ID}/automationConfig/noSecrets エンドポイントとなる接続されたデバイスは、機密フィールド値が string <redacted> に置き換えられた編集済みテキストを返します。

{ "backupVersions": [ { "hostname": "test-2.aabc.3172.mongodbdns.com" } ], "mongoDbVersions": [ { "name": "4.4.0" } ], "monitoringVersions": [ { "hostname": "test-2.aabc.3172.mongodbdns.com" } ], "options": { "downloadBase": "/var/lib/mongodb-mms-automation", "downloadBaseWindows": "%SystemDrive%\\MMSAutomation\\versions" }, "processes": [ { "args2_6": { "net": { "port": 27017 }, "operationProfiling": {}, "replication": { "replSetName": "replSet1" }, "storage": { "dbPath": "/data/replSet1_10" }, "systemLog": { "destination": "file", "path": "/data/replSet1_10/mongodb.log" } }, "hostname": "test-2.aabc.3172.mongodbdns.com", "logRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "auditLogRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "name": "replSet1_10", "directAttachVerificationKey": "<redacted>", "processType": "mongod", "version": "4.4.0", "authSchemaVersion": 5, "featureCompatibilityVersion": "4.2" }, { "args2_6": { "net": { "port": 27017 }, "operationProfiling": {}, "replication": { "replSetName": "replSet1" }, "storage": { "dbPath": "/data/replSet1_11" }, "systemLog": { "destination": "file", "path": "/data/replSet1_11/mongodb.log" } }, "hostname": "test-1.aabc.3172.mongodbdns.com", "logRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "auditLogRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "name": "replSet1_11", "directAttachVerificationKey": "<redacted>", "processType": "mongod", "version": "4.4.0", "authSchemaVersion": 5, "featureCompatibilityVersion": "4.2" }, { "args2_6": { "net": { "port": 27017 }, "operationProfiling": {}, "replication": { "replSetName": "replSet1" }, "storage": { "dbPath": "/data/replSet1_12" }, "systemLog": { "destination": "file", "path": "/data/replSet1_12/mongodb.log" } }, "hostname": "test-0.aabc.3172.mongodbdns.com", "logRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "auditLogRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "name": "replSet1_12", "directAttachVerificationKey": "<redacted>", "processType": "mongod", "version": "4.4.0", "authSchemaVersion": 5, "featureCompatibilityVersion": "4.2" }, { "args2_6": { "net": { "port": 27018 }, "operationProfiling": {}, "replication": { "replSetName": "replSet1" }, "storage": { "dbPath": "/data/replSet1_13" }, "systemLog": { "destination": "file", "path": "/data/replSet1_13/mongodb.log" } }, "hostname": "test-2.aabc.3172.mongodbdns.com", "logRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "auditLogRotate": { "sizeThresholdMB": 1000, "timeThresholdHrs": 24 }, "name": "replSet1_13", "directAttachVerificationKey": "<redacted>", "processType": "mongod", "version": "4.4.0", "authSchemaVersion": 5, "featureCompatibilityVersion": "4.2" } ], "replicaSets": [ { "_id": "replSet1", "protocolVersion": "1", "members": [ { "_id": 0, "arbiterOnly": false, "hidden": true, "host": "replSet1_10", "priority": 0.0, "secondaryDelaySecs": 200, "votes": 0 }, { "_id": 1, "arbiterOnly": false, "hidden": false, "host": "replSet1_11", "priority": 1.0, "secondaryDelaySecs": 0, "votes": 1 }, { "_id": 2, "arbiterOnly": false, "hidden": false, "host": "replSet1_12", "priority": 1.0, "secondaryDelaySecs": 0, "votes": 1 }, { "_id": 3, "arbiterOnly": true, "hidden": false, "host": "replSet1_13", "priority": 0.0, "secondaryDelaySecs": 0, "votes": 1 } ] } ], "roles": [], "sharding": [], "indexConfigs": [ { "key": [ [ "field", "1" ] ], "rsName": "replSet1", "dbName": "db", "collectionName": "collection" } ]}