Docs Menu
Docs Home
/
MongoDB Ops Manager
/ / /

すべてのホスト割り当てを一覧表示する

すべてのホスト割り当てを取得します。

このリソースを正常に呼び出すには、API キーに Global Ownerロールが必要です。

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

GET /usage/assignments

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

名前
タイプ
必要性
説明
default

pretty

ブール値

任意

false

envelope

ブール値

任意

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

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

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

名前
説明

状態

HTTPレスポンス コード

envelope

期待される応答本体

false

クエリ パラメータ
タイプ
必要性
説明
default

startDate

string

必須

endDate

string

必須

pageNum

integer

必須

返すホスト割り当ての開始グループ。 グループ サイズは、 itemsPerPageで定義されます。 この値は 1 から始まります。

itemsPerPage

integer

必須

1 つのグループで返すホスト割り当ての数。

100

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

応答要素
タイプ
説明

ホスト

文字列の配列

提供された物理ホストにバインドされた仮想ホストのリスト。

hosts
.groupId

string

MongoDB Ops Managerがこの仮想ホストを配置するプロジェクトの一意の識別子。

hosts
.hostname

string

物理ホストにバインドされた仮想ホストのFQDN

プロセス

オブジェクトの配列

仮想ホスト上で実行されている MongoDB プロセス。

processes
.[n].cluster

オブジェクト

MongoDB プロセスが属するクラスターの名前。

processes
.[n].groupName

string

MongoDB プロセスが属するプロジェクトの名前。

processes
.[n].orgName

string

MongoDB プロセスが属する組織の名前。

processes
.[n].groupId

string

MongoDB プロセスが属するプロジェクトの一意の識別子です。

processes
.[n].hasConflictingServerType

ブール値

ノードのサーバータイプが他のノードと異なるかどうかを示すフラグ。

processes
.[n].name

string

MongoDB プロセスをホストしているノードの名前。

processes
.[n].processType

integer

MongoDB プロセスのタイプを表す数値。

serverType

オブジェクト

物理ホストのサーバータイプ。

詳細については、「 MongoDBの使用 」を参照してください。

serverType.name

string

MongoDB Ops Manager は、次のいずれかの値を返します。

  • DEV_SERVER

  • TEST_SERVER

  • PRODUCTION_SERVER

  • RAM_POOL

serverType. labels

string

MongoDB Ops Manager は、次のいずれかの値を返します。

  • Dev Server

  • Test Server

  • Production Server

  • Ram Pool

curl --user "{publicApiKey}:{privateApiKey}" --digest \
--header 'Accept: application/json' \
--include \
--request GET 'https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/usage/assignments?startDate=2020-07-23&endDate=2020-07-28&pageNum=1&itemsPerPage=100&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 "rel": "self",
4 "href": "http://usage.example.com/api/public/v1.0/usage/assignments?startDate=2020-07-23&endDate=2020-07-28&pageNum=1&itemsPerPage=100"
5 }],
6 "totalCount": 3,
7 "results": [{
8 "hostname": "virtual.host.lqhfcxlgzqtimcxf.internal.mongodb-0",
9 "processes": [{
10 "cluster": "sdivabux",
11 "groupName": "{projectName}",
12 "orgName": "{orgName}",
13 "groupId": "{groupId}",
14 "hasConflictingServerType": true,
15 "name": "replicaPrimary-0-proc0-run51839",
16 "processType": 7
17 },
18 {
19 "cluster": "sdivabux",
20 "groupName": "{projectName}",
21 "orgName": "{orgName}",
22 "groupId": "{groupId}",
23 "hasConflictingServerType": true,
24 "name": "replicaPrimary-0-proc1-run51839",
25 "processType": 7
26 }
27 ],
28 "serverType": {
29 "name": "PRODUCTION_SERVER",
30 "label": "Production Server"
31 },
32 "isChargeable": true,
33 "memSizeMB": 178
34 },
35 {
36 "hostname": "virtual.host.lqhfcxlgzqtimcxf.internal.mongodb-1",
37 "processes": [{
38 "cluster": "sdivabux",
39 "groupName": "{projectName}",
40 "orgName": "{orgName}",
41 "groupId": "{groupId}",
42 "hasConflictingServerType": true,
43 "name": "replicaSecondary-0-proc0-run51839",
44 "processType": 8
45 },
46 {
47 "cluster": "sdivabux",
48 "groupName": "{projectName}",
49 "orgName": "{orgName}",
50 "groupId": "{groupId}",
51 "hasConflictingServerType": true,
52 "name": "replicaSecondary-0-proc1-run51839",
53 "processType": 8
54 }
55 ],
56 "serverType": {
57 "name": "PRODUCTION_SERVER",
58 "label": "Production Server"
59 },
60 "isChargeable": true,
61 "memSizeMB": 178
62 },
63 {
64 "hostname": "virtual.host.lqhfcxlgzqtimcxf.internal.mongodb-2",
65 "processes": [{
66 "cluster": "sdivabux",
67 "groupName": "{projectName}",
68 "orgName": "{orgName}",
69 "groupId": "{groupId}",
70 "hasConflictingServerType": true,
71 "name": "replicaSecondary-0-proc1-run51839",
72 "processType": 8
73 },
74 {
75 "cluster": "sdivabux",
76 "groupName": "{projectName}",
77 "orgName": "{orgName}",
78 "groupId": "{groupId}",
79 "hasConflictingServerType": true,
80 "name": "replicaSecondary-0-proc0-run51839",
81 "processType": 8
82 }
83 ],
84 "serverType": {
85 "name": "RAM_POOL",
86 "label": "RAM Pool"
87 },
88 "isChargeable": true,
89 "memSizeMB": 178
90 }
91 ]
92 }

戻る

グローバル使用状況レポートアーカイブを取得

項目一覧