beautypg.com

HP StoreEver ESL G3 Tape Libraries User Manual

Page 9

background image

4

1

The response body in the above example contains a list ( root element)
of partitions represented as XML data. The partitions are defined as data objects which represent
the partitions configured on the library. As mentioned earlier the data format of the message body
could have been JSON but the HTTP request header contained the following line:

Accept: text/plain, application/xml

Which indicates to the server that the responses body “Content type or Media type” needs to be
plain/text or application/xml. In this particular case the resource requested for the method GET
only supports XML (default) or JSON, so XML is returned. The response message header also
describes the content type with the following header line:

Content-Type: application/xml

The ESL G3 supports the following formats:

text/plain

application/xml

application/json

application/octet-stream

application/x-tar

Other content-types may be supported in the future.

For the most part, data objects that represent a resource are returned in the message body of the
response to a particular request. These objects could represent a list of resource objects.

HTTP://library/aml/users



service
2
0
false


admin
0
2
false


jdoe
1
Test Partition
Sales Partition
0
false

Or as a single object:

HTTP://library/user/admin


admin

9