Docs Menu
Docs Home
/
MongoDB Cloud Manager
/ / / /

Get All Projects for the Current User

On this page

  • Resource
  • Request Parameters
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response
  • Response Document
  • results Embedded Document
  • Example Request
  • Example Response

Note

Groups and projects are synonymous terms. Your {PROJECT-ID} is the same as your project id. For existing groups, your group/project id remains the same. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.

Base URL: https://cloud.mongodb.com/api/public/v1.0

GET /groups

This endpoint doesn't use HTTP request path parameters.

The following query parameters are optional:

Name
Type
Necessity
Description
Default
pageNum
number
Optional
One-based integer that returns a subsection of results.
1
itemsPerPage
number
Optional
Number of items to return per page, up to a maximum of 500.
100
pretty
boolean
Optional
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 a list of results, the results object is an envelope. Cloud Manager adds the status field to the response body.

false
backupJobsEnabledOnly
boolean
Optional
Flag indicating whether to exclude daemons not enabled for backing up databases from the response. Set this to false to include daemon configurations with the backupJobsEnabled flag set to false.
true

This endpoint doesn't use HTTP request body parameters.

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.

Name
Type
Description
results
array
Array includes one object for each item detailed in the results Embedded Document section.
links
array
Array includes one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
totalCount
number
Integer count of the total number of items in the result set. It may be greater than the number of objects in the results array if the entire result set is paginated.

Each result is one project.

Name
Type
Description
activeAgentCount
integer

Number of active agents sending regular pings to Cloud Manager.

The value is refreshed about every 24 hours and cached. If you start a new agent or stop an existing one, the change can take up to 30 minutes to show up in the activeAgentCount field.

hostCounts
object
Total number of hosts by type. The embedded fields should be self-explanatory.
id
string
Unique identifier for the group.
lastActiveAgent
string
Time Cloud Manager last updated the activeAgentCount total for the project. Cloud Manager refreshes this value every 24 hours and caches it to record the number of active MongoDB Agents.
links
object array

One or more links to sub-resources and/or related resources. All links arrays in responses include at least one link called self. The relationships between URLs are explained in the Web Linking Specification.

name
string
Display name for the project.
orgId
string
Unique identifier for the organization to which the project belongs.
publicApiEnabled
boolean
Flag indicating that the API is enabled for this project. This is a read-only field that is always true.
replicaSetCount
integer
Total number of replica sets for this project.
shardCount
integer
Total number of shards for this project.
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}
← Projects