HP 3PAR Web Service API 1.3.1 Developer's Guide

Querying A Single Port
To query port information for a single instance, use the HTTP GET method in the URI, with no
message body, where <n:s:p> is the port <node>:<slot>:<port> value:
https://<storage_system>:8080/api/v1/ports/<n:s:p>
Single-Port Query Success
Upon success, the HTTP code 200 OK is returned.
Unless an internal server error occurs, the response includes a message body as specified in
Table 82 (page 96).
Table 82 Port Collection Message Body for a Single-Port Query
DescriptionAPI TypeJSON Type
Storage port properties.Port Property objectobject
(Since WSAPI 1.2)
Single-Port Query Errors
Possible errors for a single-port query response are shown in Table 83 (page 96). For generic API
error codes, see Table 5 (page 22).
Table 83 Single-Port Query Error Codes
DescriptionHTTP CodeAPI Code
Incorrect port specification.400 Bad RequestINV_INPUT_PORT_SPECIFICATION
(Since WSAPI 1.2)
Port does not exist.404 Not FoundNON_EXISTENT_PORT
(Since WSAPI 1.2)
INV_INPUT_ALL_WHITE_SPACES_STR
Querying Port Devices
To query for port devices connected to a specified port, use the HTTP GET method on the following
URI, with no message body:
https://<storage_system>:8080//api/v1/portdevices?query="portPos==n:s:p"
https://<storage_system>:8080//api/v1/portdevices?query="portPos==n:s:p
OR portPos==0:1:2"
For information about using filtering to query port devices, see “Filtering in Queries” (page 20).
Port-Device Query Success
Upon a successful query, the response includes a message body as shown in Table 84 (page 96).
Table 84 Message Body JSON Objects for portDevices Query
DescriptionAPI TypeJSON TypeMember
Number of portDevices
objects returned.
int32numbertotal
(Since WSAPI 1.3)
Port device properties.array of portDevices
property objects
array of objectsmembers
(Since WSAPI 1.3)
96 Working with Ports and Switches