Navigation
This version of the documentation is archived and no longer supported. 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.

Group Server Pool Requests

The groups/GROUP-ID/serverPool/requests resource lets you provision servers from the Ops Manager server pool and retrieve and cancel provisioning requests.

Endpoints

Provision a Server from the Server Pool

POST /api/public/v1.0/groups/GROUP-ID/serverPool/requests

Send a document that contains only the properties array. You must specify a value for each property in the array. You can specify multiple values for a property if the property’s multiSelect option is enabled. To retrieve available properties, see Group Server Pool Properties.

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

Get All Server Provisioning Requests for the Group

GET /api/public/v1.0/groups/GROUP-ID/serverPool/requests

Check the Status of Server Provisioning Request

GET /api/public/v1.0/groups/GROUP-ID/serverPool/requests/REQUEST-ID

REQUEST-ID is the string specified in the id field in the groups/GROUP-ID/serverPool/requests entity.

Cancel a Server Provisioning Request

DELETE /api/public/v1.0/groups/GROUP-ID/serverPool/requests/REQUEST-ID

REQUEST-ID is the string specified in the id field in the groups/GROUP-ID/serverPool/requests entity.

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

Sample Entity

{
  "id" : "57e939ad87d9d63a1d2e4179",
  "numServers": 3,
  "created" : "2016-11-06T15:07:25Z",
  "expires" : "2016-11-06T17:07:25Z",
  "groupId" : "56a688e0e4b06aa2a9c3aa1b",
  "properties" : [ ... ],
  "statusName" : "EXECUTING",
  "links" : [ ... ]
}

Entity Fields

Name Type Description
id string A unique identifier for the request.
numServers number The number of servers requested.
created date The date and time the request was issued.
expires date The date and time the request expires if no server is available.
completeDate date The date and time the request was completed.
cancelDate date The date and time the request was cancelled.
groupId string The group for which the server is requested.
properties object of key/value pairs The properties that identify the type of server requested.
statusName string

The status of the request. Possible values are:

EXECUTING The request is pending.
CANCELLING The request is in the process of cancelling.
CANCELLED The request is cancelled.
FAILED The request failed.
COMPLETED The request has been fulfilled.

Examples

Provision a Server from the Server Pool

Request

curl -i -u "username:apiKey" --digest -H "Content-Type: application/json" -X POST "https://<ops-manager-host>/api/public/v1.0/groups/56a688e0e4b06aa2a9c3aa1b/serverPool/requests" --data '
{
  "properties": [
    {
      "Datacenter" : "nyc"
    }
  ]
}'

Response

HTTP/1.1 200 OK

{
  "created":"2016-10-04T15:47:06Z",
  "expires":"2016-10-04T17:47:06Z",
  "groupId":"56a688e0e4b06aa2a9c3aa1b",
  "id":"57f3cefa87d9d625dec353ca",
  "links":[ ... ],
  "properties":[
    {
      "Datacenter" : "nyc"
    }
  ],
  "statusName":"EXECUTING"
}

Get All Server Provisioning Requests for the Group

Request

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

Response

HTTP/1.1 200 OK

{
  "links" : [ ... ],
  "results" : [ {
    "created" : "2016-11-06T15:07:25Z",
    "expires" : "2016-11-06T17:07:25Z",
    "groupId" : "56a688e0e4b06aa2a9c3aa1b",
    "id" : "57e939ad87d9d63a1d2e4179",
    "links" : [ { ... } ],
    "properties" : [ {
      "ram" : "16",
      "region" : "west",
      "size" : "large"
    } ],
    "statusName" : "EXECUTING"
  } ],
  "totalCount" : 1
}

Check the Status of Server Provisioning Request

Request

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

Response

HTTP/1.1 200 OK

{
  "created" : "2016-11-06T15:07:25Z",
  "expires" : "2016-11-06T17:07:25Z",
  "groupId" : "56a688e0e4b06aa2a9c3aa1b",
  "id" : "57e939ad87d9d63a1d2e4179",
  "links" : [ ... ],
  "properties" : [ {
    "ram" : "16",
    "region" : "west",
    "size" : "large"
  } ],
  "statusName" : "EXECUTING"
}

Cancel a Server Provisioning Request

Request

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

Response

HTTP/1.1 200 OK

{}