To retrieve data for a specified resource instance, use the following request components:
Header
Accept: application/json
Operation
GET
URI patterns
For all resource types:
/api/instances/<resourceType>/<id>
For applicable resource types:
/api/instances/<resourceType>/name:<assignedName>
where:
<resourceType> is the resource type of the desired instance.
<id> is the unique identifier of the desired instance.
<assignedName> is the user-assigned name of the desired instance.
For additional functionality, such as returning specific attributes, paging, filtering, and localizing return messages, you can append one or more request parameters to the URI. To see if a resource type can be identified by the user-assigned name, see the individual resource type topics in the
Unisphere Management REST API Reference Guide.
Body
Empty.
If the request succeeds, the server returns a
200 OK HTTP status code and an instance resource in the response body. If the request does not succeed, the server returns a
4nn or
5nn HTTP status code and a message entity in the response body.
By default, the response to a
GET collection request includes only the unique identifier (id attribute) of the specified resource type. You can use the following request parameters to customize what data is returned:
Request parameter
Description
fields
Requests data for a specified set of attributes.
compact
Omits metadata from the instance in the response.
Example 1 - Using the ID to identify the instance
The following request returns the values for the
id,
name, and
rpm attributes for the
disk resource instance that has an id of
dpe_drive_4. The
id attribute is returned automatically, while the
fields parameter specifies that the value for the
name and
rpm attributes should also be returned.
Header:
Accept: application/json
Request
GET https://10.108.53.216/api/instances/disk/dpe_drive_4?fields=name,rpm
Example 2 - Using the user-assigned name to identify the instance
The following request returns the values for the
id,
name, and
rpm attributes for the
disk resource instance that has a user-assigned name of
Drive 4. The
id attribute is returned automatically, while the
fields parameter specifies that the value for the
name and rpm attributes should also be returned.
Header:
Accept: application/json
Request
GET https://10.108.53.216/api/instances/disk/name:Drive 4?fields=name,rpm