A lightweight wrapper around OVH's APIs.
Handles credential management and requests signing.
Considere using stable Rust. Tested on Linux, Windows, MacOSX.
Compile and fetch dependencies
cargo build
$cp Config.toml.dist Config.toml
Edit your Config.toml file.
[default]
endpoint = "ovh-eu"
[ovh-eu]
application_key = "<APPLICATION KEY>"
application_secret = "<APPLICATION SECRET>"
Create your credential via : https://eu.api.ovh.com/createApp/ or via a simple curl but take care of accessRules given,
$curl -XPOST -H"X-Ovh-Application: <APPLICATION KEY>" \
-H "Content-type: application/json" \
https://eu.api.ovh.com/1.0/auth/credential -d '{
"accessRules": [
{"method": "GET","path": "/*"},
{"method": "POST","path": "/*"},
{"method": "PUT","path": "/*"},
{"method": "DELETE","path": "/*"}
],
"redirection":"https://api.ovh.com/"
}'
With great power comes with great responsibility ;)
Edit your Config.toml file.
consumer_key = "<CONSUMER KEY>"
cargo test
cargo doc --no-deps
and explore ./target/doc/ovh/index.html with your favorite browser
- Documentation: https://eu.api.ovh.com/
- Community support: api-subscribe@ml.ovh.net
- Console: https://eu.api.ovh.com/console
- Create application credentials: https://eu.api.ovh.com/createApp/
- Create script credentials (all keys at once): https://eu.api.ovh.com/createToken/
MIT
Thanks to Rust community