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

Performing a class-level resource-specific action

Some resource types have class-level operations, which let you perform actions related to the resource type that are not targeted at a specific instance. For example, you can use the ipPort resource type's Recommend operation to recommend ports on the specified SP to use for creating NAS servers.

To perform a resource-specific action on a resource type, use the following request components:

Headers
For operations without request arguments:
Accept: application/json 
X-EMC-REST-CLIENT: true 
EMC-CSRF-TOKEN: <token>
For operations with request arguments:
Accept: application/json
Content-Type: application/json
X-EMC-REST-CLIENT: true
EMC-CSRF-TOKEN: <token>
Operation
POST
URI pattern
/api/types/<resourceType>/action/<operationName>
where <resourceType> is the resource type of the instance for which you want to perform the desired action.
For additional functionality, such as making the request an asynchronous request and localizing response messages, you can append one or more request parameters to the URI.
Body
For operations without request arguments:
Empty.
For operations with input data:
{
   "argument1":value,
   "argument2":value,
   .
   .
   .
}

where the comma-separated list contains all required arguments and any optional arguments. Use double quotes around a string, dateTime, or IPAddress value.

The success response for a class-level resource-specific action differs depending on whether the action performed has output data:

  • For actions that do not have output data, a successful request returns 204 No Content HTTP status code and an empty response body.
  • For actions that have output data, a successful request returns 200 OK HTTP status code, and the body will have the specified out attributes in an instance resource response body.

If the request does not succeed, the server returns a 4nn or 5nn HTTP status code in the response header and a message entity in the response body

Example

The following example uses the Recommend operation for the ipPort resource type to recommend ports on the specified SP to use for creating NAS servers:

Headers
Accept: application/json
Content-Type: application/json
X-EMC-REST-CLIENT: true
EMC-CSRF-TOKEN: <token>
Request
POST https://10.108.125.206/api/types/ipPort/action/recommendForInterface 
			 
Request body
{
  "storageProcessor":{"id":"spa"}
}
Response body
{
  "@base": "_https://10.108.125.206/api/types/ipPort/action/RecommendForInterface",
  "updated": "2013-04-24T20:46:53.730Z",
  "links":
  [
      {
          "rel": "self",
          "href": "/"
      }
  ],
  "content":
  {
      "recommendedPorts":
      [
          {
              "spa_iom_0_eth1"
          },
          {
              "spa_iom_0_eth2"
          }
      ]
  }
}

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: <>()\