Navigation
This version of the documentation is archived and no longer supported. It will be removed on EOL_DATE. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.
This version of the manual is no longer supported. It will be removed on EOL_DATE.

Group Server Pool Servers

Server Pools deprecated as of Ops Manager 4.0

As of Ops Manager 4.0, server pools are deprecated and disabled by default.

Note

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. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.

The groups/GROUP-ID/serverPool/servers resource lets you retrieve servers from the Ops Manager server pool for use by the group’s MongoDB processes. The resource also lets you terminate servers and return them to the pool.

For a list of all server pool API resources, see Server Pool. For information on the server pool, see Provision Servers for the Server Pool.

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

Endpoints

Get All Servers Bound to the Group

GET /groups/GROUP-ID/serverPool/servers

Get a Server by ID

GET /groups/GROUP-ID/serverPool/servers/SERVER-ID

SERVER-ID is the string specified in the id field in the groups/GROUP-ID/serverPool/servers entity.

Get a Server by Hostname

GET /groups/GROUP-ID/serverPool/servers/byName/HOSTNAME

HOSTNAME is the string specified in the hostname field in the groups/GROUP-ID/serverPool/servers entity.

Terminate a Server

DELETE /groups/GROUP-ID/serverPool/servers/SERVER-ID

SERVER-ID is the string specified in the id field in the groups/GROUP-ID/serverPool/servers entity.

You must have the Automation Admin role to use this endpoint.

Sample Entity

{
  "id" : "561a80ef518b82957d",
  "hostname" : "example.net",
  "properties" : { ... },
  "created": "2016-11-01T05:05:05Z",
  "recycled" : "1970-01-01T00:00:00Z",
  "statusName" : "BOUND"
  "boundGroupId": "56a49b06a2a9c39a1b",
  "links" : []
}

Entity Fields

Name Type Description
id string A unique identifier for the server.
hostname string The hostname that identifies the server.
properties object of key/value pairs The custom properties assigned to the server. Administrators control which properties to expose to end users. If properties are exposed, users must select property values when requesting servers. For more information, see Servers Request Options page.
created date The date the server was added to the server pool.
recycled date The date the server was returned to the pool.
statusName string

The server’s availability. Possible values are:

AVAILABLE The server is available to host new MongoDB instances. It is not bound to a project.
RESERVED The server has been selected as part of a multi-server request that is still executing.
BOUND The server is hosting one or more MongoDB processes. The server is visible only to the project that is running the processes.
NEEDS_CLEAN The server is no longer hosting MongoDB processes and no longer bound to a project, but the server still contains the MongoDB data and logs. The server has not yet been returned to the server pool and is not visible to Ops Manager users.
TRASH The server is no longer hosting MongoDB processes and no longer bound to a project. The server no longer contains the MongoDB data and logs. The server has not yet been returned to the server pool and is not visible to Ops Manager users.
DELETED The server has been removed from Ops Manager.
boundGroupId string The ID of the project where this server is in use.

Examples

Get the State of the Server Pool

Request

curl -i -u "username:apiKey" --digest "https://<ops-manager-host>/api/public/v1.0/groups/56a49b06a2a9c39a1b/serverPool"

Response

Response Header

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}

Response Body

{
  "enabled" : true,
  "links" : []
}

Get All Servers Bound to the Group

Request

curl -i -u "username:apiKey" --digest "https://<ops-manager-host>/api/public/v1.0/groups/56a49b06a2a9c39a1b/serverPool/servers"

Response

Response Header

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}

Response Body

{
  "links" : [],
  "results" : [ {
    "created" : "2016-11-02T22:22:22Z",
    "hostname" : "525.example.net",
    "id" : "57d0561a80ef518b829",
    "links" : [],
    "properties" : { "region" : "west", "ram" : "16", ... },
    "recycled" : "1970-01-01T00:00:00Z",
    "statusName" : "BOUND",
    "boundGroupId": "56a49b06a2a9c39a1b"
  },
  ... ,
  { ... }
  ],
  "totalCount" : 6
}

Get a Server by ID

Request

curl -i -u "username:apiKey" --digest "https://<ops-manager-host>/api/public/v1.0/groups/56a49b06a2a9c39a1b/serverPool/servers/57d0561a80ef518b829"

Response

Response Header

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}

Response Body

{
  "created" : "2016-11-02T22:22:22Z",
  "hostname" : "525.example.net",
  "id" : "57d0561a80ef518b829",
  "links" : [],
  "properties" : { "region" : "west", "ram" : "16", ... },
  "recycled" : "1970-01-01T00:00:00Z",
  "statusName" : "BOUND",
  "boundGroupId": "56a49b06a2a9c39a1b"
}

Get a Server by Hostname

Request

curl -i -u "username:apiKey" --digest "https://<ops-manager-host>/api/public/v1.0/groups/56a49b06a2a9c39a1b/byName/525.example.net"

Response

Response Header

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}

Response Body

{
  "created" : "2016-11-02T22:22:22Z",
  "hostname" : "525.example.net",
  "id" : "57d0561a80ef518b829",
  "links" : [],
  "properties" : { "region" : "west", "ram" : "16", ... },
  "recycled" : "1970-01-01T00:00:00Z",
  "statusName" : "BOUND",
  "boundGroupId": "56a49b06a2a9c39a1b"
}

Terminate a Server

Request

curl -i -u "username:apiKey" --digest -X DELETE "https://<ops-manager-host>/api/public/v1.0/groups/56a49b06a2a9c39a1b/serverPool/servers/57d0561a80ef518b829"

Response

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}

This endpoint does not return a response body.