Docs Menu
Docs Home
/
MongoDB Ops Manager
/ / /

List All Host Assignments In One Organization

On this page

  • Required Roles
  • Request
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response
  • Example Request
  • Example Response
  • Response Header
  • Response Body

Retrieves all host assignments for one organization.

Your API Key must have the Global Owner role to successfully call this resource.

Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

GET /usage/organizations/{orgId}/hosts

Ops Manager requires all path parameters:

Path Parameter
Type
Description

orgId

string

Unique identifier of the organization associated with the desired hosts.

Name
Type
Necessity
Description
Default

pretty

boolean

Optional

Flag indicating whether the response body should be in a prettyprint format.

false

envelope

boolean

Optional

Flag that indicates whether or not to wrap the response in an envelope.

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

For endpoints that return one result, the response body includes:

Name
Description

status

HTTP response code

content

Expected response body

false

Query Parameter
Type
Necessity
Description
Default

startDate

string

Required

Date in ISO 8601 date format when the list of host assignments starts.

endDate

string

Required

Date in ISO 8601 date format when the list of host assignments ends.

pageNum

integer

Required

Starting group of host assignments to return. Group size gets defined in itemsPerPage. This value starts with 1.

itemsPerPage

integer

Required

Number of host assignments to return in one group.

100

This endpoint doesn't use HTTP request body parameters.

Response Element
Type
Description

hosts

array of strings

List of virtual hosts bound to the provided physical host.

hosts
.groupId

string

Unique identifier of the project into which Ops Manager places this virtual host.

hosts
.hostname

string

FQDN of the virtual host bound to the physical host.

processes

array of objects

MongoDB processes running on the virtual host.

processes
.[n].cluster

object

Name of the cluster to which the MongoDB process belongs.

processes
.[n].groupName

string

Name of the project to which the MongoDB process belongs.

processes
.[n].orgName

string

Name of the organization to which the MongoDB process belongs.

processes
.[n].groupId

string

Unique identifier of the project to which the MongoDB process belongs.

processes
.[n].hasConflictingServerType

Boolean

Flag that indicates whether the node has a different server type than the other nodes.

processes
.[n].name

string

Name of the node hosting the MongoDB process.

processes
.[n].processType

integer

Number representing the type of MongoDB process.

serverType

object

Server Type of the physical host.

To learn more, see MongoDB Usage.

serverType.name

string

Ops Manager returns one of the following values:

  • DEV_SERVER

  • TEST_SERVER

  • PRODUCTION_SERVER

  • RAM_POOL

serverType.label

string

Ops Manager returns one of the following values:

  • 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/organizations/{orgId}/hosts?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.ojrvazgboepawjci.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.ojrvazgboepawjci.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.ojrvazgboepawjci.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}

Back

Update Server Type