HP 3PAR StoreServ 7400 2-node HP 3PAR Web Service API 1.2 Developer's - Page 14
Supported HTTP Methods, General URI Format, System Access, Creating Credentials
View all HP 3PAR StoreServ 7400 2-node manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 14 highlights
Supported HTTP Methods This section summarizes the HTTP methods currently supported by the HP 3PAR WSAPI. These include: GET The HTTP GET method retrieves information identified by the request-URI. POST The HTTP POST method requests that an object described by the body of the request be created in the collection identified by the URI. PUT The HTTP PUT method requests that an entity identified by the Request-URI be modified. DELETE The HTTP DELETE method requests that the server delete the resource identified by the request URI. General URI Format All operations of the API are performed using an HTTP method (GET, POST, PUT, or DELETE) and a Uniform Resource Identifier (URI). In this example, the URI corresponds to the volume named projectXvol residing on the HP 3PAR storage system with the hostname storsys1.example.com: https://storsys1.example.com:8080/api/v1/volumes/projectXvol System Access This section discusses the use of session keys with the WSAPI. Session keys enable access to the HTTP methods for a single session. Creating Credentials In order to use the Web Services, you must create a session key by providing a username and password. The username and password are the same that you would use to access the HP 3PAR storage server through the HP 3PAR Command Line Interface (CLI) or the HP 3PAR Management Console (MC). The authorization carries the same user permissions for the WSAPI as for the CLI or MC, in that you have permission to perform the same operations through the API (where available) as you would with the CLI or MC. 1. Create a session key using the HTTP POST method with a URI of the following format: https://:8080/api/v1/credentials 2. The message body of the request is a JSON object, with members as shown in Table 3 (page 14). Table 3 Session Key Message Body Member JSON Objects Member user password JSON Type string string Value Username User's password Description User's name. User's password. NOTE: For error output for this and other conditions, see "HTTP Status and Error Codes" (page 16). About Multiple Session Keys A multi-threaded client application can use one session key in multiple threads concurrently. However, the requested operations will be serialized by the server. When true concurrency is needed, a client can create a session key for each concurrent thread. NOTE: This increases server resource usage and should be kept to a small number to avoid affecting server performance. 14 Accessing the WSAPI