https://github.com/pierreprinetti/ovh
OVH command-line API client
https://github.com/pierreprinetti/ovh
client ovh shell
Last synced: about 1 year ago
JSON representation
OVH command-line API client
- Host: GitHub
- URL: https://github.com/pierreprinetti/ovh
- Owner: pierreprinetti
- License: mit
- Created: 2019-07-08T12:25:15.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-08T22:47:45.000Z (almost 7 years ago)
- Last Synced: 2025-03-17T16:57:10.856Z (over 1 year ago)
- Topics: client, ovh, shell
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# OVH shell client
## Requirements
### Tools
* sh
* date
* shasum
* cut
### Create a new OVH app
In your browser: https://eu.api.ovh.com/createApp/
### Give the app access to your account
```
export OVH_AK=
```
Then in the terminal:
```
curl \
-X POST \
-H "X-Ovh-Application: ${OVH_AK}" \
-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://www.example.com/"
}'
```
Click on the link and authorise. Then pick the Consumer Key from the JSON response to the curl call:
```
export OVH_CK=
```
## Howto
As long as `OVH_AK` and `OVH_CK` are available in the environment, it is possible to call any endpoint in the [OVH API](https://eu.api.ovh.com/console/ "OVH API reference").
```
./ovh 'GET' '/domain'
```
## Known issues
* This script does not currently handle form parameters.
* Sending a body payload is untested.