Dell PowerStore 500T EMC PowerStore REST API Developers Guide
Dell PowerStore 500T Manual
View all Dell PowerStore 500T manuals
Add to My Manuals
Save this manual to your list of manuals |
Dell PowerStore 500T manual content summary:
- Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 1
Dell EMC PowerStore REST API Developers Guide Version 2.x June 2021 Rev. A03 - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 2
data and tells you how to avoid the problem. WARNING: A WARNING indicates a potential for property damage, personal injury, or death. © 2020 -2021 Dell Inc. or its subsidiaries. All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 3
Contents Additional Resources...5 Chapter 1: Overview...6 The PowerStore Management REST API...6 Resource-oriented architecture and REST...6 JSON data exchange format...7 Chapter 2: REST request components 8 HTTP request headers...8 URI patterns...9 Request parameters...10 REST - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 4
Deleting a resource instance...38 Performing an instance-level resource-specific action 38 Performing a class-level action...40 Working with asynchronous requests...41 Chapter 8: Reference content...43 4 Contents - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 5
PowerStore Documentation page at https:// www.dell.com/powerstoredocs. ● Troubleshooting For information about products, software updates, licensing, and service, go to https://www.dell.com/support and locate the appropriate product support page. ● Technical support For technical support and service - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 6
to use for historical analysis. ● Gather configuration information and logs to use for auditing and trending analysis. For more information about PowerStore Management REST API functionality, see Reference content on page 43. Reference materials are also available on the appliance in several formats - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 7
and server occurs through HTTP requests and responses. In the PowerStore Management REST API, requests and responses represent resource data using state information. Instead, client requests contain all the necessary information to service the request. ● Resources in a REST API are self-documenting. - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 8
the PowerStore Management REST API. The API uses these headers in standard ways. HTTP header Accept: Content-Type: Accept-Language: DELL- it is the default and only supported value. Requested locale will be mapped to an available language. Only en-US is supported. Before issuing any REST call which - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 9
URI patterns Basic URI patterns The following table describes the basic URI patterns that the PowerStore Management REST API supports: Table 1. Basic patterns in the REST API URI pattern HTTP Operations Collection type resource URI GET /api/rest/ POST Instance resource URI / - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 10
HTTP request headers on page 8 Request parameters on page 10 REST requests on page 12 Request parameters The PowerStore Management REST API supports the following request parameters: Request parameter select order async Applicable request types Description Collection and - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 11
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 < - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 12
{ "id":"2d3cc48d-0296-4d15-afb9-252061cf7df9", "severity":"Minor" }, { ] Using the is_async request parameter The following asynchronous request deletes a local_user instance. The request returns the job ID: Request DELETE https://1.2.3.4/api/rest/local_user/4?is_async=true Response { "id": " - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 13
server error, and a 503 status code indicates that the REST service is temporarily unavailable. ● The JSON response body varies according to the HTTP client must support cookies in order to use the API. For more information, see Connecting and authenticating. DELL-EMC-TOKEN Before issuing any - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 14
in the REST API (continued) HTTP header Description named DELL-EMC-TOKEN. Use the value of token from the response 4xx and 5xx HTTP status codes) the system returns a message entity that describes the problem. The following table describes the HTTP status codes that apply to the REST API: Table - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 15
All requests Error 503 Service Unavailable All requests Description in an instance URI. Specified resource does not support the request's operation. For example, requesting a The response body contains an error message that describes the problem with the request. Example causes: ● The system - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 16
Response List of all instances in the specified collection that meet the request criteria. The response includes attribute values as a set of name:value pairs for each returned instance: [ { "id": "0a739865-a233-4ef0-ae20-6ed014ad06fe", "severity": "Minor" }, { "id": "51c0db9e-1d2b-4289-97b7- - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 17
Request body { "name": "User1", "password": "myPassword", "role_id": "1" } Response { "id": "4" } Response with no body A response with no body occurs in response to a DELETE request that results in a 204 No Content status code. In this circumstance, response headers are returned with the empty - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 18
Request POST https://1.2.3.4/api/rest/volume_group/ 257f2597-7c11-46c9-8941-3793e1cb2baa/refresh Request body { "from_object_id": "22f3bf53-ad83-4466-8e5e-5b0fade650da" } Response { "messages":[ { "code": "0xE0A070020007", "severity": "Error", "message_l10n": "Family mismatch for snapshot - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 19
Topics: • JSON base value encodings • JSON list encoding JSON base value encodings 4 JSON encodings The following table shows the JSON encodings for each base type: NOTE: A property that has no value appears as the type null. Type name short JSON definition Format after "": type: integer - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 20
DNS names. The help topics for individual resource types in the Reference content on page 43 indicate which IP address options are supported by that resource type. URI type: string "" "href": "https:/ N/A format: uri foo.com/bar.jsp" embedded enum id type: string format - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 21
Examples An empty list "addresses":[ ] A list with one value "addresses":["1.2.3.4"] A list with three values "addresses":["1.2.3.4","5.6.7.8","4.3.2.1"] JSON encodings 21 - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 22
for every command results in a potentially excessive number of login audit events in the PowerStore audit log. To avoid exposure to a cross-site request forgery (CSRF), requests other than GET require the DELL-EMC-TOKEN header. Before issuing any REST call which changes the state of the object - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 23
Attribute Description idle_timeout Number of seconds after last use until this session expires. is_password_change_r equired Indicates whether the password must be changed in order to use this session created for the built-in admin account. The values are: ● true - Password must be changed. ● - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 24
6 Querying a resource Topics: • Pagination • Retrieving data for multiple occurrences in a collection • Retrieving data for a specified resource instance • Specifying the attributes to return in a query response • Filtering response data • Sorting response data • Including data from a related - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 25
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: Operation GET URI pattern /api/rest/ where - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 26
"description_l10n":"Bus 0 enclosure 0 LCCA is initializing." }, { "id":"37583ff1-b0fe-41f2-9b3d-e5e5d2e5e525", "severity":"Info", "description_l10n":"The remote system volume discovery or refresh has failed." } ] Retrieving data for a specified resource instance To retrieve data for a - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 27
Specifying the attributes to return in a query response Use the select request parameter in a collection query to specify the set of attributes to return in a response. If you do not use this parameter, a query will return the id attribute only. When you use the select request parameter, you can - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 28
a resource type that is either referred to explicitly in the definition of the target resource type or embedded in the target resource type. Supported operators Comparator eq gt gte lt Description Applicable data types Equal. All Returns true when the expression on the left of eq equals the - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 29
true when the expression on the left of =eq matches any value in the commaseparated list on the right. ?role_id=in. (operator,administrator,servic e) True if the value of role_id is Operator, Administrator, or VM Administrator. Checks for exact equality to null, true, or false values. Contains - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 30
Comparator Description Applicable data Example types True if either the value of size is greater than 50 MB or the value of performance_policy is High or both. Sorting response data Use the order request parameter to specify sort criteria for one attribute in a list of resources returned by a - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 31
"state": "Cleared" } ] Including data from a related resource type in a query You can extend the scope of a collection query to retrieve data from a related resource type. The REST model describes two kinds of relations: ● A referenced resource type ● An embedded resource type Referenced resource - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 32
Returning only the id parameter for the appliance related to each node Headers Accept: application/json Authorization: Request https://1.2.3.4/api/rest/node?select=id,name,appliance Response body [ { "id":"N1", "name":"H0112-appliance-1-node-A", "appliance": { "id":"A1" } }, { " - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 33
this functionality include a note in their description stating: Filtering on the fields of this embedded resource is not supported. Example Querying the protection data information for a volume Headers Accept: application/json Authorization: Request https://1.2.3.4/api/rest - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 34
"id":"9d102db7-048d-4d24-85c2-28c7a5fc91ee", "protection_data": { "family_id": "9d102db7-048d-4d24-85c2-28c7a5fc91ee", "parent_id": null, "source_id": null, "creator_type": "User", "copy_signature": null, "source_timestamp": null, "creator_type_l10n": "User", "is_app_consistent": null, " - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 35
7 Creating other types of requests Topics: • Creating a resource instance • Modifying a resource instance • Deleting a resource instance • Performing an instance-level resource-specific action • Performing a class-level action • Working with asynchronous requests Creating a resource instance To - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 36
and removes the specified values from an existing list of values. The Reference content on page 43 documents which varieties of PATCH are supported for each resource type. For additional functionality, such as making the request an asynchronous request, you can append one or more request parameters - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 37
Headers Accept: application/json Content-Type: application/json Authorization: Request PATCH https://1.2.3.4/api/rest/volume_group/ad09bfa8-f8d8-41b5-96a9c15c9ebdf214 Request body { "name":"Storage resources for Marketing", "description":"Volumes for storing competitive analaysis - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 38
Deleting a resource instance To delete a resource instance, use the following request components: Headers Accept: application/json Authorization: If a resource type has request arguments for the DELETE operation, you must also use the following header: Content-Type: application/ - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 39
Headers For operations without request arguments: Accept: application/json Authorization: For operations with request arguments: Accept: application/json Content-Type: application/json Authorization: Operation POST URI pattern /api/rest///< - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 40
Some resource types have operations that let you perform class-level actions. For example, exchanging SSL certificates with another PowerStore appliance. To perform a class-level action, use the following request components: Headers For operations without request arguments: Accept: application - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 41
certificates The following request exchanges SSL certificates with another PowerStore appliance: Headers Accept: application/json Content-Type: : Request POST /api/rest/x509_certificate/exchange Request body { "service": "Management_HTTP", "address": "10.244.53.108", "port": 8080 - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 42
Creating an asynchronous request The following example uses the is_async=true request parameter on a request to modify an volume_group instance. Headers Accept: application/json Content-Type: application/json Authorization: Request PATCH https://1.2.3.4/api/rest/volume_group/ - Dell PowerStore 500T | EMC PowerStore REST API Developers Guide - Page 43
Management REST API, along with other API information such as datatypes and enumerations. In addition to the PowerStore REST API Reference Guide on https://www.dell.com/support, reference materials are also available on the appliance in several formats: ● Swagger UI-https://
Dell EMC PowerStore
REST API Developers Guide
Version 2.x
June 2021
Rev. A03