1
- [ ![ Node.js Wrapper for OVH APIs] ( https://ovh.github.io/node-ovh/img/logo.png )] ( https://ovh.github.io/node-ovh )
1
+ [ ![ Node.js Wrapper for OVHcloud APIs] ( https://ovh.github.io/node-ovh/img/logo.png )] ( https://ovh.github.io/node-ovh )
2
2
3
- The easiest way to use the [ OVH .com] ( https://ovh .com ) APIs in your [ node.js] ( https://nodejs.org/ ) applications.
3
+ The easiest way to use the [ OVHcloud .com] ( https://www.ovhcloud .com ) APIs in your [ node.js] ( https://nodejs.org/ ) applications.
4
4
5
5
[ ![ NPM Version] ( https://img.shields.io/npm/v/ovh.svg?style=flat )] ( https://www.npmjs.org/package/ovh )
6
6
[ ![ Build Status] ( https://img.shields.io/travis/ovh/node-ovh.svg?style=flat )] ( https://travis-ci.org/ovh/node-ovh )
@@ -47,16 +47,38 @@ $ npm install git://github.com/ovh/node-ovh.git
47
47
48
48
## Example Usage
49
49
50
- ### Login as a user
50
+ ### OAuth2
51
+
52
+ #### 1. Generate credentials
53
+
54
+ Generate a valid pair of clientID/clientSecret following this [ documentation] ( https://help.ovhcloud.com/csm/en-manage-service-account?id=kb_article_view&sysparm_article=KB0059343 )
55
+
56
+ #### 2. Create an OVHcloud API client
57
+
58
+ ``` js
59
+ var ovh = require (' ovh' )({
60
+ clientID: ' YOUR_CLIENT_ID'
61
+ clientSecret: ' YOUR_CLIENT_SECRET'
62
+ endpoint: ' ovh-eu' ,
63
+ });
64
+ ```
65
+
66
+ Depending on the API you want to use, you may set the endpoint to:
67
+ * ` ovh-eu ` for OVHcloud Europe API
68
+ * ` ovh-us ` for OVHcloud US API
69
+ * ` ovh-ca ` for OVHcloud Canada API
70
+
71
+
72
+ ### Application Key/ApplicationSecret
51
73
52
74
#### 1. Create an application
53
75
54
76
Depending the API you plan to use, you need to create an application on the below
55
77
websites:
56
78
57
- * [ OVH Europe] ( https://eu.api.ovh.com/createApp/ )
58
- * [ OVH US] ( https://api.us.ovhcloud.com/createApp/ )
59
- * [ OVH North-America] ( https://ca.api.ovh.com/createApp/ )
79
+ * [ OVHcloud Europe] ( https://eu.api.ovh.com/createApp/ )
80
+ * [ OVHcloud US] ( https://api.us.ovhcloud.com/createApp/ )
81
+ * [ OVHcloud North-America] ( https://ca.api.ovh.com/createApp/ )
60
82
* [ SoYouStart Europe] ( https://eu.api.soyoustart.com/createApp/ )
61
83
* [ SoYouStart North-America] ( https://ca.api.soyoustart.com/createApp/ )
62
84
* [ Kimsufi Europe] ( https://eu.api.kimsufi.com/createApp/ )
@@ -67,17 +89,17 @@ secret (AS)**.
67
89
68
90
#### 2. Authorize your application to access to a customer account
69
91
70
- To allow your application to access to a customer account using an OVH API,
92
+ To allow your application to access to a customer account using an OVHcloud API,
71
93
you need a ** consumer key (CK)** .
72
94
73
95
Here is a sample code you can use to allow your application to access to a
74
96
complete account.
75
97
76
98
Depending the API you want to use, you need to specify the below API endpoint:
77
99
78
- * OVH Europe: ``` ovh-eu ``` (default)
79
- * OVH US: ``` ovh-us ```
80
- * OVH North-America: ``` ovh-ca ```
100
+ * OVHcloud Europe: ``` ovh-eu ``` (default)
101
+ * OVHcloud US: ``` ovh-us ```
102
+ * OVHcloud North-America: ``` ovh-ca ```
81
103
* SoYouStart Europe: ``` soyoustart-eu ```
82
104
* SoYouStart North-America: ``` soyoustart-ca ```
83
105
* Kimsufi Europe: ``` kimsufi-eu ```
@@ -132,17 +154,17 @@ You are now be able to play with the API. Look at the
132
154
133
155
You can browse the API schemas using the web consoles of the APIs:
134
156
135
- * [OVH Europe](https://eu.api.ovh.com/console/)
136
- * [OVH US](https://api.us.ovhcloud.com/console/)
137
- * [OVH North-America](https://ca.api.ovh.com/console/)
157
+ * [OVHcloud Europe](https://eu.api.ovh.com/console/)
158
+ * [OVHcloud US](https://api.us.ovhcloud.com/console/)
159
+ * [OVHcloud North-America](https://ca.api.ovh.com/console/)
138
160
* [SoYouStart Europe](https://eu.api.soyoustart.com/console/)
139
161
* [SoYouStart North-America](https://ca.api.soyoustart.com/console/)
140
162
* [Kimsufi Europe](https://eu.api.kimsufi.com/console/)
141
163
* [Kimsufi North-America](https://ca.api.kimsufi.com/console/)
142
164
143
165
# # Migration from 1.x.x to 2.x.x without Proxy support
144
166
145
- For example if you use the OVH Europe API, you' ll have to check on https://eu.api.ovh.com/console/ the endpoints available for your feature.
167
+ For example if you use the OVHcloud Europe API, you' ll have to check on https://eu.api.ovh.com/console/ the endpoints available for your feature.
146
168
147
169
In order to have the informations about the bill with id "0123".
148
170
+ Before in 1.x.x with Proxy:
@@ -193,7 +215,7 @@ npm install -d
193
215
npm test
194
216
```
195
217
196
- Integration tests use the OVH /domain/zone API, the tokens can be created
218
+ Integration tests use the OVHcloud /domain/zone API, the tokens can be created
197
219
[here](https://api.ovh.com/createToken/).
198
220
199
221
```
@@ -212,22 +234,22 @@ available in the *gh-pages* branch.
212
234
213
235
## Supported APIs
214
236
215
- ### OVH Europe
237
+ ### OVHcloud Europe
216
238
217
239
- **Documentation**: https://eu.api.ovh.com/
218
240
- **Community support**: [email protected]
219
241
- **Console**: https://eu.api.ovh.com/console
220
242
- **Create application credentials**: https://eu.api.ovh.com/createApp/
221
243
- **Create script credentials** (all keys at once): https://eu.api.ovh.com/createToken/
222
244
223
- ### OVH US
245
+ ### OVHcloud US
224
246
225
247
- **Documentation**: https://api.us.ovhcloud.com/
226
248
- **Console**: https://api.us.ovhcloud.com/console/
227
249
- **Create application credentials**: https://api.us.ovhcloud.com/createApp/
228
250
- **Create script credentials** (all keys at once): https://api.us.ovhcloud.com/createToken/
229
251
230
- ### OVH North America
252
+ ### OVHcloud North America
231
253
232
254
- **Documentation**: https://ca.api.ovh.com/
233
255
- **Community support**: [email protected]
0 commit comments