Start a Conversation

Unsolved

This post is more than 5 years old

7029

October 13th, 2015 17:00

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.

727 Posts

October 14th, 2015 13:00

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.

46 Posts

October 15th, 2015 09:00

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.

727 Posts

October 16th, 2015 11:00

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

46 Posts

October 19th, 2015 09:00

Thank you.

46 Posts

October 21st, 2015 14:00

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.

727 Posts

October 22nd, 2015 19:00

·        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

46 Posts

November 24th, 2015 23:00

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

33 Posts

November 30th, 2015 07:00

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.

46 Posts

December 2nd, 2015 13:00

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

727 Posts

December 4th, 2015 09:00

You don't need to specify the name of the cluster if you are running XtremIO 3.x, since you can have only XtremIO cluster being managed by an XMS in that release.

46 Posts

December 8th, 2015 12:00

Ty so much, but would it fail if we do? We have common script which takes a cluster name in URL. I want to make sure it works for both version 3 and 4.

33 Posts

December 9th, 2015 13:00

In doing a quick test, you can pass cluster-name and the API call will not fail.

46 Posts

December 9th, 2015 15:00

Perfect. Ty so much.

So we can use same URL https://XMS_IP_Address/api/json/types/initiators?cluster-name= name_of_the_cluster

irrespective of whether it is XtremIO 3 or 4 and it should work. And I believe same holds true for all the APIs. Passing a cluster-name will not make them fail in XtremIO3.

No Events found!

Top