Navigation
You were redirected from a different version of the documentation. Click here to go back.

Server Pool Requests

The serverPool/requests resource provides access to requests for server pool’s servers. The pool provides Ops Manager users with pre-provisioned servers for deploying MongoDB.

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.

Endpoints

Get All Server Pool Requests

GET /api/public/v1.0/serverPool/requests

To filter by request status, use the status query parameter:

GET /api/public/v1.0/serverPool/requests?status=STATUS

STATUS can be one of the following values:

  • EXECUTING
  • CANCELLING
  • CANCELLED
  • FAILED
  • COMPLETED

You must have the Global Read Only role or higher to use this endpoint.

Get a Specific Server Pool Request

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

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

You must have the Global Read Only role or higher to use this endpoint.

Cancel a Server Pool Request

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

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

You must have the Global Owner role to use this endpoint.

Sample Entity

{
  "id" : "57e5a05b80eef542bf4af9a7",
  "numServers": 3,
  "created" : "2016-11-11T21:36:27Z",
  "expires" : "2016-11-11T23:36:27Z",
  "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

Get All Server Pool Requests

Request

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

Response

HTTP/1.1 200 OK

{
  "results" : [ {
    "created" : "2016-11-11T21:36:27Z",
    "expires" : "2016-11-11T23:36:27Z",
    "groupId" : "56a688e0e4b06aa2a9c3aa1b",
    "id" : "57e5a05b80eef542bf4af9a7",
    "links" : [ ... ],
    "properties" : [ {
      "region" : "central",
      "size" : "large"
    } ],
    "statusName" : "EXECUTING"
  }, ... ],
  "links" : [ ... ],
  "totalCount" : 3
}

Get a Specific Server Pool Request

Request

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

Response

HTTP/1.1 200 OK

{
  "created" : "2016-11-11T21:36:27Z",
  "expires" : "2016-11-11T23:36:27Z",
  "groupId" : "56a688e0e4b06aa2a9c3aa1b",
  "id" : "57e5a05b80eef542bf4af9a7",
  "links" : [ ... ],
  "properties" : [ {
    "region" : "central",
    "size" : "large"
  } ],
  "statusName" : "EXECUTING"
}

Cancel a Server Pool Request

Request

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

Response

HTTP/1.1 200 OK

{}