beautypg.com

2 interface description – HP StoreEver ESL G3 Tape Libraries User Manual

Page 8

background image

2 Interface description

As described in the introduction, HTTP is used as the application protocol for clients to make
requests to the Web Server (WS) and for the server to provide responses to those requests. A client
request needs to provide an address of the resource it is interested in and that address is represented
as a URI as described in previously. The ESL G3 defines a base URI that all requests must contain,
which is as follows:

HTTP(S)://LIBRARY-NAMEorIP/aml—where HTTP is unsecure and HTTPS is secure.

This base URI is the location on the network where all resources can be accessed. The goal
is to describe intuitive resources and to use directory style structure. For example to interact
with partitions (Logical Libraries) you would use the following URI

HTTP://LIBRARY/aml/partitions—to interact with a particular partition you would use the URI.

HTTP://LIBRARY/aml/partition/{name}—where the “name” template is the name of the
partition you are requesting.

To change the status of a partition you could use the following URI:

HTTP://LIBRARY/aml/partition/{name}/status?online=false—where ?online=false is the
query string which is comprised of a name (online), value (online) pair. There can be and
number of name, value pairs and should be separated by the '&' character, for example
?start=0&limit=100

.

The requesting client also needs to describe the operation it wants to perform on a particular
resource. The possible options are described by the HTTP methods POST (Create a new resource),
GET (Read an existing resource), PUT (Update an existing resource) and DELETE (Delete a resource).
These methods are included in the HTTP request header. Here is a HTTP header example of a GET
method request for the resource partitions:

GET http://library/aml/partitions HTTP/1.1
Host: [email protected]
User-Agent: Mozilla/5.0
Current-type: text/plain
Accept: text/plain, application/xml

The response message from the server is very similar. It contains the version of HTTP we are using,
a response code, a short message that explains the response code, a variable set of optional
headers and an optional message body.

HTTP/1.1 200 OK
Content-Type: application/xml
Server: Jetty(7.9.2 v20120308)
Content-Length: 870


Test Partition
1
6

300

2

12

0

0

209

8

Interface description