HP 3PAR StoreServ 7200 2-node HP 3PAR Web Service API 1.2 Developer's - Page 16
Deleting a Session Key, Session Key Deletion Success, HTTP Status and Error Codes, The code Member
View all HP 3PAR StoreServ 7200 2-node manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 16 highlights
Host: InServ1:8008 Accept: */* X-HP3PAR-WSAPI-SessionKey: 48A70B8A8301C458037E0821 Supported JSON sub-objects for the Accept: */* header are shown in Table 1 (page 12). Deleting a Session Key When a client is finished making requests to the server it should delete the session keys it created. This frees up server resources and allows for better server performance. NOTE: Unused session keys expire automatically after fifteen minutes. To delete a session key, send a request with the HTTP DELETE method and the URI: https://:8080/api/v1/credentials/ where is the key that is returned in the process of creating a session key. For more information, see "Creating Credentials" (page 14). Session Key Deletion Success A successful session key deletion returns the HTTP status code 200 OK, without a message body. Session Key Deletion Errors An error condition returns an error object as a message body. Example To delete credentials using cURL, enter the following command (as a single line): curl -X DELETE -H "Accept: application/json" https://:8080/api/v1/credentials/1-c86aedb2e7e98b41-b06d2d50 HTTP Status and Error Codes When an operation is successful, the system returns one of the following HTTP status codes: • 200 OK • 201 Created When an operation fails, one of several HTTP status codes is returned. Also, the message body contains a JSON object with information specific to the HP 3PAR WSAPI. The JSON object contains the members code, desc, and, when relevant, ref. The code member is a number and the rest are strings. The JSON object contains the following members: The code Member Just as is the case with CLI text, the text in the desc member (see Table 5 (page 17)) is subject to change and cannot be relied upon. To avoid that problem, the WSAPI provides a reliable code for an error. The error code member is a JSON numeric type. Only codes that are defined in the table below will be returned. For applications that change behavior based on errors, only the code member should be relied on. For ease of reading documentation, a symbol is defined for each numeric code, but the symbol is not part of the API. The numeric value is the contract between client and server. The codes are described in Table 5 (page 17). Generic codes for the WSAPI are described in Table 5 (page 17). 16 Accessing the WSAPI