Storage system operations

RESTful API for IBM® Spectrum Control Base Edition uses the GET and POST commands for storage system (array) operations.

You can run a storage system query by issuing the GET command to retrieve a list of storage systems and their properties, or display the properties of a single storage system.

For example, GET /api/v1/arrays/2810-999-dc21011 lists the properties of the storage with identification number 2810-999-dc21011, as illustrated below.
OK 200
{
  "id": 2810-999-dc21011,
  "alias": "pu21",
  "mgmt_addresses": [
        "9.151.153.87",
        "9.151.153.86",
        "9.151.153.39"
   "last_updated": "2015-04-15T17:55:02.431",
   "error_message": "",
   "connected": true,
   "name": "XIV pur21m10m11m15",
   "firmware_version": "11.5.0",
   "scsi_model_identifier": "2810XIV",
   "array_type": "2810XIV",
   "storage_model": "XIV",
   "physical_capacity": 12011310153728,
   "serial": "21011",
   "capacity_max_pool_size": 12011,
   "capacity_soft_mib": 11454878,
   "capacity_hard_mib": 11454878,
   "capacity_free_soft_mib": 32822,
   "capacity_free_hard_mib": 6859798,
   "capacity_spare_disks": 3,
   "capacity_spare_modules": 1,
   "capacity_target_spare_disks": 3,
   "capacity_target_spare_modules": 1,
   "capacity_limit_percentage": 100
}

The upgrade procedure is implemented by issuing the POST command with this syntax: POST /api/v1/arrays/<array-id>/upgrade. The input parameters include the following mandatory entries: username, password and pkg_name.

For example, to upgrade the storage system 2810-999-dc21011 microcode to version 11.5.0.c, enter POST /api/v1/arrays/2810-999-dc21011/upgrade with the required parameters.
POST /api/v1/interfaces
{
	"username": "opsadmin",
  "password": "opspasswd",
	"pkg_name": "xiv_ver_11.5.0.c.tgz"
}
If the response to the upgrade request is OK, followed by the task ID, as illustrated below. The task ID can be used in a query request to monitor the upgrade progress, see Query request and response.
OK
{
    "task id": "04fc6120-60ae-4182-baa9-687d6ae96ffe"
}
In addition, you can use the GET to retrieve the current state of the upgrade procedure.
For example, to get the current upgrade status for storage system 2810-999-dc21011, enter GET /api/v1/arrays/2810-999-dc21011/upgrade. The output is illustrated below.
OK 200
{
	"array": "2810-999-dc21011",
	"state": "Upgrade Not Underway", 
  "consequence": "New version has not been downloaded yet",  
  "package_target_version": ""
}