Unsolved
This post is more than 5 years old
14 Posts
0
1605
Correct CURL/REST payload data to invalidate cache for a consistency group
Hello,
We are trying to perform invalidate cache operation on a VPLEX CG. I am using CURL to perform the invalidate operation but running into syntax related issues.
So far I have tried the following without any success.
NOTE:
- At the moment this is being tested from Windows host but it will be run from Linux host using bash/curl. Please do not suggest python/pycurl as it is not an option at this time
- Usernames/Passwords will not be in clear text in actual scripts, using clear text now for testing
- Appropriate escape characters will be used when running it from Linux host
curl -k -H "Username:xxxx" -H "xxxx" "{\"args\" : \"TestCG -f \"}" -X POST https://vplex-mgmt-ip/vplex/clusters/cluster-1/consistency-groups/cache-invalidate
The error message I receive is Invalid URI in GET request. Not one among context,command or attribute
I have tried to use PUT instead of POST, no luck there either.
Any help you may be able to provide will be greatly appreciated.
Thank you.
garyo
89 Posts
0
May 16th, 2017 15:00
This is what will work.
# curl -k -X POST -H "Username:service" -H "Password:xxx" -d '{"args" : "-g TestCG -f"}' https://xx.xx.xx.xx/vplex/consistency-group+cache-invalidate
Changes needed were:
Aside: This command does list all the possible commands:
# curl -k -X POST -H "Username:service" -H "Password:xxx" https://xx.xx.xx.xx/vplex/help