HP 3PAR Web Service API 1.3.1 Developer's Guide

Table 6 Operation-specific API code Member Status and Error Codes (continued)
DescriptionHTTP CodeAPI Error CodeAPI Error
(Since WSAPI 1.3.1
with HP 3PAR OS
3.1.3 MU1)
Invalid operation:
Volume promotion is
not in progress.
409 Conflict185INV_OPERATION_VV_PROMOTE_IS_NOT_IN_PROGRESS
(Since WSAPI 1.3.1
with HP 3PAR OS
3.1.3 MU1)
The desc Member
The desc member provides supplementary information that helps explain the reason for the error
code.
NOTE: The text in the desc member is subject to change between releases.
HP recommends avoiding parsing the desc member and using it only for display purposes.
For example, the desc member for an error may change from No snap CPG specified in
one storage system version to Error: The volume must have a snap CPG in another
version. The associated WSAPI error code will not change.
Examples
Examples of desc are:
{"code":28,"desc":"client request contains values that are too large}
{"code":24,"desc":"insufficient space for requested operation"}
The ref Member
In the event of an error that may occur for several reasons, the ref member may specify the reason
for the error. For example, if the client were to send an incorrect value for a JSON member, then
the server may be able to identify which member had the incorrect value.
NOTE: In some errors, the ref member would be neither necessary nor useful, so it does not
appear for all errors.
Sample Request
POST /api/v1/hosts
HTTP/1.1
Content-Type: application/json
Host: storsys1:8080
Accept: application/json
{"name":abc}
Sample Response
HTTP/1.1 400 Bad Request
Date: Tue, Wed, 21 May 2013 22:15:52 GMT
Server: hp3par-wsapi
Content-Type: application/json
Connection: close
{"code":60,"desc":"JSON syntax error","ref":"name"}
Protocol and Message Format 37