From: Nicolas Boisselier Date: Sat, 4 Feb 2017 04:01:25 +0000 (+0000) Subject: bin/ovh-api X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=dfe031b96e3feda2574569f0d887e50a2684d1d1;p=nb.git bin/ovh-api --- diff --git a/bin/ovh-api b/bin/ovh-api index 2a55652d..620ac516 100755 --- a/bin/ovh-api +++ b/bin/ovh-api @@ -41,7 +41,8 @@ if ($_ = $Opt{activate}) { # NB 14.12.16 # $consumerKey contains the newly created Consumer Key # NB 14.12.16 # $validationUrl contains a link to OVH website in order to login an OVH account and link it to the credential # NB 14.12.16 } - exec qq|curl -s -XPOST -H"X-Ovh-Application: $_" -H "Content-type: application/json" https://eu.api.ovh.com/1.0/auth/credential -d '{"accessRules": [ { "method": "ALL", "path": "/*" } ] }'|.'|jq .'; + #exec qq|curl -s -XPOST -H"X-Ovh-Application: $_" -H "Content-type: application/json" https://eu.api.ovh.com/1.0/auth/credential -d '{"accessRules": [ { "method": "ALL", "path": "/*" } ] }'|; + exec qq|curl -s -XPOST -H"X-Ovh-Application: $_" -H "Content-type: application/json" --data '{"accessRules":[{"method":"GET","path":"/*"},{"method":"POST","path":"/*"},{"method":"PUT","path":"/*"},{"method":"DELETE","path":"/*"}]}' https://api.ovh.com/1.0/auth/credential #exec qq|curl -s -XPOST -H"X-Ovh-Application: $_" -H "Content-type: application/json" https://eu.api.ovh.com/1.0/auth/credential -d '{"accessRules": [ { "method": "GET", "path": "/*" },{ "method": "PUT", "path": "/*" },{ "method": "POST", "path": "/*" },{ "method": "DELETE", "path": "/*" } ] }'|.'|jq .'; #exec qq|curl -s -XPOST -H"X-Ovh-Application: $_" -H "Content-type: application/json" https://eu.api.ovh.com/1.0/auth/credential -d '{"accessRules": [ { "method": "GET", "path": "/*" } ] }'|.'|jq .'; #print qq|curl -XPOST -H"X-Ovh-Application: $_" -H "Content-type: application/json" https://eu.api.ovh.com/1.0/auth/credential -d '{"accessRules": [ { "method": "GET", "path": "/*" } ], "redirection":"https://www.mywebsite.com/" }'\n|;