I get an error for this CURL command, whereas same works on Chrome DHC App. What am I missing here
[root@host125]# curl -sk -X 'GET' -H 'X-Auth-Token: [REDACTED]' -H 'Content-type: application/json' https://10.1.1.132/rest/rm-central/v1/recovery-sets?query="volumeType EQ 'vvol'"
{"badRequest": {"message": "QueryFilter Error :: Given Query Filter syntax 'query=' is not valid ", "code": 400}}
[root@host125]#
[root@host125]#
[root@host125]#
Your URL seems wrong :
https://10.1.1.132/rest/rm-central/v1/recovery-sets?query="volumeType EQ 'vvol'"
especially the query=
part.
The quotes should be like this :
'https://10.1.1.132/rest/rm-central/v1/recovery-sets?query=foobar'
or with "double quotes"
Below CURL syntax solved my problem:
# curl -k -G -X 'GET' -H 'X-Auth-Token: 5127af39b7584d8c8897a0cad55accdc' -H 'Content-type: application/json' https://10.1.1.132/rest/rm-central/v1/recovery-sets -d "query=\"volumeType%20EQ%20'vvol'\""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With