Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell Unity™ Family Unisphere® Management REST API Programmer's Guide

PDF

Retrieving data for multiple occurrences in a collection

To retrieve data for multiple occurrences of a resource type, use the following request components:

Header
Accept: application/json
Operation
GET
URI pattern
/api/types/<resourceType>/instances
where <resourceType> is the resource type for the collection you want to return.
For additional functionality, such as paging, filtering, and localizing return messages, 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 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 the returned data:

Request parameters Description
per_page and page Groups returned resource type instances into chunks that form pages, and returns only the specified page.
filter Returns the resource type instances that match the specified criteria.
fields Requests data for a specified set of attributes.
compact Omits metadata from the resource type instances in the response.

The collection resource returned by a collection query contains a base URI and self-link for each instance in the list. You can create an instance query for a particular instance by appending the base URI to the instance's self-link.

Example

The following request returns the unique identifiers of all resources in the alert resource collection. The fields parameter specifies that the value for the severity and description attributes should also be returned. This example shows two returned instances:

Header
 Accept: application/json
Request
GET https://10.108.53.216/api/types/alert/instances?fields=severity,description
Request body
Empty.
Response body
"entries": [
    {
      "@base": "https://10.245.23.125/api/instances/alert",
      "updated": "2015-11-19T21:18:30.613Z",
      "links": [
        {
          "rel": "self",
          "href": "/alert_1"
        }
      ],
      "content": {
        "id": "alert_1",
        "severity": 4,
        "description": "The DNS client configured for the NAS server has faulted. Contact your service provider."
      }
    },
    {
      "@base": "https://10.245.23.125/api/instances/alert",
      "updated": "2015-11-19T21:18:30.613Z",
      "links": [
        {
          "rel": "self",
          "href": "/alert_2"
        }
      ],
      "content": {
        "id": "alert_2",
        "severity": 6,
        "description": "The component is operating normally. No action is required."
      }
    },

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\