Service methods

GET /api/1/services/(uuid: id)

Returns service instance data.

Parameters:
  • id (uuid) – id of the service instance
Status Codes:

Response body:

{
  "id": "521342dfef86859345e1a822",
  "name": "pool1",
  "typeId": "builtin:static_resource_pool",
  "typeName": "Resource Pool",
  "zoneId": "51d7f794ef868914d0e5f1a0",
  "zoneName": "Production",
  "organizationId": "51d7f793ef868914d0e5f19f",
  "interfaces": [
    "Resource pool"
  ],
  "parameters": {
    "configuration.resources": {
      "foo": [ "bar" ],
      "baz": 123
    }
  },
  "status": {
    "name": "up",
    "pending": false
  },
  "internalId": "51d7f793ef868914d0e5f19f.services.521342dfef86859345e1a822"
}
PUT /api/1/services/(uuid: id)

Updates service instance.

Parameters:
  • id (uuid) – id of the service instance
Status Codes:

Request body:

{
  "name": "<service-name>",
  "parameters": {
    "<service-parameter-name>": <service-parameter-value>,
    ...
  }
}

Only name and parameters arguments are accepted.

Response body (in case of errors):

{
  "<field>": ["<error message>", ...],
  ...
}
POST /api/1/services/(uuid: id)/(string: commandname)

Executes the given command on the given service instance and returns its results.

Parameters:
  • id (uuid) – id of the service instance
  • workflow (string) – name of command to execute
Status Codes:

Request body:

{
  "arguments": {
    "<workflow-parameter-name>": (workflow-parameter-value),
    ...
  },
  "includeIntermediate": <true|false>
}
  • arguments: command arguments. May be omitted.
  • includeIntermediate: flag that signals server to include intermediate results, false by default.

Response body:

[
  {
    "<result-parameter-name>": <result-parameter-value>,
    ...
  },
  ...
]

Response is an array of command results. If “includeIntermediate=false” or not specified at all, there will be only one item in the array containing final results. If “includeIntermediate=true”, array will contain more than one elemenent, the last one being the final result.

Response body (in case of errors):

{
  "<field>": ["<error message>", ...],
  ...
}