Navigation

Group Server Pool Requests

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/requests resource lets you provision servers from the Ops Manager server pool and retrieve and cancel provisioning requests.

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

Endpoints

Provision a Server from the Server Pool

POST /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 /groups/GROUP-ID/serverPool/requests

Check the Status of Server Provisioning Request

GET /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 /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 project 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

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-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

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-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

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-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 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.