Query request and response

RESTful API for IBM® Spectrum Control – Base edition uses query requests to return the state of a single resource or a list of resources.

You can run a query by issuing the GET command (on a URI). The following list shows the query format types:
  • A single resource – Single resource properties are returned.
  • A collection of resources – A list of resources and their properties is returned.
For example, GET /api/v1/interfaces/22 lists the properties of the interface with identification number 22, as illustrated below.
{
    "name": "aaab",
    "array": "pu16",
    "module": "1:Module:1",
    "type": "iSCSI",
    "address": "3.3.3.5",
    "netmask": "255.255.255.0",
    "gateway": "3.3.3.254",
    "address6": "",
    "gateway6": "",
    "mtu": "1500",
    "ports": "1",
    "id": 22
}
The GET command can be used to monitor a running task. For example, GET /api/v1/tasks/04fc6120-60ae-4182-baa9-687d6ae96ffe returns the current task status:
{
    "reason": null,
    "task_id": "04fc6120-60ae-4182-baa9-687d6ae96ffe",
    "start_time": "2015-03-03T06:57:48.573",
    "task_state": "Running",
    "array_id": "2810-999-PR16118",
    "name": "disk phase-in"
}
A task ID is generated, when the task is initiated by the action request. See Action request and response.