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

Server Pool Properties

The serverPool/properties resource retrieves and updates the properties and property values that define servers in the server 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.

Endpoints

Get All Properties and Values Defined in the Server Pool

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

You must have the the Global Read Only role or higher.

Update a Property’s Settings

PATCH /api/public/v1.0/serverPool/properties/PROPERTY-ID

PROPERTY-ID is the value of the id field in the property entity.

You can send only the description, multiSelect, and statusName fields. You can send a subset of those fields.

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

Update a Property Value

PATCH /api/public/v1.0/serverPool/properties/PROPERTY-ID/values/PROPERTY-VALUE

Where:

  • PROPERTY-ID is the value of the id field in the property entity.
  • PROPERTY-VALUE is the value of a values.value field in the property entity.

You can send only the fields found in the values array object. You can send a subset of those fields.

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

Delete a Property and all its Values

DELETE /api/public/v1.0/serverPool/properties/PROPERTY-ID

PROPERTY-ID is the value of the id field in the property entity.

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

Delete a Property Value

DELETE /api/public/v1.0/serverPool/properties/PROPERTY-ID/values/PROPERTY-VALUE

Where:

  • PROPERTY-ID is the value of the id field in the property entity.
  • PROPERTY-VALUE is the value of a values.value field in the property entity.

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

Sample Entity

{
  "id" : "region",
  "description" : "Location",
  "multiSelect" : false,
  "statusName" : "AVAILABLE",
  "values" : [ {
      "description" : "Eastern region",
      "statusName" : "AVAILABLE",
      "value" : "east"
  }, ... ],
  "links" : [ ... ],

Entity Fields

Name Type Description
id string The property name.
multiSelect boolean If set to true, a user can specify multiple values for the property when requesting servers. If a user specifies multiple values for the property when requesting multiple servers, Ops Manager provisions servers in a round-robin fashion; i.e. Ops Manager provisions a server for each value before provisioning a second server for a given value.
statusName string Specifies whether the property can be used to provision a server. If set to AVAILABLE, the property can be specified when a user provisions a server. If set to UNAVAILABLE, the property cannot be specified.
values object array The property’s values.
values.description string A description of the property value.
values.statusName string Specifies whether the property value can be used to provision a server. If set to AVAILABLE, the value can be specified when a user provisions a server. If set to UNAVAILABLE, the value cannot be specified.
values.value string A value that exists for the property.

Examples

Get All Properties and Values Defined in the Server Pool

Request

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

Response

HTTP/1.1 200 OK

{
  "links" : [ ... ],
  "results" : [ {
    "id" : "region",
    "description" : "Location",
    "links" : [ { ... } ],
    "multiSelect" : false,
    "statusName" : "AVAILABLE",
    "values" : [ {
      "description" : "Eastern region",
      "statusName" : "AVAILABLE",
      "value" : "east"
    }, {
      "description" : "Western region",
      "statusName" : "AVAILABLE",
      "value" : "west"
    } ]
  }, {
    "id" : "size",
    "description" : "CPU, RAM",
    "links" : [ ... ],
    "multiSelect" : false,
    "statusName" : "AVAILABLE",
    "values" : [ {
      "statusName" : "AVAILABLE",
      "value" : "large"
    }, {
      "statusName" : "AVAILABLE",
      "value" : "medium"
    } ]
  } ],
  "totalCount" : 2
}

Update a Property’s Settings

Request

curl -i -u "username:apiKey" --digest -H "Content-Type: application/json" -X PATCH "https://<ops-manager-host>/api/public/v1.0/serverPool/properties/region" --data '
{
  "description" : "The location of the server."
}'

Response

HTTP/1.1 200 OK

{
  "id" : "region",
  "description" : "The location of the server.",
  "multiSelect" : false,
  "statusName" : "AVAILABLE",
  "values" : [ {
    "description" : "Eastern region",
    "statusName" : "AVAILABLE",
    "value" : "east"
  }, {
    "description" : "Western region",
    "statusName" : "AVAILABLE",
    "value" : "west"
  } ],
  "links" : [ ... ]
}

Update a Property Value

Request

curl -i -u "username:apiKey" --digest -H "Content-Type: application/json" -X PATCH "https://<ops-manager-host>/api/public/v1.0/serverPool/properties/region/values/east" --data '
{
  "statusName" : "UNAVAILABLE"
}'

Response

HTTP/1.1 200 OK

{
  "id" : "region",
  "description" : "The location of the server.",
  "multiSelect" : false,
  "statusName" : "AVAILABLE",
  "values" : [ {
    "description" : "Eastern region",
    "statusName" : "UNAVAILABLE",
    "value" : "east"
  }, {
    "description" : "Western region",
    "statusName" : "AVAILABLE",
    "value" : "west"
  } ],
  "links" : [ ... ]
}

Delete a Property and all its Values

Request

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

Response

HTTP/1.1 200 OK

{}

Delete a Property Value

Request

curl -i -u "username:apiKey" --digest -X DELETE "https://<ops-manager-host>/api/public/v1.0/serverPool/properties/region/values/east"

Response

HTTP/1.1 200 OK

{}