The PowerStore REST API supports the following request parameters:
Request parameter | Applicable request types | Description |
---|---|---|
select | Collection and instance queries | Specifies a comma-separated list of attributes to return in a response. If you do not use this parameter, a query returns the
id attribute only.
For more information, see Specifying the attributes to return in a query response. |
<filter expression> | Collection queries | Filters the response data against a set of criteria. Only matching resource instances are returned. Filtering is case insensitive.
For more information, see Filtering response data. |
order | Collection queries |
Specifies how to sort response data. You can sort response data in ascending or descending order based on one of the following:
For more information, see Sorting response data. |
async | Most non-GET requests | Setting this parameter to
true
(?async=true) runs the request in the background. Most active management requests (ones that attempt to change the configuration) support this option. By default, requests are run synchronously.
For more information, see Working with asynchronous requests. |
To use request parameters, append the parameters to the request URI. The first request parameter appended to the URI begins with a ? character. Subsequent request parameters appended to the URI begin with a & character. You can combine request parameters and can use them in any order.
The following request uses a select request parameter to return the values for the id, severity, and description attributes for all alert instances.
Request and response | Request and response example |
---|---|
Request |
GET https://1.2.3.4/api/rest/alert?select=id,severity,description_l10n |
Response |
[ { "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", "description_l10n":"Bus 0 enclosure 0 LCCA is initializing." }, { "id":"37583ff1-b0fe-41f2-9b3d-e5e5d2e5e525", "severity":"Info", "description_l10n":"The remote system <undefined> volume discovery or refresh has failed." }, . . . |
The following request uses a filter expression to return the values for alert instances that have the severity attribute set to Info:
Request and response | Request and response example |
---|---|
Request |
GET https://1.2.3.4/api/rest/alert?select=id,severity&severity=eq.Info |
Response |
[ { "id":"37583ff1-b0fe-41f2-9b3d-e5e5d2e5e525", "severity":"Info" }, { "id":"63d21fb9-897d-4d07-983f-0478436755b6", "severity":"Info" }, { "id":"ab9175c4-1ded-473e-b22d-63ac1154937f", "severity":"Info" } . . . |
The following request uses an order expression to sort alert instances by severity:
Request and response | Request and response example |
---|---|
Request |
GET https://1.2.3.4/api/rest/alert?select=id,severity&order=severity |
Response |
[ { "id":"37583ff1-b0fe-41f2-9b3d-e5e5d2e5e525", "severity":"Info" }, { "id":"63d21fb9-897d-4d07-983f-0478436755b6", "severity":"Info" }, { "id":"ab9175c4-1ded-473e-b22d-63ac1154937f", "severity":"Info" }, { "id":"014f999e-96d8-4f85-853c-c6a0e2569088", "severity":"Minor" }, { "id":"2d3cc48d-0296-4d15-afb9-252061cf7df9", "severity":"Minor" }, { ] |
The following asynchronous request deletes a local_user instance. The request returns the job ID:
Request and response | Request and response example |
---|---|
Request |
DELETE https://1.2.3.4/api/rest/local_user/4?is_async=true |
Response |
{ "id": "1ed0d49e-101b-4b8a-85dc-886f907e8070" } |