REST API with Dell EMC
REST stands for Representational State Transfer. REST provides access to resources (DellEMC XtremIO resources in our case) on a tree-like structure. REST uses HTTP/S for communication and replies on HTTP’s CRUD operations, which are GET, POST, PUT, DELETE. REST is stateless, which means it does not store application state information. Since REST is stateless client responses are self-documenting. For this introduction post we will talk about XtremIO, but note that each storage system has different URNs.
REST enables each XtremIO resource (like volumes, initiator groups, etc) having its own URI (Uniform Resource Identifier). Typically REST response is received in JSON or XML format. In the case of XtremIO responses are in JSON format.
XtremIO REST API can be accessed using the below option
- REST Clients – Like Postman
- CLI – Using tools like CURL
- Programming – Using Python, Ruby, etc.
Since XtremIO storage array is having API-first design, it allows all the operations using REST which can be done using CLI/GUI.
Connecting to XtremIO using REST API
XtremIO is a scale-out storage architecture and has out-of-band management server – aka XMS. You can refer to below high level diagram to check your connectivity.
Below are the supported types of REST API with XtremIO.
Below is the example and details of using XtremIO REST API using CURL
# curl -k --request GET https://<user>:<pass>@22.214.171.124/api/json/v2/types
- -k – Allow insecure SSL connection. This is needed in case you’ve self-signed certificate.
- –request GET – This is the REST API request type.
- https://:@126.96.36.199/api/json/v2/types – URI
- https:// – Protocol used for REST API
- <user>:<pass> – XtremIO XMS credentials
- @188.8.131.52 – XtremIO XMS IP address
- /api/json/v2/types – API Path
In next post we will discuss on using REST API with Dell EMC storage systems