Dell PowerStore 9200T EMC PowerStore REST API Developers Guide
Dell PowerStore 9200T Manual
View all Dell PowerStore 9200T manuals
Add to My Manuals
Save this manual to your list of manuals |
Dell PowerStore 9200T manual content summary:
- Dell PowerStore 9200T | EMC PowerStore REST API Developers Guide - Page 1
Dell EMC PowerStore REST API Developers Guide Version 3.x July 2022 Rev. A05 - Dell PowerStore 9200T | EMC PowerStore REST API Developers Guide - Page 2
of your product. CAUTION: A CAUTION indicates either potential damage to hardware or loss of data and tells you how to avoid the problem. WARNING: A WARNING indicates a potential for property damage, personal injury, or death. © 2020 - 2022 Dell Inc. or its subsidiaries. All rights reserved. Dell - Dell PowerStore 9200T | 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 requests...12 - Dell PowerStore 9200T | 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 9200T | EMC PowerStore REST API Developers Guide - Page 5
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 requests, go to https://www.dell - Dell PowerStore 9200T | EMC PowerStore REST API Developers Guide - Page 6
1 Overview Topics: • The PowerStore Management REST API • Resource-oriented architecture and REST • JSON data exchange format The PowerStore Management REST API The PowerStore Management REST API is a set of resources (objects), operations, and attributes that provide interactive, scripted, and - Dell PowerStore 9200T | EMC PowerStore REST API Developers Guide - Page 7
stateless, which means that the server does not store application state information. Instead, client requests contain all the necessary information to service the request. ● Resources in a REST API are self-documenting. A response from the server contains information about the requested resource in - Dell PowerStore 9200T | EMC PowerStore REST API Developers Guide - Page 8
response header obtained from the GET call as a Header value in the subsequent calls for this session. For GET calls only. Part of paging support. Requests rows first through last (optional) of the result set. Related references URI patterns on page 9 Request parameters on page 10 REST requests on - Dell PowerStore 9200T | 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 9200T | EMC PowerStore REST API Developers Guide - Page 10
12 Request parameters The PowerStore Management REST API supports the following request parameters: Request parameter select < Most active management requests (ones that attempt to change the configuration) support this option. By default, requests are run synchronously. For more information - Dell PowerStore 9200T | 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 9200T | 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 9200T | EMC PowerStore REST API Developers Guide - Page 13
internal server error, and a 503 status code indicates that the REST service is temporarily unavailable. ● The JSON response body varies according to the . Because the API uses cookie-based authentication, the HTTP client must support cookies in order to use the API. For more information, see - Dell PowerStore 9200T | EMC PowerStore REST API Developers Guide - Page 14
successful. If requests are unsuccessful (that is, if they return 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 3. HTTP status codes in the REST API Status code - Dell PowerStore 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | EMC PowerStore REST API Developers Guide - Page 22
5 Managing a REST API session Topics: • Connecting and authenticating • Obtaining login session information • Logging out of the REST API session Connecting and authenticating All requests to the REST API must be authenticated. The REST API uses the standard HTTP Basic access authentication - Dell PowerStore 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | 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 9200T | EMC PowerStore REST API Developers Guide - Page 40
Request body (Optional) { "description": "DB copy before application upgrade" } Response body { "id": "57cdb822-490e-4755-b8b3-99bb779b1472" } Performing a class-level action Some resource types have operations that let you perform class-level actions. For example, exchanging SSL certificates - Dell PowerStore 9200T | EMC PowerStore REST API Developers Guide - Page 41
: application/json Content-Type: application/json Authorization: Request POST /api/rest/x509_certificate/exchange Request body { "service": "Management_HTTP", "address": "10.244.53.108", "port": 8080, "username": "user1", "password": "myPassword" } Response Empty. body Working - Dell PowerStore 9200T | 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 9200T | EMC PowerStore REST API Developers Guide - Page 43
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:///swaggerui
Dell EMC PowerStore
REST API Developers Guide
Version 3.x
July 2022
Rev. A05