Reference Guide

Retrieving data for multiple occurrences in a
collection
To retrieve data for multiple occurrences of a resource type, use the following request components:
Headers
Accept: application/json
Authorization: <auth_cookie>
Operation
GET
URI
pattern
/api/rest/<resource_type>
where <resource_type> is the resource type for the collection you want to return. For additional functionality,
such as filtering instances, you can append one or more request parameters to the URI.
Body Empty.
If the request succeeds, the server returns a 200 OK HTTP status code and a collection resource in the response body. If the
request does not succeed, the server returns a 4xx or 5xx HTTP status code and an error response. If there are no instances in
a collection, the server returns a 200 OK HTTP status code and an empty body containing only [].
By default, the response to a GET collection request includes only the unique identifier for each instance of the specified
resource type. You can use the following request parameters to customize the returned data:
Request parameters
Description
select
Requests data for a specified set of attributes.
order
Specifies how to sort the response data.
<attribute
expression>
Filters the response data against a set of criteria. Only matching resource instances are returned.
Filtering is case insensitive.
limit
Limits the maximum number of items in the returned collection (1-2000).
offset
Provides an index of the first returned instance.
Retrieving data for all alerts in the system
The following request returns information about all alerts in the system. The select parameter specifies that the values for the
id, severity, and description attributes should be returned. This example shows three returned instances:
Header
Accept: application/json
Request
GET https://1.2.3.4/api/rest/alert?
select=id,event_code,severity,description_l10n
Request
body
Empty.
Response
body
[
{
"id":"014f999e-96d8-4f85-853c-c6a0e2569088",
"severity":"Minor",
"description_l10n":"Cluster license installation failed due to Fail to
obtain license file. The trial period will expire on 2019-11-27 18:47:26.985,
after which no new storage provisioning will be allowed."
},
{
"id":"2d3cc48d-0296-4d15-afb9-252061cf7df9",
"severity":"Minor",
Querying a resource 25