artRanade
1 Nickel

XtremIO Rest API for 4.0

As I understand, there is support for multiple clusters under single XMS starting 4.0.

The REST API calls to get all list of ssds or volumes does not take a cluster-name/id. Does it mean for a multiple cluster environment all the volumes/ssds belonging to all the clusters would be returned.

e.g What would the "GET /api/json/v2/types/volumes" API call return in case of multiple cluster environment. Also how do we identify which volume is from which cluster if its returns all volumes from different clusters.

Tags (1)
0 Kudos
13 Replies
Avi3
3 Silver

Re: XtremIO Rest API for 4.0

Thanks for pointing this out. We will update the RestAPI documentation to add another parameter specifying the cluster name.

In the meantime, you can add ?cluster-name=name-of-the-cluster to the API call and it will list the volumes or SSDs from that particular cluster. Let us know if you have any further questions.

artRanade
1 Nickel

Re: XtremIO Rest API for 4.0

Thanks Avi. Does this mean that such an API is supported but just that the document needs to be updated. Also does it apply to all APIs e.g initiators, initiator-groups, targets etc. i.e all cases where the details for a particular object accepts a cluster-name.

0 Kudos
Avi3
3 Silver

Re: XtremIO Rest API for 4.0

Correct. This is only a documentation update that I am working on.

And yes, the same logic should work for other entities like initiators, initiator groups, targets, etc. I just checked it on array in our lab and it works

0 Kudos
artRanade
1 Nickel

Re: XtremIO Rest API for 4.0

Thank you.

0 Kudos
artRanade
1 Nickel

Re: XtremIO Rest API for 4.0

Please can you provide me a sample RestAPI for getting initiators and initiator details. As per the document the input paramater names are :

cluster-name OR • cluster-index

initiator-id

However the example show the api request with parameter as name in the REST API:

Example request by name

GET /api/json/v2/types/initiators?name=Ini_01 HTTP/1.1

Host: vxms-xbrick238

Authorization: Basic YWRtaW46WHRyZW0xMA==

Please can you give me few correct samples.

0 Kudos
Highlighted
Avi3
3 Silver

Re: XtremIO Rest API for 4.0

·        List of all initiators across all clusters being managed by the XMS: https://XMS_IP_Address/api/json/v2/types/initiators

·        List of all initiators from a specific cluster: https://XMS_IP_Address/api/json/v2/types/initiators?cluster-name= name_of_the_cluster

·        Details of a specific initiator: https://XMS_IP_Address/api/json/v2/types/initiators/initiator_ID?cluster-name=name_of_the_cluster

XMS_IP_Address: IP address or FQDN of the XMS

name_of_the_cluster: cluster name (required in multi cluster environments)

initiator_ID: Initiator ID which is shown in the first API call

artRanade
1 Nickel

Re: XtremIO Rest API for 4.0

Hi Avi

I see that you have mentioned that cluster name is required for multi cluster environemnt. Does that mean if I execute the below request/s they would fail:

https://XMS_IP_Address/api/json/v2/types/initiators

https://XMS_IP_Address/api/json/v2/types/initiators/initiator_ID

Also if  I have a script which has the REST API for v 3.0

e.g https://XMS_IP_Address/api/json/types/initiators/initiator_ID

will the above fail in multi cluster environment for version 4.0

0 Kudos
mabela
1 Nickel

Re: XtremIO Rest API for 4.0

Hello,


For https://XMS_IP_Address/api/json/v2/types/initiators if you do not specify cluster-name as part of GET initiators, it would return a list of all the initiators for all the clusters managed by that single XMS you are querying. For any POST/PUT/DELETE API calls, you would have to specify the cluster as part of the API call if an XMS is managing multiple clusters

For https://XMS_IP_Address/api/json/v2/types/initiators/initiator_ID you would have to specify the cluster in a multi cluster environment as initiator IDs are only unique within the single cluster itself, meaning they are repeated among different clusters managed by the same XMS. So to answer your second question, it will fail and return back “cluster_id_is_required” because as I mentioned before, you would have to specify the cluster in a multi cluster environment as initiator IDs are only unique to the cluster itself, and not the XMS.

Hope this helps.

0 Kudos
artRanade
1 Nickel

Re: XtremIO Rest API for 4.0

Thanks Mabela.

I have another question: does this request work with Xtremio 3

https://XMS_IP_Address/api/json/types/initiators?cluster-name= name_of_the_cluster

0 Kudos