UsoppJazz

updated

8 years ago

U

UsoppJazz

7 Posts

0

6806

May 4th, 2018 00:00

Vplex Restapi

I am trying to achieve "array re-discover" with RestAPI however i am getting the following error message.
Any idea, what have i missed out? Thanks

curl -k -H "Username:XXXX" -H "Password:XXXX" -d {"args": " array re-discover"} -X POST https://XX.XXX.XX.XX/vplex/clusters/cluster-1/storage-elements/storage-arrays/EMC-XXXXXXXXXX/

{

    "response": {

        "context": null,

        "message": null,

        "exception": "POST request not supported for a context.",

        "custom-data": null

    }

  • Products

    11 Posts

    6399

    0

    Posted May 7th, 2018 09:00

    Hi Jeffrey -

    Couple things, as the array re-discover is a global command you need to write the curl command a bit differently and as the --force option is required at the cli level you will need it in the curl command as well. Try this and see if it works for you,

    curl -k -H "Username:xxxxxx" -H Password:xxxxxxxx" -d '{"args": "-a /clusters/cluster-1/storage-elements/storage-arrays/ "}' -X POST ' https://xx.xx.xx.xx/vplex/array+re-discover -f'

  • UsoppJazz

    7 Posts

    6399

    0

    Posted May 7th, 2018 18:00

    Hi Scott,

    Thank you, it's working perfectly.

  • ms123456

    2 Posts

    6289

    0

    Posted January 28th, 2019 08:00

    Hello Baron,

    Thank you for your earlier post. I am trying to get the list of storage view but I am not able to. Could you please see whats wrong in my command.

    curl -k -H "Username:xxxxx" -H Password:xxxxxx" -d '{"args": "-a /clusters/cluster-2/exports/storage-views"}' -X GET 'https://XX.XX.XX.XXX/vplex/clusters/cluster-1/exports/storage-views/'

  • DrDave411

    1 Message

    5819

    0

    Posted April 10th, 2019 11:00

    Try the following:

    curl -k -s \
    -H "Username:******" \
    -H "Password:******" \
    -H "Accept: application/json;format=1;prettyprint=0" \
    -o OUTPUT-FILE \
    "https://VPLEX-MGMT-IP/vplex/clusters/cluster-*/exports/storage-views"

    where OUTPUT-FILE is the name of the output file and VPLEX-MGMT-IP is the TCP/IP address or DNS name of the VPLEX management server.