UNSOLVED

artRanade

updated

11 years ago

A

artRanade

46 Posts

0

7231

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.

  • Kumar_A

    2 Intern

    727 Posts

    3732

    1

    Posted 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.

  • artRanade

    46 Posts

    3732

    0

    Posted 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.

  • Kumar_A

    2 Intern

    727 Posts

    3732

    0

    Posted 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

  • artRanade

    46 Posts

    3746

    0

    Posted October 19th, 2015 09:00

    Thank you.

  • artRanade

    46 Posts

    3746

    0

    Posted 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.

  • Kumar_A

    2 Intern

    727 Posts

    3746

    1

    Posted 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

  • artRanade

    46 Posts

    3746

    0

    Posted 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

  • mabela

    33 Posts

    3746

    0

    Posted 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.

  • artRanade

    46 Posts

    3746

    0

    Posted 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

  • Kumar_A

    2 Intern

    727 Posts

    497

    0

    Posted 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.