HP 3PAR Web Service API 1.3.1 Developer's Guide

Table 2 Client HTTP Headers Supported by the HP 3PAR WSAPI for Requests
RequiredValuesDescriptionHeader
NoOne of the following:The response format the
client can accept.
Accept
application/json
application/*
application/json*
application/<anything>+json
*/json
*/*
*/json*
*/<anything>+json
where * is literally an asterisk
(*) and <anything> is any
string of characters.
NoOne of the following:The response language the
client can accept.
Accept-Language
*
en
en*
Yes, for requests
with a message
body.
Number of bytesThe length of the content in
bytes.
Content-Length
Yes, for requests
with a message
body.
application/jsonThe format of the body.Content-Type
Yes, except for a
request to create
credentials.
The result of a credentials creation
request.
A key associated with the
user that created credentials.
X-HP3PAR-WSAPI-SessionKey
No, if the request
URI already
<hostname:http{s}_port>The host and port number of
the resource being
requested.
Host
contains the host
name and port.
Client HTTP Header Examples
When querying the CPGs, the client sends the following:
GET /api/v1/cpgs HTTP/1.1
Accept: application/json
Accept-Language: en
X-HP3PAR-WSAPI-SessionKey: 1-c86aedb2e7e98b4119cd74b624b8576b-b06d2d50
When creating a CPG, the client sends the following:
POST /api/v1/cpgs HTTP/1.1
X-HP3PAR-WSAPI-SessionKey: 1-c86aedb2e7e98b4119cd74b624b8576b-b06d2d50
Accept: application/json
Content-Type: application/json
Content-Length: 27
{
"name" : "t887-cpg"
}
16 Accessing the WSAPI