HP 3PAR Web Service API 1.3.1 Developer's Guide

NOTE: The Host header is optional if the request URI contains <hostname>:<http{s}_port>.
If the request URI does not contain the host and port number, then the Host header must be
specified.
Server HTTP Headers
Table 3 (page 17) shows HTTP headers included by the Web Services API in responses.
Table 3 Server HTTP Headers in the WSAPI
DescriptionValueHTTP Header
The HP 3PAR Web Services API Server.HP3PAR-WSAPIServer
Disables caching by mechanisms between the Web Services
API server software and client (HTTP RFC 2616), for HTTP/1.0
and 1.1.
no-cacheCache-Control
Disables caching by mechanisms between the WSAPI server
software and client (HTTP RFC 2616), for HTTP/1.0 and 1.1.
no-cachePragma
Indicates that the connection will be closed after completion
of the response (HTTP RFC 2616).
closeConnection
Included when the message body, which is in JSON format,
is non-empty.
application/jsonContent-Type
The path portion of the URI of a newly created or updated
object, such as:
Varies. See the example in
the Description column.
Location
/api/v1/volumes/foo
Encoding is UTF-8 and percent encoded per RFC 3986.
The date and time at which the message was originated, per
RFC 2616.
Varies according to the
date.
Date
Request Input
Clients make HTTP requests to the server and receive HTTP replies. When input is provided, such
as with the HTTP POST method, or when output is returned, the body of the message is coded
using JSON. The message body will be ignored for HTTP GET and HTTP DELETE operations.
Required and Optional Members
For some API operations, such as HTTP POST, the client passes a JSON object as the message
body. A message body consists of a single JSON object, enclosed in braces ({...}). The object may
contain sub-objects, also enclosed in braces. For example:
{"action":"createSnapshot","parameters":
{"name":"t840-vv-ss","id":null,"expirationHours":null,"retentionHours":null,
"readOnly":true,"comment":"My first WSAPI-created snapshot."}}
The JSON object includes required parameters, or members, for the operation and may include
optional members as well. Most operations have optional members.
For example, to create a volume, the only members required are the name of the volume, the name
of the CPG that provides disk space for the volume, and the size of the volume. Optional members
include the ID of the volume and a comment.
When constructing a JSON object, optional members may be omitted or set to values that indicate
the server should ignore them. The client sets only the fields of interest. The JSON object need not
Protocol and Message Format 17