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:
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: