To retrieve data for a specified resource instance, use the following request components:
Headers, operation, and URI pattern | Headers, operation, and URI pattern example |
---|---|
Headers |
Accept: application/json Authorization: <auth_cookie> |
Operation | GET |
URI pattern |
/api/rest/<resource_type>/<id>where:
|
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 4xx or 5xx HTTP status code and a message entity in the response body.
By default, the response to a GET instance request includes only the unique identifier (id attribute) of the specified resource instance. You can use the following request parameters to customize what data is returned:
Request parameter | Description |
---|---|
select | Requests data for a specified set of attributes. |
The following request returns the values for the id, name, and serial_number attributes for the appliance resource instance that has an id of J8WRPD2.
Header, request, and response body | Header, request, and response body example |
---|---|
Header |
Accept: application/json |
Request |
GET https://1.2.3.4/api/rest/appliance/J8WRPD2?select=id,name,service_tag |
Response body |
{ "id": "J8WRPD2", "name": "H2025-appliance-1", "service_tag": "J8WRPD2" } |