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

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

注意

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

ベース URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

GET /groups

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

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

名前
タイプ
必要性
説明
default

pageNum

数値

任意

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

1

itemsPerPage

数値

任意

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

100

pretty

ブール値

任意

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

false

envelope

ブール値

任意

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

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

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

false

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

応答JSONドキュメントには、result オブジェクトの配列、link オブジェクトの配列、および取得された result オブジェクトの合計数が含まれます。

名前
タイプ
説明

results

配列

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

links

配列

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

totalCount

数値

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

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

名前
タイプ
説明

ActiveAgentCount

integer

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

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

hostCounts

オブジェクト

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

id

string

プロジェクトの一意の識別子です。

lastActiveAgent

string

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

ldapGroupMappings

オブジェクト配列

LDAPベースのMongoDB Ops Managerの場合、 LDAPグループのMongoDB Ops Managerプロジェクト ロールへのマッピング。 LDAP ベースのMongoDB Ops Managerにのみ存在します。

ldapGroupMappings
.roleName

string

MongoDB Ops Manager ユーザー ロール。 プロジェクト ロールのroleNameへのマッピングは次のとおりです。

ユーザー ロール
roleName 値

Project Owner (必須)

GROUP_OWNER

GROUP_AUTOMATION_ADMIN

GROUP_BACKUP_ADMIN

GROUP_MONITORING_ADMIN

GROUP_DATA_ACCESS_ADMIN

GROUP_DATA_ACCESS_READ_WRITE

GROUP_DATA_ACCESS_READ_ONLY

GROUP_READ_ONLY

ldapGroupMappings
.ldapGroups

string 配列

MongoDB Ops Manager ロールにマッピングする LDAP プロジェクト。

Links

オブジェクト配列

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

name

string

プロジェクトの表示名。

orgId

string

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

publicApiEnabled

ブール値

このプロジェクトでAPIが有効になっていることを示すフラグ。これは常に true である読み取り専用フィールドです。

replicaSetCount

integer

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

shardCount

integer

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

tags

string 配列

プロジェクトをプログラム的に識別するために使用されるプロジェクトに割り当てられたタグ。

プロジェクトには最大 10 個のタグを含めることができます。 タグは次のルールに従います。

  • 大文字と小文字を区別する

  • 次の文字を含めることができます。

    • A による Z

    • 0 による 9

    • . (期間)

    • _ (アンダースコア)

    • - (dash)

  • 32 文字に制限されています

1curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
2 --header "Accept: application/json" \
3 --include \
4 --request GET "https://{opsManagerHost}:{port}/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://<OpsManagerHost>:<Port>/api/public/v1.0/groups?pretty=true&pageNum=1&itemsPerPage=100",
4 "rel": "self"
5 }, {
6 "href": "https://<OpsManagerHost>:<Port>/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://<OpsManagerHost>:<Port>/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://<OpsManagerHost>:<Port>/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://<OpsManagerHost>:<Port>/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://<OpsManagerHost>:<Port>/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://<OpsManagerHost>:<Port>/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}