+ All Categories
Home > Documents > Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The...

Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The...

Date post: 05-Apr-2020
Category:
Upload: others
View: 31 times
Download: 0 times
Share this document with a friend
32
© Copyright IBM Corp. 2014. All rights reserved. ibm.com/redbooks 1 Redpaper Exploring RESTful API Support with IBM XIV Representational State Transfer (REST) is a simple stateless architecture that uses existing web technology and protocols, essentially Hypertext Transfer Protocol (HTTP). In the last few years, REST has emerged as a predominant web service design model. It is a simpler alternative to SOAP. The RESTful application programming interface (API) establishes a mapping between create, read, update, and delete operations and the corresponding POST , GET , PUT , and DELETE HTTP actions. The RESTful interface focuses on the components’ roles and resources, and ignores their internal implementation details. The RESTful API is a client/server model. Therefore, the requests are sent to a server that is component-aware, which masks the intricate details from the users. This IBM® Redpaper™ publication briefly describes the RESTful API, and demonstrates how clients can use it to build a common management console for their IBM XIV® storage, and for other storage devices that support the RESTful API. The scope of this paper is solely intended for readers who want to explore and experiment with the XIV RESTful API capabilities. Most of the examples will be shown using the cURL tool. RESTful API in XIV A RESTful API implementation is provided for the XIV clients so that they can develop their own management infrastructure around it. The storage cloud administrators and the users also benefit from a common storage console based on the RESTful API. RESTful API commands cannot be sent directly to the managed device, in this case the XIV. The commands have to be directed to a device-specific RESTful API server, which for the XIV is the IBM Hyper-Scale Manager. For more details about the IBM Hyper-Scale Manager, see IBM Hyper-Scale in XIV Storage, REDP-5053. Bertrand Dufrasne Paul Braren Roger Eriksson Wenzel Kalabza Lisa Martinez Jeff Skotzko
Transcript
Page 1: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Redpaper

Exploring RESTful API Support withIBM XIV

Representational State Transfer (REST) is a simple stateless architecture that uses existing web technology and protocols, essentially Hypertext Transfer Protocol (HTTP).

In the last few years, REST has emerged as a predominant web service design model. It is a simpler alternative to SOAP. The RESTful application programming interface (API) establishes a mapping between create, read, update, and delete operations and the corresponding POST, GET, PUT, and DELETE HTTP actions.

The RESTful interface focuses on the components’ roles and resources, and ignores their internal implementation details. The RESTful API is a client/server model. Therefore, the requests are sent to a server that is component-aware, which masks the intricate details from the users.

This IBM® Redpaper™ publication briefly describes the RESTful API, and demonstrates how clients can use it to build a common management console for their IBM XIV® storage, and for other storage devices that support the RESTful API.

The scope of this paper is solely intended for readers who want to explore and experiment with the XIV RESTful API capabilities. Most of the examples will be shown using the cURL tool.

RESTful API in XIV

A RESTful API implementation is provided for the XIV clients so that they can develop their own management infrastructure around it. The storage cloud administrators and the users also benefit from a common storage console based on the RESTful API.

RESTful API commands cannot be sent directly to the managed device, in this case the XIV. The commands have to be directed to a device-specific RESTful API server, which for the XIV is the IBM Hyper-Scale Manager. For more details about the IBM Hyper-Scale Manager, see IBM Hyper-Scale in XIV Storage, REDP-5053.

Bertrand DufrasnePaul Braren

Roger ErikssonWenzel Kalabza

Lisa MartinezJeff Skotzko

© Copyright IBM Corp. 2014. All rights reserved. ibm.com/redbooks 1

Page 2: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Figure 1 illustrates how the RESTful API interacts with the IBM Hyper-Scale Manager.

Figure 1 RESTful API with IBM Hyper-Scale Manager

Being an API, the RESTful interface is meant to be used by developers within application programs, and not to be directly invoked by users. However, because it is an HTTP-based API, it is possible to test and debug individual RESTful commands using commonplace web browsers. Some commands can be run on a standard browser, and most can be tested through a browser plug-in interface.

RESTful API architecture design points

The REST architectural core design is based on the following fundamental principles:

� Standard client/server interface

A mandatory, yet common, interface connects clients and servers. This design point enables the clients to work regardless of the internal characteristics of the components that they manage. Therefore, the client code is very portable. Likewise, the servers are indifferent to the user interface. Therefore, servers and clients can be developed independently, if the interface between them stays the same.

� Stateless

The server has no memory of previous communication with any of its clients. Therefore, each request from the client contains all of the required information. The server response is also a complete message. The client is the only entity that can save its session states. The server can, however, consult or share other clients if it needs a persistent session view. For instance, the server can use some database client throughout an authentication session.

Tip: RESTful API V2.0 is available through IBM Hyper-Scale Manager included in XIV Management Tools V4.4. The RESTful API V2.0 supports XIV Software 11.5 functions, such as multi-tenancy and 3-way mirroring.

2 Exploring RESTful API Support with IBM XIV

Page 3: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

� Cacheable

The server can advise the client whether the response is cacheable. Effective caching improves scalability and performance. The notification can be either explicit or implicit. For detailed information about the actual notifications, consult the RESTful architecture design. It is the responsibility of the client to avoid using uncacheable responses as persistent, in case they use stale data.

� Layered system

In principle, the client should not be able to tell whether it is connected directly to an end server, or to an intermediate middleware. Therefore, servers at various layers can be used to improve system scalability, and can also be used to enforce security policies.

� Code on demand (optional)

The architecture enables the servers to augment their clients by “pushing” ad hoc pieces of executable code for them to run.

RESTful operations

The RESTful API establishes a mapping between create, retrieve, update, and delete operations and the corresponding HTTP actions:

� HTTP GET is mapped to the query (read) operation. The GET operation is the implicit one used by a standard web browser navigation toolbar. Of course, you can use the friendlier browser plug-in (or a command, such as curl) too, for the same result, but it is not required.

The curl command comes standard with most Linux distributions.

� HTTP POST is mapped to create, update, and delete operations. To run such an operation, you need to use a browser plug-in or a command like curl.

� HTTP DELETE is mapped to the delete operation. To run such an operation, you need to use a browser plug-in or a command like curl.

There are two classes of components that the RESTful API can operate on:

� A single entity, such as a specific volume, pool, or system� A list of class entities, such as systems, hosts, pools, volumes, mirrors, and so on

The Uniform Resource Locator (URL) is built from scope specifiers and resource names, prefixed with a colon (:). At this time, the XIV RESTful version 2 supports only the JavaScript Object Notation (JSON) format. More information about these format standards can be found through many other public sources.

This section provides a quick introduction to the basic elements of an operation targeting a list of components:

https://<Hyper-Scale Manager address>:8443

Points at the IBM Hyper-Scale Manager Internet Protocol (IP) address or Domain Name System (DNS) name using port 8443. This port is customizable though the Hyper-Scale Manager configuration.

/xiv Specifies that the API scope is an XIV.

/v2 Is the IBM Hyper-Scale Manager API version used in XIV.

/resource The resource being queried (could be ports, systems, volumes, pools, and so on). See “Using the RESTful API from a web server navigation toolbar” on page 5 for specific examples.

Exploring RESTful API Support with IBM XIV 3

Page 4: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

For example, the following GET operation queries about the XIV systems:

https://9.155.59.232:8443/xiv/v2/systems

This operation returns information about all of the systems managed by the IBM Hyper-Scale Manager at IP address 9.155.59.232. The output of the operation is shown in Example 1.

Example 1 RESTful GET request output

{ "status": { "server": { "status": "0", "message": "OK" }, "failed_systems": [ ] }, "response": { "counts": { "data_count": "2", "total_count": "2" }, "data": { "system": [ { "free_soft_capacity": "104075000000000", "id": "XIV_02_1310114:1310114:2810:214", "ref": "/xiv/v2/systems/:9.155.116.61", "redundancy_status": "Full Redundancy", "system_state": "on", "soft_capacity": "161326000000000", "hard_capacity": "161326000000000", "name": "9.155.116.61", "target_state": "on", "ip_addresses": [ { "ip": "10.0.20.108" }, { "ip": "9.155.116.61" }, { "ip": "9.155.116.62" } ], "safe_mode": "false" }, { "free_soft_capacity": "219731000000000", "id": "XIV_PFE2_1340010:1340010:2810:214", "ref": "/xiv/v2/systems/:9.155.50.90", "redundancy_status": "Full Redundancy",

4 Exploring RESTful API Support with IBM XIV

Page 5: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

"system_state": "on", "soft_capacity": "243392000000000", "hard_capacity": "243392000000000", "name": "9.155.50.90", "target_state": "on", "ip_addresses": [ { "ip": "9.155.50.90" }, { "ip": "xiv-pfe-02a.mainz.de.ibm.com" }, { "ip": "xiv-pfe-02b.mainz.de.ibm.com" } ], "safe_mode": "false" } ] } } }

The server response data types

The server responses use the following data types:

� All of the storage capacity properties in the query response are given as integers in bytes. The following list includes examples of capacity attributes for XIV:

– Capacity attributes of system resources– Size attributes of volume resources– Size attributes of pool resources

� Boolean attributes are given as true or false (for example, the mirrored attribute of volume resources).

� Time stamps are given in milliseconds, and have been since the UNIX epoch (since 1970-01-01 at 00:00:00).

Using the RESTful API from a web server navigation toolbar

In this section, we illustrate the functions of the RESTful API through the use of a web browser. This illustration is solely meant for readers who would like to explore the XIV RESTful API capabilities. In practice, the API is used in an application, or through a command-line interface (CLI), such as the Linux curl command-line tool.

Examples in this paper will go through the steps that you need to follow using a web browser. Typing the request in the browser’s Navigation toolbar is interpreted as a GET operation. For any other operation, you need to install the respective plug-in.

The Firefox browser RESTful plug-in is called RESTclient, and all of the examples depicted in this paper are based on it. Be aware that RESTclient has its own peculiarities. For instance, the RESTclient’s DELETE command doesn’t use a body section as one would expect.

Exploring RESTful API Support with IBM XIV 5

Page 6: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

The RESTclient OPTIONS operation

RESTclient supports additional operations. The most notable is options. The options operation is described in World Wide Web Consortium RFC 2616:

“This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.”

Using the option request, together with the respective target object, shows the relevant operations as the server is made available to its clients. The fields are supposed to be self-explanatory. The options operation is described for completeness sake.

Figure 2 is a depiction of the options possible for operations targeting a single volume named ITSO_ID1_vol99 on XIV at IP 9.155.50.90, as returned by the IBM Hyper-Scale Manager, (which is at IP address 9.155.59.232 through port 8443). This example shows options for GET, POST, and DELETE for a single volume. The output of these actions is not shown here.

Figure 2 RESTclient operations options

6 Exploring RESTful API Support with IBM XIV

Page 7: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Figure 3 is a depiction of the options output when the IBM Hyper-Scale Manager is queried about the relevant options concerning volumes.

Figure 3 Options output from IBM Hyper-Scale Manager

In this example, the options for GET and POST are displayed for actions on volumes on a specific system (9.155.50.90).

Exploring RESTful API Support with IBM XIV 7

Page 8: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Starting the first RESTful request

To start the RESTful request, follow these steps:

1. Form the HTTP request (see the contents of the Navigation toolbar shown in Figure 4):

a. Type the IBM Hyper-Scale Manager IP address (9.155.59.232) and port (8443):

https://9.155.59.232:8443

b. Use a backslash (/) as the delimiter and enter the device type. in this case, the device type is xiv:

https://9.155.59.232:8443/xiv

c. The RESTful API can support different versions, and therefore the next field is the version. In this example, the version is v2:

https://9.155.59.232:8443/xiv/v2

d. The last field in the example is the actual GET query. In this case, the systems operation asks for the list of all XIV managed by the specific IBM Hyper-Scale Manager, producing the final entry line:

https://9.155.59.232:8443/xiv/v2/systems

2. Now that you have specified the request in the Navigation toolbar, press Enter. On the first invocation, the RESTclient prompts you to accept the IBM Hyper-Scale Manager certificate.

After the certificate is accepted, it can be saved and reused from that point on.

3. At this point, the IBM Hyper-Scale Manager is trusted, but now must authenticate the user. Figure 4 shows the login prompt that the user must complete before the operation is carried out by the server.

Figure 4 User authentication request

4. Assuming that all of the security aspects are now correctly addressed, the server delivers the result of the implicit GET operation. The first version of the XIV RESTful API supports only the JavaScript Object Notation (JSON) output format. The JSON format is not very legible, because it is a one-line string.

8 Exploring RESTful API Support with IBM XIV

Page 9: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Figure 5 shows a short excerpt of the JSON output as it appears in the browser. A good hint that the operation did not succeed is when the JSON line is rather short. The "failed_systems":[] array is used to inform the user of the systems where the operation failed. If it is empty, it means that the command was successful on all relevant systems. Therefore, seeing that field in the output should not cause any alarm.

Figure 5 Response in JSON format

5. The operation can target a specific XIV as well. For instance, to query all volumes defined on a specific XIV system at IP address 9.155.50.90, use a request with the following syntax, as highlighted in Figure 6:

https://9.155.116.160:8443/xiv/v2/:9.155.50.90/pools

Be aware of the colon (:) that precedes the target XIV.

Another point to bear in mind is that the target system name or address has to be the same as recognized by the IBM Hyper-Scale Manager. In other words, if the XIV was added by its IP address, then that IP has to be used. If its fully qualified name was used, that name is the only name that the command must use.

Figure 6 Query pools on XIV

Exploring RESTful API Support with IBM XIV 9

Page 10: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Taking the output from querying pools, shown in Figure 6 on page 9, we can reformat it as shown in Example 2, to more easily understand what is being displayed.

The first section lists the status of the command. Then we see the section for the pools that begins with "pool". This lists each pool in the system. The first pool is shown in the first stanza. It lists the name of the pool, the XIV system it is on, and other specifics about the pool. We can see two pools listed in this example. Both are highlighted in bold letters.

Example 2 Formatted output from query pools

status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"45","total_count":"45"},"data":

{"pool":[

{"id":"7ce14000002","ref":"/xiv/v2/:9.155.50.90/pools/:Advanced_WS_Team1_IBM_Hyper-Scale_Mobility_Pool","system":"9.155.50.90", "used_by_volumes":"0","used_by_snapshots":"0","name":"Advanced_WS_Team1_IBM_Hyper-Scale_Mobility_Pool","domain":"no-domain","snapshot_size":"103000000000","locked":"false","hard_size":"1032000000000","soft_size":"1032000000000"},

{"id":"7cf14000003","ref":"/xiv/v2/:9.155.50.90/pools/:Advanced_WS_Team2_IBM_Hyper-Scale_Mobility_Pool","system":"9.155.50.90", "used_by_volumes":"0", "used_by_snapshots":"0","name":"Advanced_WS_Team2_IBM_Hyper-Scale_Mobility_Pool","domain":"no-domain","snapshot_size":"103000000000","locked":"false","hard_size":"1015000000000","soft_size":"1015000000000"},

10 Exploring RESTful API Support with IBM XIV

Page 11: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Using the RESTful API through a web browser RESTclient

In this section, we show an example of how the RESTclient plug-in (for Firefox) can be used to test a few RESTful operations.

First, you must configure the plug-in format, as shown in Figure 7:

1. Use the Headers tab.2. Click Content-Type application/json.

Figure 7 Plug-in format for headers

Figure 8 on page 12 shows a screen capture of the RESTclient output that was rendered by the plug-in. It is still in JSON format, but it is much more readable than the one-line JSON output produced when the Navigation toolbar was used.

The query response is defined as an object having the following fields:

Status Holds response status.

Server Holds application-level status and status message.

Failed_systems Array of XIV machine errors that were encountered during the request. This field is used during multi-machine queries or updates, to indicate that some XIV machines had issues (disconnected, not authorized, invalid state, and so on) during the query, and that the returned data might not contain responses pertaining to subject components, or that the required operation had only partial success.

Response Holds the query response result.

Counts Holds the response count and total count of objects.

Data_count Holds the number of objects in this response data.

Total_count Holds the number of total objects.

Data Holds the response data. Can be either a list of objects for queries on object collections (for example, volumes) or a single object for queries on a specific object (for example, volumes/:ITSO_ID_vol1a2).

Null In case there was an error in query processing.

Exploring RESTful API Support with IBM XIV 11

Page 12: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

The rest of the output is query-dependent, and, should be self explanatory. In this example, querying pools with the RESTclient is shown in Figure 8.

Figure 8 Querying pools with the RESTclient plug-in

12 Exploring RESTful API Support with IBM XIV

Page 13: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

In Figure 9, the POST operation is used to create a new pool called ITSO_POOL_4_ID1. The response pane at the bottom reports a successful execution.

You need to complete the body section using the JSON format. The input can be structured as shown in the Body section in Figure 9, but it does not need to be. The same data can be entered as one line if the syntax is valid.

Figure 9 Create a pool with the RESTclient plug-in

Exploring RESTful API Support with IBM XIV 13

Page 14: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Figure 10 shows a failure returned by the Hyper-Scale Manager, resulting from an invalid request. As the error message describes, the attempted operation was to delete a volume that is part of a Consistency Group (CG).

Figure 10 Failed attempt to delete a volume

RESTful API filtering

Query requests can contain additional URL parameters for filtering purposes. Requests that use filtering parameters return only resources that match the filtering criteria.

The XIV RESTful API supports simple filtering. The following GET command shows an example of currently supported filters:

GET /xiv/v2/:xiv2/volumes?pool=ITSO_ID_POOL

In this case, only volumes inside the ITSO_ID_POOL would be returned.

14 Exploring RESTful API Support with IBM XIV

Page 15: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Paging

Paging is used to restrict the number of records returned by the server. For instance, a volume query request can return thousands of volume records. To give the client better control of the received data, two parameters are provided:

offset Defines the index of the first entity to be retrieved. The default offset is 0.

limit Defines the maximum number of elements the server should send. The default limit for v2 is 1000.

All records are sorted alphabetically by default.

The following list includes examples of paging parameters:

� Return all volumes from all XIV systems (up to max_limit):

GET /xiv/v2/volumes

� Return first 400 volumes from all XIV systems:

GET /xiv/v2/volumes?limit=400

� Return 32 volumes, starting from volume 11:

GET /xiv/v2/volumes?offset=10&limit=32

� Return all volumes (up to max_limit), starting from volume 99:

GET /xiv/v2/volumes?offset=99

The following request is sent to the IBM Hyper-Scale Manager to display just one volume out of all of the volumes that belong to the ITSO_POOL_ID1 pool on the XIV system at IP address 9.155.50.90. The volume has to be the second one in the list:

https://9.155.59.232:8443/xiv/v2/:9.155.50.90/volumes?pool=ITSO_POOL_ID1&offset=1&limit=1

Figure 11 shows an excerpt of this RESTful filter operation.

Figure 11 RESTful operation with filtering parameters

Exploring RESTful API Support with IBM XIV 15

Page 16: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Example 3 illustrates the same example as in Figure 11 on page 15, using a filter to query volumes in a specific pool in the curl command format.

Example 3 A curl example using filters for volumes in a pool

$ curl https://9.32.248.194:8443/xiv/v2/:9.32.248.106/volumes?pool=ex_pool -u admin:adminadmin --insecure{"status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"12","total_count":"12"},"data":{"volume":[{"size_on_disk":"2405000000000","pool_ref":"/xiv/v2/:9.32.248.106/pools/:ex_pool","size":"2405181685760","id":"43279129","wwn":"00173800001B1DCC","ref":"/xiv/v2/:9.32.248.106/volumes/:ex_big_1","system":"9.32.248.106","pool":"ex_pool","name":"ex_big_1","mirrored":"false","cg":"","locked":"false","used_capacity":"2405000000000"},

The format in this example has been modified to make it more readable. It shows the output for a single volume ex_big_1 from the specified pool ex_pool.

One difference to note about using the curl command, as shown in Example 3, is that it requires a user and password to be included in the command that is submitted. This is different from the RESTclient, which requires a login when first connecting to the system.

List of RESTful API V2 query, post, and delete requests

The following sections describe the various RESTclient operations examples for use with an XIV system. This list is by no means exhaustive, yet can be used as a good reference or template for experimenting with similar operations.

Systems

XIV systems configured in the IBM Hyper-Scale Manager are queried with the following requests:

� List all authorized systems for the user:

GET /xiv/v2/systems

� List specific system properties (9.155.50.90 is the XIV system IP address):

GET /xiv/v2/systems/:9.155.50.90

16 Exploring RESTful API Support with IBM XIV

Page 17: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Volumes

Volumes are queried with the following requests:

� List all volumes from all authorized systems for the user:

GET /xiv/v2/volumes

� List all volumes from a specific XIV system:

GET /xiv/v2/:9.155.50.90/volumes

� List all volumes from a specific XIV system and pool (where the pool name is p1):

GET /xiv/v2/:9.155.50.90/volumes?pool=p1

� List specific volume properties on a specific XIV system (volume name ITSO_ID_vol1a):

GET /xiv/v2/:9.155.50.90/volumes/:ITSO_ID_vol1a

� Delete a specific volume on a specific XIV system (volume name ITSO_ID_vol1a):

DELETE /xiv/v2/:9.155.50.90/volume/:ITSO_ID_vol1a

� The POST command in the context of volumes supports the following actions:

– Create– Resize

You can place the target volume at the end of the HTTPS entry, or in the body of the operation (as a parameter in the form of "name":"<volumeName>").

Example 4 shows how to create a volume ITSO_Volume1 on a specific XIV system using the curl command.

Example 4 Creating a volume

curl https://9.32.248.194:8443/xiv/v2/:9.32.248.106/volumes -H "Content-Type: application/json" -d '{"request":[{"action":"create","params":{"name":"ITSO_Volume1","pool":"ITSO_Pool","size":"34","size_units":"GB"}}]}' -u admin:adminadmin --insecure -X POST

Hosts

Hosts are queried as shown with the following requests:

� List all hosts from all authorized systems for the user:

GET /xiv/v2/hosts

� List all hosts from a specific machine:

GET /xiv/v2/:9.155.50.90/hosts

� List all hosts from a specific machine belonging to a given cluster (cl1 in this example):

GET /xiv/v2/:9.155.50.90/hosts?cluster=cl1

� List specific host properties (host name h1):

GET /xiv/v2/:9.155.50.90/hosts/:h1

� Delete the ITSO_ID_host1 host:

DELETE /xiv/v2/:9.155.50.90/hosts/:ITSO_ID_host1

� Create a host named ITSO_ID_host1:

POST /xiv/v2/:9.155.50.90/hosts

Exploring RESTful API Support with IBM XIV 17

Page 18: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Example 5 illustrates using the curl command to create a host called ITSO_host1 using the POST parameter on the XIV system at 9.32.248.106.

Example 5 Creating a host

curl https://9.32.248.194:8443/xiv/v2/:9.32.248.106/hosts -H "Content-Type: application/json" -d '{"request":[{"action":"create","params":{"name":"ITSO_host1"}}]}' -u admin:adminadmin --insecure -X POST

Clusters

Clusters are queried with the following requests:

� List all clusters from all authorized systems for the user:

GET /xiv/v2/clusters

� List all clusters from a specific machine:

GET /xiv/v2/:9.155.50.90/clusters

� List specific cluster properties (cluster name c1):

GET /xiv/v2/:9.155.50.90/clusters/:c1

� Update cluster properties:

POST /xiv/v2/:9.155.50.90/clusters/:c1

� Delete a cluster:

DELETE /xiv/v2/:9.155.50.90/clusters/:c1

Example 6 shows how to add hosts to a cluster using the curl command and POST.

Example 6 Adding hosts to a cluster

POST /xiv/v2/:xiv1/clusters{“request”:{“action”:”add_host” “params”:{“host”:”ITSO_host1” “map”:”ITSO_cluster1”}}}

System Fibre Channel ports

Fibre Channel (FC) ports are queried as shown in the following requests:

� List all FC ports from a specific machine:

GET /xiv/v2/:9.155.50.90/fc_ports

� List specific FC port properties (port name p1):

GET /xiv/v2/:9.155.50.90/fc_ports/:p1

18 Exploring RESTful API Support with IBM XIV

Page 19: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

System iSCSI ports

System Internet Small Computer System Interface (iSCSI) ports are queried with the following requests:

� List all iSCSI ports from a specific machine:

GET /xiv/v2/:9.155.50.90/iscsi_ports

� List specific iSCSI port properties (port name p1):

GET /xiv/v2/:9.155.50.90/iscsi_ports/:p1

Host ports

Host ports are ports that belong to hosts, not to systems. Host ports are queried with the following requests:

� List all ports of a specific host (h1 host name):

GET /xiv/v2/:9.155.50.90/host_ports?host=h1

� List the owning host of the port (p1 port name):

GET /xiv/v2/:9.155.50.90/host_ports?port=p1

� List a specific FC port on a host (h1 host name, p1 port name):

GET /xiv/v2/:9.155.50.90/host_ports/:fc:h1:p1

� List a specific iSCSI port on a host (h1 host name, p1 port name):

GET /xiv/v2/:9.155.50.90/host_ports/:iscsi:h1:p1

Volume mappings

Volume mappings are queried with the following requests:

� List all mappings of a host (h1 host name):

GET /xiv/v2/:9.155.50.90/vol_maps?host=h1

� List all mappings of a cluster (c1 host name):

GET /xiv/v2/:9.155.50.90/vol_maps?cluster=c1

� List all mappings of a volume (ITSO_ID_vol1a volume name):

GET /xiv/v2/:9.155.50.90/vol_maps?volume=ITSO_ID_vol1a

� List specific host mapping properties (h1 host name, ITSO_ID_vol1a volume name):

GET /xiv/v2/:9.155.50.90/vol_maps/:host:h1:ITSO_ID_vol1a

� List specific cluster mapping properties (c1 cluster name, ITSO_ID_vol1a volume name):

GET /xiv/v2/:9.155.50.90/vol_maps/:cluster:c1:ITSO_ID_vol1a

Exploring RESTful API Support with IBM XIV 19

Page 20: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

In Example 7, you see how a request can be written using curl and POST to create a storage pool called ITSO_Pool with a snapshot size of 10 (gigabytes (GB) by default), and soft and hard sizes of 100 GB.

Example 7 Creating a storage pool

curl https://9.32.248.194:8443/xiv/v2/:9.32.248.106/pools -H "Content-Type: application/json" -d '{"request":[{"action":"create","params":{"name":"ITSO_Pool","snap_size":"10","soft_size":"100","hard_size":"100"}}]}' -u admin:adminadmin --insecure -X POST

Pools

Pools are queried with the following requests:

� List all pools from all authorized systems for the user:

GET /xiv/v2/pools

� List all pools from a specific machine:

GET /xiv/v2/:9.155.50.90/pools

� List specific pool properties (p1 pool name):

GET /xiv/v2/:9.155.50.90/pools/:p1

Pools can also be created, resized, renamed and deleted using the POST option and the action update request. Example 8 illustrates how to create a pool with all of the parameters needed.

Example 8 shows the request to create a pool called p1, with hard and soft sizes of 1700, a snapshot size of 170, and associated with a domain called itso_dom1.

Example 8 Creating a pool using POST

POST /xiv/v2/:9.32.248.106/pools{“request”:[{“action”:”create”,”params”:{“name”:”p1”,”hard_size”:”1700”,”soft_size”:”1700”,”snap_size”:”170”,”domain”:”itso_dom1”}}]}

Volume snapshots

You can get a list of all snapshots for all authorized systems, or for individual systems. Generating snapshots must be targeted at the specific XIV that the volume is on:

� List all of the snapshots for all authorized systems:

GET /xiv/v2/snapshots

� List all of the snapshots for a specific machine:

GET /xiv/v2/:xiv1/snapshots

� List all snapshots for a specific volume:

GET /xiv/v2/:xiv1/snapshots?volume=vol1

� List specific properties of a snapshot on a given machine (sn1 in this example):

GET /xiv/v2/:xiv1/snapshots/:sn1

20 Exploring RESTful API Support with IBM XIV

Page 21: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Example 9 shows the usage of the curl command to GET the snapshots of a specific volume, ITSO_005. GET is the default, so it is not needed explicitly in the command. The attributes of a snapshot are listed in a comma-separated list, which in this example has been reformatted for readability by using a new line for each attribute.

Example 9 Listing snapshots for a given volume

curl https://9.32.248.194:8443/xiv/v2/:9.32.248.106/snapshots?volume=ITSO_005 -u admin:adminadmin --insecure{"status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"1","total_count":"1"},"data":{"snapshot":[{"source_ref":"/xiv/v2/:9.32.248.106/volumes/:ITSO_005","delete_priority":"0","sg":"","pool_ref":"/xiv/v2/:9.32.248.106/pools/:destination pool","creator":"","size":"206000000000","id":"last-replicated-93640489","wwn":"","ref":"/xiv/v2/:9.32.248.106/snapshots/:last-replicated-ITSO_005","system":"9.32.248.106","source":"ITSO_005","pool":"destination pool","name":"last-replicated-ITSO_005","cg":"","locked":"true"}]}}}

Other actions possible on a snapshot using POST include create, overwrite, lock, unlock, and delete. Example 10 depicts overwriting an existing snapshot itso_snap_vol1 using ITSO_vol1 as the source.

Example 10 Overwriting a snapshot using POST

POST /xiv/v2/:9.32.248.106/snapshots{“request”:[{“action”:”overwrite”,”params”:{“source”:”ITSO_vol1”,”target”:”itso_snap_vol1”}}]}

Snapshot groups

Snapshot groups are queried using the following requests:

� List all snapshot groups on all authorized systems:

GET /xiv/v2/snap_groups

� List all of the snapshot groups from a specific machine:

GET /xiv/v2/:xiv1/snap_groups

� List snapshot groups for the specified consistency group:

GET /xiv/v2/snap_groups?cg=cg1

� List all snapshot groups on the specified systems:

GET /xiv/v2/:xiv1/snap_groups

� List specific snapshot groups:

GET /xiv/v2/:xiv1/snapshots/:sg1

Exploring RESTful API Support with IBM XIV 21

Page 22: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Listed here, in Example 11, is the curl command using GET to list all of the snapshots in the snapshot group test1. In this example, there are three snapshots in the snapshot group test1:

� test1.ex.vol_1� test1.ex.vol_2� test1.ex.vol_3

Example 11 Listing snapshots in a group

curl https://9.32.248.194:8443/xiv/v2/:9.32.248.106/snap_groups/:test1 -u admin:adminadmin --insecure{"status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"1","total_count":"1"},"data":{"sg":{"id":"3","ref":"/xiv/v2/:9.32.248.106/snap_groups/:test1","system":"9.32.248.106","name":"test1","cg":"ex_cg","cg_ref":"/xiv/v2/:9.32.248.106/cgs/:ex_cg","locked":"yes","delete_priority":"1","snapshots":[{"name":"test1.ex_vol_3","ref":"/xiv/v2/:9.32.248.106/snapshots/:test1.ex_vol_3"},{"name":"test1.ex_vol_2","ref":"/xiv/v2/:9.32.248.106/snapshots/:test1.ex_vol_2"},{"name":"test1.ex_vol_1","ref":"/xiv/v2/:9.32.248.106/snapshots/:test1.ex_vol_1"}]}}}}

Other actions possible using POST on snapshot groups include create, overwrite, lock, unlock, and delete. Example 12 illustrates two options for deleting the snapshot group test1.

Example 12 Deleting a snapshot group

Option 1:POST /xiv/v2/:9.32.248.106/snap_groups{“request”:[{“action”:”delete”,”params”:{“name”:”test1”}}]}Option 2:POST /xiv/v2/:9.32.248.106/snap_groups/:test1{“request”:[{“action”:”delete”}]}

Consistency groups

Consistency groups are queried using the following requests:

� List all consistency groups on all authorized systems

GET /xiv/v2/cgs

� List all consistency groups

GET /xiv/v2/:xiv1/cgs

� List consistency groups on targeted systems

GET /xiv/v2/:xiv1/cgs/:cg1

22 Exploring RESTful API Support with IBM XIV

Page 23: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Example 13 shows how the curl command can be used to list the consistency groups.

Example 13 Listing consistency groups on a target system

curl https://9.32.248.194:8443/xiv/v2/:9.32.248.106/volumes/:ITSO_vol_8 -u admin:adminadmin --insecure{"status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"1","total_count":"1"},"data":{"volume":{"size_on_disk":"17000000000","pool_ref":"/xiv/v2/:9.32.248.106/pools/:ITSO_pool","size":"17179869184","id":"24293893","wwn":"00173800001B2582","ref":"/xiv/v2/:9.32.248.106/volumes/:ITSO_vol_8","system":"9.32.248.106","pool":"ITSO_pool","name":"ex_vol_8","mirrored":"false","cg":"cg2","cg_ref":"/xiv/v2/:9.32.248.106/cgs/:cg2","locked":"false","used_capacity":"0"}}}}

Other update operations that can be issued on consistency groups include create, add_volume, remove_volume, and delete using POST. Example 14 illustrates the command for updating a consistency group called itso_cg1 by removing a volume itso_vol1 using the remove_volume action.

Example 14 Removing a volume from a consistency group

POST /xiv/v2/:9.32.248.106/cgs{“request”:[{“action”:remove_volume”,”params”:{“name”:”itso_cg1”,“volume”:”itso_vol1”}}]}

Mirrors

Mirrors are queried using the following requests:

� List all mirrors on all authorized systems:

GET /xiv/v2/mirrors

� List all mirrors on a specified system:

GET /xiv/v2/:xiv1/mirrors

� List properties of specified consistency group mirrors (cg1 in this example):

GET /xiv/v2/:xiv1/mirrors/:cg:cg1

� List properties of mirrors for a specified volume (vol1 in this example):

GET /xiv/v2/:xiv1/mirrors/:volume:vol1

Exploring RESTful API Support with IBM XIV 23

Page 24: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

In Example 15, you can see the curl tool used to query the mirrors on a specific XIV system. This example has been reduced to show a single mirror in a readable format. The mirror shown is for a synchronously mirrored consistency group, ITSO_xiv2_cg1c. The output of the command displays all the states of a mirrored consistency group, including source and destination systems, synchronous state, and whether the mirror is active.

Example 15 Listing mirrors for a specified XIV system

curl https://9.32.248.194:8443/xiv/v2/:9.32.248.151/mirrors -u admin:adminadmin --insecure{"status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"14","total_count":"14"},"data":{"mirror":{"destination_ref":"/xiv/v2/:9.155.116.61/cgs/:ITSO_xiv2_cg1c","sync_type":"sync_best_effort","mirrored_object":"CG","destination_system_ref":"/xiv/v2/systems/:9.155.116.61","connected":"yes","source_ref":"/xiv/v2/:9.155.50.90/cgs/:ITSO_xiv1_cg1c","source_system_ref":"/xiv/v2/systems/:9.155.50.90","sync_state":"Synchronized","specified_rpo":"","remote_rpo":"","destination":"ITSO_xiv2_cg1c","id":"7a6c315800046","system":"9.155.50.90","source":"ITSO_xiv1_cg1c","active":"yes","destination_system":"9.155.116.61","source_system":"9.155.50.90"}

Other update operations that can be issued against mirrors include create_sync_mirror, create_async_mirror, activate_mirror, deactivate_mirror, and delete using POST. Example 16 illustrates a way to deactivate a volume mirror, ITSO_xiv1_vol1b2, and specifies the target XIV system,9.155.116.61.

Example 16 Deactivating a mirror on a specific XIV system

POST /xiv/v2/:9.32.248.106/mirrors{“requet”:[{“action”:”deactivate_mirror”,”params”:{“name”:”ITSO_xiv1_vol1b2”,”mirror_type”:”volume”,”target”:”9.155.116.61"}}]}

3-way mirrors

Use the 3_way_mirrors command to list mirrors created along with the states of all three volumes in the mirrored set. The user is required to have access to at least the source mirror to return information about the 3-way mirror. Some other things to note about support for 3-way mirrors also exclude paging (limit and offset parameters). The responses to the 3_way_mirrors query will contain only the relevant information that the user has access to.

Lastly, only mirrors associated with the source volumes are returned. For example, if the user only has access to the source system, then the response will only contain information about the source volumes in a 3-way mirror. If the user can only access mirrors associated with the destination volumes, then the command will return an empty list.

24 Exploring RESTful API Support with IBM XIV

Page 25: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Mirrors are queried using the following requests:

� List all of the 3-way mirrors from all of the authorized systems:

GET /xiv/v2/:xiv1/3_way_mirrors

� List all of the 3-way mirrors on a specific machine:

GET /xiv/v2/:xiv1/3_way_mirrors

� List the properties of a specific 3-way mirror (ITSO_3way_mirror in this example):

GET /xiv/v2/3_way_mirrors/:ITSO_3way_mirror

� List the properties of a specific 3-way mirror on a given system:

GET /xiv/v2/:xiv1/3_way_mirrors/:ITSO_3way_mirror

Example 17 illustrates the usage of the curl command to query all of the 3-way mirrors on a specific system. Remember that this type of query command will begin with certain fields, as listed in “List of RESTful API V2 query, post, and delete requests” on page 16. The output in this example has been formatted for readability. There is quite a bit of information returned for 3-way mirrors, so this example has been reduced to show a single 3-way mirror.

Example 17 Listing 3-way mirrors on a specific XIV

$ curl https://9.155.116.160:8443/xiv/v2/:9.155.50.90/3_way_mirrors/ -u itso:adminadmin --insecure{"status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"2","total_count":"2"},"data":{"three_way_mirror":[{"id":"001738009C4A0C67","system":"9.155.50.90","errors":"No_Error","connected":"","name":"ITSO_3site_A_M__001-XIV_PFE2_1340010","state":"Synchronized","active":"yes","source_mirrors":[

{"sync_type":"async_interval","mirrored_object":"Volume","connected":"yes","source_ref":"/xiv/v2/:9.155.116.61/volumes/:ITSO_3way_B_SM_001","source_system_ref":"/xiv/v2/systems/:9.155.116.61","sync_state":"Initializing","specified_rpo":"0:06:00","remote_rpo":"0:06:00","destination":"N/A","id":"3a7914e0000a","system":"9.155.116.61","source":"ITSO_3way_B_SM_001","active":"no","destination_system":"N/A","source_system":"9.155.116.61"},

{"destination_ref":"/xiv/v2/:9.155.116.61/volumes/:ITSO_3way_B_SM_001","sync_type":"sync_best_effort","mirrored_object":"Volume","destination_system_ref":"/xiv/v2/systems/:9.155.116.61","connected":"yes",

Exploring RESTful API Support with IBM XIV 25

Page 26: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

"source_ref":"/xiv/v2/:9.155.50.90/volumes/:ITSO_3way_A_M__001","source_system_ref":"/xiv/v2/systems/:9.155.50.90","sync_state":"Synchronized","specified_rpo":"","remote_rpo":"","destination":"ITSO_3way_B_SM_001","id":"24a015800011","system":"9.155.50.90","source":"ITSO_3way_A_M__001","active":"yes","destination_system":"9.155.116.61","source_system":"9.155.50.90"},

{"sync_type":"async_interval","mirrored_object":"Volume","connected":"yes","source_ref":"/xiv/v2/:9.155.50.90/volumes/:ITSO_3way_A_M__001","source_system_ref":"/xiv/v2/systems/:9.155.50.90","sync_state":"RPO OK","specified_rpo":"0:06:00","remote_rpo":"0:06:00","destination":"N/A","id":"24c115800015","system":"9.155.50.90","source":"ITSO_3way_A_M__001","active":"yes","destination_system":"N/A","source_system":"9.155.50.90"}]}

The first portion returning information about a 3-way mirror lists the full state of the 3-way mirror. The indented portions of this example are then grouped to show the substitute source to destination asynchronous mirror, which is in an inactive state, the source to substitute source active synchronous mirror, and the source to destination active asynchronous mirror.

Domains

Domains must be queried using a filter option with listing volumes, pools, hosts, and clusters. This will result in listing only those objects associated with the specified domain. However, if the domain policy is set to open access, the query, without the domain filter, lists all objects for all domains. A domain can also be associated with a pool, host, and cluster when it is created with RESTful commands.

26 Exploring RESTful API Support with IBM XIV

Page 27: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Example 18 shows the curl command to query all of the volumes associated with a domain. In this example, the domain is rest_test. This pool, rest_test_pool1, contains a single volume, vol1.

Example 18 Filtering volumes by domain

$ curl https://9.155.116.160:8443/xiv/v2/:9.155.50.90/volumes?domain='rest_test' -u restful:password --insecure{"status":{"server":{"status":"0","message":"OK"},"failed_systems":[]},"response":{"counts":{"data_count":"1","total_count":"1"},"data":{"volume":[{"size_on_disk":"17000000000","pool_ref":"/xiv/v2/:9.155.50.90/pools/:rest_test_pool1","size":"17208180736","id":"3d0c4b14500fa4","wwn":"001738009C4A0FA4","ref":"/xiv/v2/:9.155.50.90/volumes/:vol1","system":"9.155.50.90","pool":"rest_test_pool1","name":"vol1","mirrored":"false","cg":"","locked":"false","used_capacity":"0"}]}}}

It is also possible to associate a pool with a domain when the pool is created.

Cross-system consistency groups

Cross-system consistency groups (xcgs) are queried using the following requests:

� List all xcgs across authorized systems:

GET /xiv/v2/xcgs

� List properties of the specified xcg:

GET /xiv/v2/xcgs/:xcg1

� Create a cross-system consistency group (xcg1 is the cross system consistency group):

POST /xiv/v2/xcgs/:xcg1 {“request”:[{“action”:”create_snapshot”,”params”:{“snapshot_name”:”ITSO_snap1”, “delete_priority”:”2”}}]}

Exploring RESTful API Support with IBM XIV 27

Page 28: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Events

Events queries fetch events from a specific XIV system.

Because events are not managed by the Management Server, paging is not supported for this query. The following query parameters can be used to filter the events:

� The min_severity parameter, which defines the minimum event severity. The following list shows the possible values:

– Informational, Minor, Major, Warning, and Critical.

– If omitted, minimum severity is Informational.

� The after parameter, which returns events that occurred after the specified time stamp.

� The before parameter, which returns events that occurred before the specified time stamp.

The following GET command is an example of an event query:

GET /xiv/v2/:9.155.50.90/events?min_severity=Warning&after=2013-03-07

28 Exploring RESTful API Support with IBM XIV

Page 29: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Authors

This paper was produced by a team of specialists from around the world working at the International Technical Support Organization (ITSO), San Jose Center.

Bertrand Dufrasne is an IBM Certified Consulting IT Specialist and Project Leader for IBM System Storage® disk products at the ITSO, San Jose Center. He has worked at IBM in various information technology (IT) areas. He has authored many IBM Redbooks® publications, and has also developed and taught technical workshops. Before joining the ITSO, he worked for IBM Global Services as an Application Architect. He holds a Master’s Degree in Electrical Engineering.

Paul Braren is an IBM Storage Technical Advisor. He’s currently working closely with many storage customers in and near Connecticut, forging trusting relationships through innovative ways of implementing and maintaining their XIV and IBM FlashSystem™ storage. He has enjoyed a variety of customer-facing roles, including first-hand delivery of dozens of hands-on VMware sessions. He has also been the Worldwide Technical Team Leader for an IBM Innovation Center, and a project manager for converting hundreds of physical servers into just a few virtualization blades.

Roger Eriksson is an IBM Systems and Technology Group (STG) Lab Services consultant, based in Stockholm, Sweden, who works for the European Storage Competence Center in Mainz, Germany. He is a Senior Accredited IBM Product Service Professional. Roger has over 20 years of experience working on IBM servers and storage, including Enterprise and Midrange disk, network-attached storage (NAS), storage area network (SAN), IBM System x, IBM System p®, and IBM BladeCenter. He has done consulting, proof of concepts, and education, mainly with the XIV product line, since December 2008. He has worked with both clients and various IBM teams worldwide. He holds a Technical College Graduation in Mechanical Engineering.

Wenzel Kalabza is a certified IBM XIV Product Field Engineer (PFE) based in the storage competence center in Mainz, Germany. Wenzel joined IBM in 1998 as customer quality engineer for IBM disk drive failure and performance analysis. He joined the Back Office for the high end storage system (ESS) in June 2002. In 2005, Wenzel started a PFE role for the IBM DS6000™ disk storage. In June 2008, he became a PFE for the XIV storage product. Wenzel holds a degree in Electrical Engineering and Power Economy, and several storage related certifications.

Lisa Martinez has been working in the IBM North America Storage Specialty Team (formerly ATS) as a storage consultant since January 2012. Her focus has been with pre-sales support for IBM DS8000® and XIV. She has also been lead instructor for XIV customer-based workshops. Prior experience includes roles as a storage architect in the Specialty Services Area in IBM Global Technology Services® (GTS), a temporary assignment as a Global Support Manager for Cardinal Health, and test architect in disk storage focusing on system-level test for XIV for three years, and copy services for DS80000. Lisa holds degrees in Computer Science from New Mexico Highlands University and Electrical Engineering from the University of New Mexico. She has been employed with IBM for 17 years.

Jeff Skotzko is an iBM Storage Technical Advisor in the US, and has worked in the IT industry for over 20 years, almost exclusively for enterprise customers in both the telecommunications and utility sectors implementing IBM servers and storage. He has been working with customers to implement and maintain the XIV product line since December of 2009. He holds both VMware and Microsoft certifications.

Exploring RESTful API Support with IBM XIV 29

Page 30: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Thanks to the authors and contributors of the previous edition:Dietmar Dausner, Roman Fridli, Itzhack Goldberg, and Markus OschekaIBM

Thanks to the following people for their contributions to this project:

Mor Griv, Diane Benjuya, Ran Harel, Yossi Siles, Stephen Solewin, and Erez Theodorou IBM

Now you can become a published author, too

Here’s an opportunity to spotlight your skills, grow your career, and become a published author—all at the same time. Join an ITSO residency project and help write a book in your area of expertise, while honing your experience using leading-edge technologies. Your efforts will help to increase product acceptance and customer satisfaction, as you expand your network of technical contacts and relationships. Residencies run from two to six weeks in length, and you can participate either in person or as a remote resident working from your home base.

Obtain more information about the residency program, browse the residency index, and apply online:

ibm.com/redbooks/residencies.html

Stay connected to IBM Redbooks

� Find us on Facebook:

http://www.facebook.com/IBMRedbooks

� Follow us on Twitter:

http://twitter.com/ibmredbooks

� Look for us on LinkedIn:

http://www.linkedin.com/groups?home=&gid=2130806

� Explore new Redbooks publications, residencies, and workshops with the IBM Redbooks weekly newsletter:

https://www.redbooks.ibm.com/Redbooks.nsf/subscribe?OpenForm

� Stay current regarding recent Redbooks publications with RSS Feeds:

http://www.redbooks.ibm.com/rss.html

30 Exploring RESTful API Support with IBM XIV

Page 31: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

Notices

This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user’s responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.

The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.

Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those websites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.

Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.

© Copyright International Business Machines Corporation 2014. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 31

Page 32: Exploring RESTful API Support with IBM XIVExploring RESTful API Support with IBM XIV 3 Cacheable The server can advise the client whether the response is cacheable. Effective caching

®

Redpaper™

Send us your comments in one of the following ways:� Use the online Contact us review Redbooks form found:

ibm.com/redbooks� Send your comments in an email:

[email protected]� Mail your comments:

IBM Corporation, International Technical Support OrganizationDept. HYTD Mail Station P0992455 South RoadPoughkeepsie, NY 12601-5400 U.S.A.

Trademarks

IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol (® or ™), indicating US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml

The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both:

DS6000™DS8000®FlashSystem™Global Technology Services®

IBM®IBM FlashSystem™Redbooks®Redpaper™

Redbooks (logo) ®System p®System Storage®XIV®

The following terms are trademarks of other companies:

Linux is a trademark of Linus Torvalds in the United States, other countries, or both.

Microsoft, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Other company, product, or service names may be trademarks or service marks of others.

32 Exploring RESTful API Support with XIV


Recommended