Navigation

Get All Databases on a Host

Base URL: https://<ops-manager-host>/

Resource

/api/public/v1.0/groups/{GROUP-ID}/hosts/{HOST-ID}/databases

Retrieve all databases running on the specified host.

Request Path Parameters

Parameter Required/Optional Description
GROUP-ID Required ID of the group that owns this MongoDB process.
HOST-ID Required ID of the host running the MongoDB process.

Request Query Parameters

This endpoint does not use HTTP query parameters.

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response

The HTTP response contains the totalCount of the databases running on the host and a results array containing a document for each of the databases. Each document contains the following elements:

Name Type Description
databaseName string The name of the database.
links array Links to the group that the database belongs to, the MongoDB host running the database, and database measurements. The relations between URLs are explained in the Web Linking Specification.

Example Request

curl -i -u "username:apiKey" --digest "https://<ops-manager-host>/api/public/v1.0/groups/533c5895b910306f21033a/hosts/fd5b59188dc13ad142493/databases"

Example Response

HTTP/1.1 200 OK

{
  "links" : [ ... ],
  "results" : [ {
    "databaseName" : "local",
    "links" : [ ... ]
  }, {
    "databaseName" : "production",
    "links" : [ ... ]
  }, {
    "databaseName" : "test",
    "links" : [ ... ]
  }, ],
  "totalCount" : 3
}