Get Available Disks for a MongoDB Process¶
Groups and projects are synonymous terms. Your {GROUP-ID}
is the
same as your project ID. For existing groups, your group/project ID
remains the same. The resource and corresponding endpoints use the
term groups
.
Get all disks or partitions for the specified Atlas MongoDB process. A
Atlas MongoDB process can be either a mongod
or
mongos
.
The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.
To learn how to configure API access for an Atlas project, see Configure Atlas API Access.
https://cloud.mongodb.com/api/atlas/v1.0
Resource¶
GET api/atlas/v1.0/groups/{GROUP-ID}/processes/{HOST}:{PORT}/disks
Request Path Parameters¶
Parameter | Required/Optional | Description |
---|---|---|
GROUP-ID | Required | ID of the project that owns this Atlas MongoDB process. |
HOST | Required | The hostname of the machine running the Atlas MongoDB process. |
PORT | Required | The port to which the Atlas MongoDB process listens. |
Request Query Parameters¶
Field | Required/Optional | Description |
---|---|---|
pageNum | Optional. | The page to return. Defaults to |
itemsPerPage | Optional. | Number of items to return per page, up to a maximum of 500. Defaults to |
includeCount | Optional. | A boolean that specifies whether or not to include the
Defaults to |
envelope | Optional. | A boolean that specifies whether or not to wrap the response in an envelope. Defaults to |
pretty | Optional. | A boolean that specifies whether or not to return a "pretty-printed" JSON document. Defaults to |
Request Body Parameters¶
This endpoint does not use HTTP request body parameters.
Response Elements¶
If you set the query element envelope
to true
, the response is wrapped
by the content
object.
The HTTP response returns a JSON document that includes the following objects:
results
Array- Each object in the
results
array represents a single disk for the MongoDB process.Name Type Description links
array An array containing a single document with the following format: You can use the{ "href" : "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/processes/{HOST}:{PORT}/disks/{DISK-ID}", "rel" : "self" } href
value to retrieve measurements for the disk.See Linking for more information onlinks
.partitionName
string The name of the disk or partition. You can use this value to retrieve measurements for the disk. links
Array- An array of documents, representing a link to one or more sub-resources and/or related resources such as list pagination. See Linking for more information.
totalCount
- The total number of items in the result set. This value may be higher than the
number of objects in the
results
array if the entire result set is paginated.
Example Request¶
Replace the information in brackets {}
with your own Atlas information
to execute this example request:
curl -u "<ATLAS-USERNAME>:<API-KEY>" --digest -i "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/processes/{HOST}:{PORT}/disks?pretty=true"
Example Response¶
{ "links":[ { "href":"https://cloud.mongodb.com/api/atlas/v1.0/groups/12345678/processes/shard-00-00.mongodb.net:27017/disks?pageNum=1&itemsPerPage=100", "rel":"self" } ], "results":[ { "links":[ { "href":"https://cloud.mongodb.com/api/atlas/v1.0/groups/12345678/processes/shard-00-00.mongodb.net:27017/disks/xvdb", "rel":"self" } ], "partitionName":"xvdb" } ], "totalCount":1 }