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

現在のユーザーのすべてのプロジェクトを取得

注意

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

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

GET /groups

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

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

名前
タイプ
必要性
説明
default

pageNum

数値

任意

結果のサブセクションを返す 1 から始まる整数。

1

itemsPerPage

数値

任意

1 ページあたりに返す項目の数は最大 500 です。

100

pretty

ブール値

任意

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

false

envelope

ブール値

任意

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

Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope : true in the query.

結果のリストを返すエンドポイントの場合、 contentオブジェクトはエンベロープです。 Cloud Manager は、レスポンス本体にstatusフィールドを追加します。

false

backupJobsEnabledOnly

ブール値

任意

データベースのバックアップ用に有効になっていないデーモンを応答から除外するかどうかを示すフラグ。 これをfalseに設定し、 backupJobsEnabledフラグがfalseに設定されているデーモン構成を含めます。

true

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

The response JSON document includes an array of result objects, an array of link objects and a count of the total number of result objects retrieved.

名前
タイプ
説明

results

配列

配列には、results 埋め込みドキュメント セクションに詳細な項目ごとに 1 つのオブジェクトが含まれます。

links

配列

配列には、サブリソースや関連リソースへの 1 つ以上のリンクが含まれます。 URL 間の関係は、 Web リンク仕様 で説明されています。

totalCount

数値

結果セット内の項目の合計数の整数。 結果セット全体がページ分割される場合は、 results配列内のオブジェクト数よりも大きくなる可能性があります。

結果は 1 つのプロジェクトです。

名前
タイプ
説明

ActiveAgentCount

integer

Cloud Manager に定期的に ping を送信するアクティブなエージェントの数。

値は約24時間ごとに更新され、キャッシュされます。 新しいエージェントを開始するか、既存のエージェントを停止した場合、変更がactiveAgentCountフィールドに表示されるまでに最大30分かかることがあります。

hostCounts

オブジェクト

タイプ別のホストの合計数。 埋め込みフィールドは自己説明型である必要があります。

id

string

グループの一意の識別子です。

lastActiveAgent

string

Cloud Manager がプロジェクトのactiveAgentCountの合計を最後に更新した時間。 Cloud Manager はこの値を24時間ごとに更新し、アクティブな MongoDB エージェントの数を記録するためにキャッシュします。

Links

オブジェクト配列

サブリソースや関連リソースへの 1 つ以上のリンク。応答内のすべての links 配列には、self と呼ばれるリンクが少なくとも 1 つ含まれています。URLの関係は、Web リンク仕様で説明されています。

name

string

プロジェクトの表示名。

orgId

string

プロジェクトが属する組織のユニーク識別子。

publicApiEnabled

ブール値

Flag indicating that the API is enabled for this project. This is a read-only field that is always true.

replicaSetCount

integer

このプロジェクトのレプリカセットの合計数。

shardCount

integer

このプロジェクトのシャードの合計数。

1curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
2 --header "Accept: application/json" \
3 --include \
4 --request GET "https://cloud.mongodb.com/api/public/v1.0/groups?pretty=true"
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}
1{
2 "links": [{
3 "href": "https://cloud.mongodb.com/api/public/v1.0/groups?pretty=true&pageNum=1&itemsPerPage=100",
4 "rel": "self"
5 }, {
6 "href": "https://cloud.mongodb.com/api/public/v1.0/groups?pretty=true&itemsPerPage=100&pageNum=2",
7 "rel": "next"
8 }],
9 "results": [{
10 "activeAgentCount": 0,
11 "hostCounts": {
12 "arbiter": 0,
13 "config": 0,
14 "mongos": 0,
15 "primary": 0,
16 "secondary": 0
17 },
18 "id": "56a10a80e4b0fd3b9a9bb0c2",
19 "lastActiveAgent": "2016-03-09T18:19:37Z",
20 "links": [{
21 "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}",
22 "rel": "self"
23 }],
24 "name": "012i3091203jioawjioej",
25 "orgId": "5980cfdf0b6d97029d82f86e",
26 "publicApiEnabled": true,
27 "replicaSetCount": 0,
28 "shardCount": 0,
29 "tags": []
30 }, {
31 "activeAgentCount": 0,
32 "hostCounts": {
33 "arbiter": 0,
34 "config": 0,
35 "mongos": 0,
36 "primary": 0,
37 "secondary": 0
38 },
39 "id": "56aa691ce4b0a0e8c4be51f7",
40 "lastActiveAgent": "2016-01-29T19:02:56Z",
41 "links": [{
42 "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}",
43 "rel": "self"
44 }],
45 "name": "1454008603036",
46 "orgId": "5980d0040b6d97029d831798",
47 "publicApiEnabled": true,
48 "replicaSetCount": 0,
49 "shardCount": 0,
50 "tags": []
51 }, {
52 "activeAgentCount": 0,
53 "hostCounts": {
54 "arbiter": 0,
55 "config": 0,
56 "mongos": 0,
57 "primary": 0,
58 "secondary": 0
59 },
60 "id": "56aa6dfde4b0fe328eee82ad",
61 "lastActiveAgent": "2016-01-29T20:34:28Z",
62 "links": [{
63 "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}",
64 "rel": "self"
65 }],
66 "name": "1454009852809",
67 "orgId": "5980d0040b6d97029d831799",
68 "publicApiEnabled": true,
69 "replicaSetCount": 0,
70 "shardCount": 0,
71 "tags": []
72 }, {
73 "activeAgentCount": 0,
74 "hostCounts": {
75 "arbiter": 0,
76 "config": 0,
77 "mongos": 0,
78 "primary": 0,
79 "secondary": 0
80 },
81 "id": "56aa8421e4b0d04c1c54df99",
82 "lastActiveAgent": "2016-01-29T21:36:10Z",
83 "links": [{
84 "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}",
85 "rel": "self"
86 }],
87 "name": "1454015520776",
88 "orgId": "5980d0040b6d97029d83179a",
89 "publicApiEnabled": true,
90 "replicaSetCount": 0,
91 "shardCount": 0,
92 "tags": []
93 }, {
94 "activeAgentCount": 0,
95 "hostCounts": {
96 "arbiter": 0,
97 "config": 0,
98 "mongos": 0,
99 "primary": 0,
100 "secondary": 0
101 },
102 "id": "56aa85f9e4b0d04c1c54e347",
103 "lastActiveAgent": "2016-01-29T21:36:10Z",
104 "links": [{
105 "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}",
106 "rel": "self"
107 }],
108 "name": "1454015992252",
109 "orgId": "5980d0040b6d97029d83179b",
110 "publicApiEnabled": true,
111 "replicaSetCount": 0,
112 "shardCount": 0,
113 "tags": []
114 }],
115 "totalCount": 5
116}