@oasisomniverse/web4-api 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +464 -0
- package/docs/README.md +52 -0
- package/docs/auth.md +89 -0
- package/docs/getting-started.md +129 -0
- package/docs/modules/Avatar.md +4160 -0
- package/docs/modules/Bridge.md +394 -0
- package/docs/modules/Chat.md +168 -0
- package/docs/modules/Clan.md +552 -0
- package/docs/modules/Competition.md +594 -0
- package/docs/modules/Data.md +796 -0
- package/docs/modules/EOSIO.md +508 -0
- package/docs/modules/Eggs.md +396 -0
- package/docs/modules/Files.md +312 -0
- package/docs/modules/Gifts.md +306 -0
- package/docs/modules/Health.md +90 -0
- package/docs/modules/Holochain.md +374 -0
- package/docs/modules/HyperDrive.md +3857 -0
- package/docs/modules/Karma.md +644 -0
- package/docs/modules/Keys.md +3303 -0
- package/docs/modules/Map.md +1026 -0
- package/docs/modules/Messaging.md +320 -0
- package/docs/modules/Nft.md +2216 -0
- package/docs/modules/OLand.md +425 -0
- package/docs/modules/ONET.md +442 -0
- package/docs/modules/ONODE.md +504 -0
- package/docs/modules/Provider.md +1396 -0
- package/docs/modules/Search.md +69 -0
- package/docs/modules/Seeds.md +167 -0
- package/docs/modules/Settings.md +533 -0
- package/docs/modules/Share.md +64 -0
- package/docs/modules/Social.md +190 -0
- package/docs/modules/Solana.md +150 -0
- package/docs/modules/Stats.md +359 -0
- package/docs/modules/Subscription.md +437 -0
- package/docs/modules/Video.md +150 -0
- package/docs/modules/Wallet.md +1993 -0
- package/index.d.ts +106 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +120 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +50 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +46 -0
- package/src/modules/Auth.d.ts +28 -0
- package/src/modules/Auth.js +98 -0
- package/src/modules/Avatar.d.ts +192 -0
- package/src/modules/Avatar.js +143 -0
- package/src/modules/Bridge.d.ts +24 -0
- package/src/modules/Bridge.js +35 -0
- package/src/modules/Cargo.js +35 -0
- package/src/modules/Chat.d.ts +15 -0
- package/src/modules/Chat.js +27 -0
- package/src/modules/Clan.d.ts +36 -0
- package/src/modules/Clan.js +41 -0
- package/src/modules/Competition.d.ts +33 -0
- package/src/modules/Competition.js +39 -0
- package/src/modules/Core.js +27 -0
- package/src/modules/Data.d.ts +36 -0
- package/src/modules/Data.js +41 -0
- package/src/modules/EOSIO.d.ts +33 -0
- package/src/modules/EOSIO.js +39 -0
- package/src/modules/Eggs.d.ts +24 -0
- package/src/modules/Eggs.js +33 -0
- package/src/modules/Files.d.ts +24 -0
- package/src/modules/Files.js +33 -0
- package/src/modules/Gifts.d.ts +24 -0
- package/src/modules/Gifts.js +33 -0
- package/src/modules/Health.d.ts +12 -0
- package/src/modules/Health.js +25 -0
- package/src/modules/Holochain.d.ts +27 -0
- package/src/modules/Holochain.js +35 -0
- package/src/modules/HyperDrive.d.ts +237 -0
- package/src/modules/HyperDrive.js +175 -0
- package/src/modules/Karma.d.ts +42 -0
- package/src/modules/Karma.js +45 -0
- package/src/modules/Keys.d.ts +183 -0
- package/src/modules/Keys.js +139 -0
- package/src/modules/Map.d.ts +75 -0
- package/src/modules/Map.js +65 -0
- package/src/modules/Messaging.d.ts +24 -0
- package/src/modules/Messaging.js +33 -0
- package/src/modules/Nft.d.ts +102 -0
- package/src/modules/Nft.js +85 -0
- package/src/modules/OAPP.js +31 -0
- package/src/modules/OLand.d.ts +27 -0
- package/src/modules/OLand.js +35 -0
- package/src/modules/ONET.d.ts +39 -0
- package/src/modules/ONET.js +43 -0
- package/src/modules/ONODE.d.ts +45 -0
- package/src/modules/ONODE.js +47 -0
- package/src/modules/Provider.d.ts +99 -0
- package/src/modules/Provider.js +83 -0
- package/src/modules/Search.d.ts +9 -0
- package/src/modules/Search.js +23 -0
- package/src/modules/Seeds.d.ts +15 -0
- package/src/modules/Seeds.js +27 -0
- package/src/modules/Settings.d.ts +48 -0
- package/src/modules/Settings.js +47 -0
- package/src/modules/Share.d.ts +9 -0
- package/src/modules/Share.js +23 -0
- package/src/modules/Social.d.ts +18 -0
- package/src/modules/Social.js +29 -0
- package/src/modules/Solana.d.ts +12 -0
- package/src/modules/Solana.js +25 -0
- package/src/modules/Stats.d.ts +30 -0
- package/src/modules/Stats.js +37 -0
- package/src/modules/Subscription.d.ts +36 -0
- package/src/modules/Subscription.js +41 -0
- package/src/modules/Telos.js +39 -0
- package/src/modules/Video.d.ts +15 -0
- package/src/modules/Video.js +27 -0
- package/src/modules/Wallet.d.ts +102 -0
- package/src/modules/Wallet.js +85 -0
- package/src/modules/index.js +79 -0
|
@@ -0,0 +1,1396 @@
|
|
|
1
|
+
# Provider — `oasis.provider`
|
|
2
|
+
|
|
3
|
+
Source controller: [`ProviderController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/ProviderController.cs)
|
|
4
|
+
Route prefix: `api/provider`
|
|
5
|
+
31 operation(s).
|
|
6
|
+
|
|
7
|
+
Every method takes a single args object: any key matching a `{token}` in the route is substituted into the URL; everything else becomes the query string (GET/DELETE) or JSON body (POST/PUT). Every call resolves to the standard OASIS envelope:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
{
|
|
11
|
+
isError: boolean;
|
|
12
|
+
isWarning: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
errorCode?: string;
|
|
15
|
+
result: T; // see each endpoint's Response section below
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Operations
|
|
20
|
+
|
|
21
|
+
### `activateProvider`
|
|
22
|
+
|
|
23
|
+
Activate the given provider.
|
|
24
|
+
|
|
25
|
+
**POST** `api/provider/activate-provider/{providerType}`
|
|
26
|
+
|
|
27
|
+
Route parameters:
|
|
28
|
+
|
|
29
|
+
| Field | Type |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `providerType` | `ProviderType` |
|
|
32
|
+
|
|
33
|
+
**Request**
|
|
34
|
+
|
|
35
|
+
No request body.
|
|
36
|
+
|
|
37
|
+
**Response**
|
|
38
|
+
|
|
39
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
40
|
+
|
|
41
|
+
`result` type: `bool`
|
|
42
|
+
|
|
43
|
+
**Example**
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
const { isError, message, result } = await oasis.provider.activateProvider({
|
|
47
|
+
providerType: '<providerType>'
|
|
48
|
+
});
|
|
49
|
+
if (isError) throw new Error(message);
|
|
50
|
+
console.log(result);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Example response:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"isError": false,
|
|
58
|
+
"message": "",
|
|
59
|
+
"result": true
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### `deActivateProvider`
|
|
66
|
+
|
|
67
|
+
Deactivate the given provider.
|
|
68
|
+
|
|
69
|
+
**POST** `api/provider/deactivate-provider/{providerType}`
|
|
70
|
+
|
|
71
|
+
Route parameters:
|
|
72
|
+
|
|
73
|
+
| Field | Type |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `providerType` | `ProviderType` |
|
|
76
|
+
|
|
77
|
+
**Request**
|
|
78
|
+
|
|
79
|
+
No request body.
|
|
80
|
+
|
|
81
|
+
**Response**
|
|
82
|
+
|
|
83
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
84
|
+
|
|
85
|
+
`result` type: `bool`
|
|
86
|
+
|
|
87
|
+
**Example**
|
|
88
|
+
|
|
89
|
+
```js
|
|
90
|
+
const { isError, message, result } = await oasis.provider.deActivateProvider({
|
|
91
|
+
providerType: '<providerType>'
|
|
92
|
+
});
|
|
93
|
+
if (isError) throw new Error(message);
|
|
94
|
+
console.log(result);
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Example response:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"isError": false,
|
|
102
|
+
"message": "",
|
|
103
|
+
"result": true
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### `getAllRegisteredNetworkProviders`
|
|
110
|
+
|
|
111
|
+
Get all registered network providers.
|
|
112
|
+
|
|
113
|
+
**GET** `api/provider/get-all-registered-network-providers`
|
|
114
|
+
|
|
115
|
+
**Request**
|
|
116
|
+
|
|
117
|
+
No request body.
|
|
118
|
+
|
|
119
|
+
**Response**
|
|
120
|
+
|
|
121
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
122
|
+
|
|
123
|
+
`result` type: `IOASISProvider` (array)
|
|
124
|
+
|
|
125
|
+
| Field | Type |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `ProviderName` | `string` |
|
|
128
|
+
| `ProviderDescription` | `string` |
|
|
129
|
+
| `ProviderCategory` | `EnumValue<ProviderCategory>` |
|
|
130
|
+
| `ProviderCategories` | `List<EnumValue<ProviderCategory>>` |
|
|
131
|
+
| `ProviderType` | `EnumValue<ProviderType>` |
|
|
132
|
+
| `Activated` | `bool` |
|
|
133
|
+
| `IsProviderActivated` | `bool` |
|
|
134
|
+
|
|
135
|
+
**Example**
|
|
136
|
+
|
|
137
|
+
```js
|
|
138
|
+
const { isError, message, result } = await oasis.provider.getAllRegisteredNetworkProviders({});
|
|
139
|
+
if (isError) throw new Error(message);
|
|
140
|
+
console.log(result);
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Example response:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"isError": false,
|
|
148
|
+
"message": "",
|
|
149
|
+
"result": [{ "ProviderName": "example string", "ProviderDescription": "example string", "ProviderCategory": { "Score": 1.0 }, "ProviderCategories": [], "ProviderType": { "Score": 1.0 }, "Activated": true, "IsProviderActivated": true }]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### `getAllRegisteredProviderTypes`
|
|
156
|
+
|
|
157
|
+
Get all registered provider types.
|
|
158
|
+
|
|
159
|
+
**GET** `api/provider/get-all-registered-provider-types`
|
|
160
|
+
|
|
161
|
+
**Request**
|
|
162
|
+
|
|
163
|
+
No request body.
|
|
164
|
+
|
|
165
|
+
**Response**
|
|
166
|
+
|
|
167
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
168
|
+
|
|
169
|
+
`result` type: `EnumValue<ProviderType>` (array)
|
|
170
|
+
|
|
171
|
+
| Field | Type |
|
|
172
|
+
| --- | --- |
|
|
173
|
+
| `Score` | `double` |
|
|
174
|
+
|
|
175
|
+
**Example**
|
|
176
|
+
|
|
177
|
+
```js
|
|
178
|
+
const { isError, message, result } = await oasis.provider.getAllRegisteredProviderTypes({});
|
|
179
|
+
if (isError) throw new Error(message);
|
|
180
|
+
console.log(result);
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Example response:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"isError": false,
|
|
188
|
+
"message": "",
|
|
189
|
+
"result": [{ "Score": 1.0 }]
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### `getAllRegisteredProviders`
|
|
196
|
+
|
|
197
|
+
Get all registered providers.
|
|
198
|
+
|
|
199
|
+
**GET** `api/provider/get-all-registered-providers`
|
|
200
|
+
|
|
201
|
+
**Request**
|
|
202
|
+
|
|
203
|
+
No request body.
|
|
204
|
+
|
|
205
|
+
**Response**
|
|
206
|
+
|
|
207
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
208
|
+
|
|
209
|
+
`result` type: `IOASISProvider` (array)
|
|
210
|
+
|
|
211
|
+
| Field | Type |
|
|
212
|
+
| --- | --- |
|
|
213
|
+
| `ProviderName` | `string` |
|
|
214
|
+
| `ProviderDescription` | `string` |
|
|
215
|
+
| `ProviderCategory` | `EnumValue<ProviderCategory>` |
|
|
216
|
+
| `ProviderCategories` | `List<EnumValue<ProviderCategory>>` |
|
|
217
|
+
| `ProviderType` | `EnumValue<ProviderType>` |
|
|
218
|
+
| `Activated` | `bool` |
|
|
219
|
+
| `IsProviderActivated` | `bool` |
|
|
220
|
+
|
|
221
|
+
**Example**
|
|
222
|
+
|
|
223
|
+
```js
|
|
224
|
+
const { isError, message, result } = await oasis.provider.getAllRegisteredProviders({});
|
|
225
|
+
if (isError) throw new Error(message);
|
|
226
|
+
console.log(result);
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Example response:
|
|
230
|
+
|
|
231
|
+
```json
|
|
232
|
+
{
|
|
233
|
+
"isError": false,
|
|
234
|
+
"message": "",
|
|
235
|
+
"result": [{ "ProviderName": "example string", "ProviderDescription": "example string", "ProviderCategory": { "Score": 1.0 }, "ProviderCategories": [], "ProviderType": { "Score": 1.0 }, "Activated": true, "IsProviderActivated": true }]
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
### `getAllRegisteredProvidersForCategory`
|
|
242
|
+
|
|
243
|
+
Get all registered storage providers for a given category.
|
|
244
|
+
|
|
245
|
+
**GET** `api/provider/get-all-registered-providers-for-category/{category}`
|
|
246
|
+
|
|
247
|
+
Route parameters:
|
|
248
|
+
|
|
249
|
+
| Field | Type |
|
|
250
|
+
| --- | --- |
|
|
251
|
+
| `category` | `ProviderCategory` |
|
|
252
|
+
|
|
253
|
+
**Request**
|
|
254
|
+
|
|
255
|
+
No request body.
|
|
256
|
+
|
|
257
|
+
**Response**
|
|
258
|
+
|
|
259
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
260
|
+
|
|
261
|
+
`result` type: `IOASISProvider` (array)
|
|
262
|
+
|
|
263
|
+
| Field | Type |
|
|
264
|
+
| --- | --- |
|
|
265
|
+
| `ProviderName` | `string` |
|
|
266
|
+
| `ProviderDescription` | `string` |
|
|
267
|
+
| `ProviderCategory` | `EnumValue<ProviderCategory>` |
|
|
268
|
+
| `ProviderCategories` | `List<EnumValue<ProviderCategory>>` |
|
|
269
|
+
| `ProviderType` | `EnumValue<ProviderType>` |
|
|
270
|
+
| `Activated` | `bool` |
|
|
271
|
+
| `IsProviderActivated` | `bool` |
|
|
272
|
+
|
|
273
|
+
**Example**
|
|
274
|
+
|
|
275
|
+
```js
|
|
276
|
+
const { isError, message, result } = await oasis.provider.getAllRegisteredProvidersForCategory({
|
|
277
|
+
category: '<category>'
|
|
278
|
+
});
|
|
279
|
+
if (isError) throw new Error(message);
|
|
280
|
+
console.log(result);
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Example response:
|
|
284
|
+
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"isError": false,
|
|
288
|
+
"message": "",
|
|
289
|
+
"result": [{ "ProviderName": "example string", "ProviderDescription": "example string", "ProviderCategory": { "Score": 1.0 }, "ProviderCategories": [], "ProviderType": { "Score": 1.0 }, "Activated": true, "IsProviderActivated": true }]
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### `getAllRegisteredRendererProviders`
|
|
296
|
+
|
|
297
|
+
Get all registered renderer providers.
|
|
298
|
+
|
|
299
|
+
**GET** `api/provider/get-all-registered-renderer-providers`
|
|
300
|
+
|
|
301
|
+
**Request**
|
|
302
|
+
|
|
303
|
+
No request body.
|
|
304
|
+
|
|
305
|
+
**Response**
|
|
306
|
+
|
|
307
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
308
|
+
|
|
309
|
+
`result` type: `IOASISProvider` (array)
|
|
310
|
+
|
|
311
|
+
| Field | Type |
|
|
312
|
+
| --- | --- |
|
|
313
|
+
| `ProviderName` | `string` |
|
|
314
|
+
| `ProviderDescription` | `string` |
|
|
315
|
+
| `ProviderCategory` | `EnumValue<ProviderCategory>` |
|
|
316
|
+
| `ProviderCategories` | `List<EnumValue<ProviderCategory>>` |
|
|
317
|
+
| `ProviderType` | `EnumValue<ProviderType>` |
|
|
318
|
+
| `Activated` | `bool` |
|
|
319
|
+
| `IsProviderActivated` | `bool` |
|
|
320
|
+
|
|
321
|
+
**Example**
|
|
322
|
+
|
|
323
|
+
```js
|
|
324
|
+
const { isError, message, result } = await oasis.provider.getAllRegisteredRendererProviders({});
|
|
325
|
+
if (isError) throw new Error(message);
|
|
326
|
+
console.log(result);
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Example response:
|
|
330
|
+
|
|
331
|
+
```json
|
|
332
|
+
{
|
|
333
|
+
"isError": false,
|
|
334
|
+
"message": "",
|
|
335
|
+
"result": [{ "ProviderName": "example string", "ProviderDescription": "example string", "ProviderCategory": { "Score": 1.0 }, "ProviderCategories": [], "ProviderType": { "Score": 1.0 }, "Activated": true, "IsProviderActivated": true }]
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
### `getAllRegisteredStorageProviders`
|
|
342
|
+
|
|
343
|
+
Get all registered storage providers.
|
|
344
|
+
|
|
345
|
+
**GET** `api/provider/get-all-registered-storage-providers`
|
|
346
|
+
|
|
347
|
+
**Request**
|
|
348
|
+
|
|
349
|
+
No request body.
|
|
350
|
+
|
|
351
|
+
**Response**
|
|
352
|
+
|
|
353
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
354
|
+
|
|
355
|
+
`result` type: `IOASISProvider` (array)
|
|
356
|
+
|
|
357
|
+
| Field | Type |
|
|
358
|
+
| --- | --- |
|
|
359
|
+
| `ProviderName` | `string` |
|
|
360
|
+
| `ProviderDescription` | `string` |
|
|
361
|
+
| `ProviderCategory` | `EnumValue<ProviderCategory>` |
|
|
362
|
+
| `ProviderCategories` | `List<EnumValue<ProviderCategory>>` |
|
|
363
|
+
| `ProviderType` | `EnumValue<ProviderType>` |
|
|
364
|
+
| `Activated` | `bool` |
|
|
365
|
+
| `IsProviderActivated` | `bool` |
|
|
366
|
+
|
|
367
|
+
**Example**
|
|
368
|
+
|
|
369
|
+
```js
|
|
370
|
+
const { isError, message, result } = await oasis.provider.getAllRegisteredStorageProviders({});
|
|
371
|
+
if (isError) throw new Error(message);
|
|
372
|
+
console.log(result);
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Example response:
|
|
376
|
+
|
|
377
|
+
```json
|
|
378
|
+
{
|
|
379
|
+
"isError": false,
|
|
380
|
+
"message": "",
|
|
381
|
+
"result": [{ "ProviderName": "example string", "ProviderDescription": "example string", "ProviderCategory": { "Score": 1.0 }, "ProviderCategories": [], "ProviderType": { "Score": 1.0 }, "Activated": true, "IsProviderActivated": true }]
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
### `getCurrentStorageProvider`
|
|
388
|
+
|
|
389
|
+
Get's the current active storage provider.
|
|
390
|
+
|
|
391
|
+
**GET** `api/provider/get-current-storage-provider`
|
|
392
|
+
|
|
393
|
+
**Request**
|
|
394
|
+
|
|
395
|
+
No request body.
|
|
396
|
+
|
|
397
|
+
**Response**
|
|
398
|
+
|
|
399
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
400
|
+
|
|
401
|
+
`result` type: `IOASISStorageProvider`
|
|
402
|
+
|
|
403
|
+
_No fields._
|
|
404
|
+
|
|
405
|
+
**Example**
|
|
406
|
+
|
|
407
|
+
```js
|
|
408
|
+
const { isError, message, result } = await oasis.provider.getCurrentStorageProvider({});
|
|
409
|
+
if (isError) throw new Error(message);
|
|
410
|
+
console.log(result);
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Example response:
|
|
414
|
+
|
|
415
|
+
```json
|
|
416
|
+
{
|
|
417
|
+
"isError": false,
|
|
418
|
+
"message": "",
|
|
419
|
+
"result": { }
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
### `getCurrentStorageProviderType`
|
|
426
|
+
|
|
427
|
+
Get's the current active storage provider type.
|
|
428
|
+
|
|
429
|
+
**GET** `api/provider/get-current-storage-provider-type`
|
|
430
|
+
|
|
431
|
+
**Request**
|
|
432
|
+
|
|
433
|
+
No request body.
|
|
434
|
+
|
|
435
|
+
**Response**
|
|
436
|
+
|
|
437
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
438
|
+
|
|
439
|
+
`result` type: `EnumValue<ProviderType>`
|
|
440
|
+
|
|
441
|
+
| Field | Type |
|
|
442
|
+
| --- | --- |
|
|
443
|
+
| `Score` | `double` |
|
|
444
|
+
|
|
445
|
+
**Example**
|
|
446
|
+
|
|
447
|
+
```js
|
|
448
|
+
const { isError, message, result } = await oasis.provider.getCurrentStorageProviderType({});
|
|
449
|
+
if (isError) throw new Error(message);
|
|
450
|
+
console.log(result);
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
Example response:
|
|
454
|
+
|
|
455
|
+
```json
|
|
456
|
+
{
|
|
457
|
+
"isError": false,
|
|
458
|
+
"message": "",
|
|
459
|
+
"result": { "Score": 1.0 }
|
|
460
|
+
}
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
### `getProvidersThatAreAutoReplicating`
|
|
466
|
+
|
|
467
|
+
Get's the list of providers that are auto-replicating. See SetAutoReplicate methods below for more info.
|
|
468
|
+
|
|
469
|
+
**GET** `api/provider/get-providers-that-are-auto-replicating`
|
|
470
|
+
|
|
471
|
+
**Request**
|
|
472
|
+
|
|
473
|
+
No request body.
|
|
474
|
+
|
|
475
|
+
**Response**
|
|
476
|
+
|
|
477
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
478
|
+
|
|
479
|
+
`result` type: `EnumValue<ProviderType>` (array)
|
|
480
|
+
|
|
481
|
+
| Field | Type |
|
|
482
|
+
| --- | --- |
|
|
483
|
+
| `Score` | `double` |
|
|
484
|
+
|
|
485
|
+
**Example**
|
|
486
|
+
|
|
487
|
+
```js
|
|
488
|
+
const { isError, message, result } = await oasis.provider.getProvidersThatAreAutoReplicating({});
|
|
489
|
+
if (isError) throw new Error(message);
|
|
490
|
+
console.log(result);
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Example response:
|
|
494
|
+
|
|
495
|
+
```json
|
|
496
|
+
{
|
|
497
|
+
"isError": false,
|
|
498
|
+
"message": "",
|
|
499
|
+
"result": [{ "Score": 1.0 }]
|
|
500
|
+
}
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
### `getProvidersThatHaveAutoFailOverEnabled`
|
|
506
|
+
|
|
507
|
+
Get's the list of providers that have auto-failover enabled. See SetAutoFailOver methods below for more info.
|
|
508
|
+
|
|
509
|
+
**GET** `api/provider/get-providers-that-have-auto-fail-over-enabled`
|
|
510
|
+
|
|
511
|
+
**Request**
|
|
512
|
+
|
|
513
|
+
No request body.
|
|
514
|
+
|
|
515
|
+
**Response**
|
|
516
|
+
|
|
517
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
518
|
+
|
|
519
|
+
`result` type: `EnumValue<ProviderType>` (array)
|
|
520
|
+
|
|
521
|
+
| Field | Type |
|
|
522
|
+
| --- | --- |
|
|
523
|
+
| `Score` | `double` |
|
|
524
|
+
|
|
525
|
+
**Example**
|
|
526
|
+
|
|
527
|
+
```js
|
|
528
|
+
const { isError, message, result } = await oasis.provider.getProvidersThatHaveAutoFailOverEnabled({});
|
|
529
|
+
if (isError) throw new Error(message);
|
|
530
|
+
console.log(result);
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Example response:
|
|
534
|
+
|
|
535
|
+
```json
|
|
536
|
+
{
|
|
537
|
+
"isError": false,
|
|
538
|
+
"message": "",
|
|
539
|
+
"result": [{ "Score": 1.0 }]
|
|
540
|
+
}
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
### `getProvidersThatHaveAutoLoadBalanceEnabled`
|
|
546
|
+
|
|
547
|
+
Get's the list of providers that have auto-load balance enabled. See SetAutoLoadBalance methods below for more info.
|
|
548
|
+
|
|
549
|
+
**GET** `api/provider/get-providers-that-have-auto-load-balance-enabled`
|
|
550
|
+
|
|
551
|
+
**Request**
|
|
552
|
+
|
|
553
|
+
No request body.
|
|
554
|
+
|
|
555
|
+
**Response**
|
|
556
|
+
|
|
557
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
558
|
+
|
|
559
|
+
`result` type: `EnumValue<ProviderType>` (array)
|
|
560
|
+
|
|
561
|
+
| Field | Type |
|
|
562
|
+
| --- | --- |
|
|
563
|
+
| `Score` | `double` |
|
|
564
|
+
|
|
565
|
+
**Example**
|
|
566
|
+
|
|
567
|
+
```js
|
|
568
|
+
const { isError, message, result } = await oasis.provider.getProvidersThatHaveAutoLoadBalanceEnabled({});
|
|
569
|
+
if (isError) throw new Error(message);
|
|
570
|
+
console.log(result);
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
Example response:
|
|
574
|
+
|
|
575
|
+
```json
|
|
576
|
+
{
|
|
577
|
+
"isError": false,
|
|
578
|
+
"message": "",
|
|
579
|
+
"result": [{ "Score": 1.0 }]
|
|
580
|
+
}
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
---
|
|
584
|
+
|
|
585
|
+
### `getRegisteredProvider`
|
|
586
|
+
|
|
587
|
+
Get's the provider for the given providerType. (The provider must already be registered).
|
|
588
|
+
|
|
589
|
+
**GET** `api/provider/get-registered-provider/{providerType}`
|
|
590
|
+
|
|
591
|
+
Route parameters:
|
|
592
|
+
|
|
593
|
+
| Field | Type |
|
|
594
|
+
| --- | --- |
|
|
595
|
+
| `providerType` | `ProviderType` |
|
|
596
|
+
|
|
597
|
+
**Request**
|
|
598
|
+
|
|
599
|
+
No request body.
|
|
600
|
+
|
|
601
|
+
**Response**
|
|
602
|
+
|
|
603
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
604
|
+
|
|
605
|
+
`result` type: `IOASISProvider`
|
|
606
|
+
|
|
607
|
+
| Field | Type |
|
|
608
|
+
| --- | --- |
|
|
609
|
+
| `ProviderName` | `string` |
|
|
610
|
+
| `ProviderDescription` | `string` |
|
|
611
|
+
| `ProviderCategory` | `EnumValue<ProviderCategory>` |
|
|
612
|
+
| `ProviderCategories` | `List<EnumValue<ProviderCategory>>` |
|
|
613
|
+
| `ProviderType` | `EnumValue<ProviderType>` |
|
|
614
|
+
| `Activated` | `bool` |
|
|
615
|
+
| `IsProviderActivated` | `bool` |
|
|
616
|
+
|
|
617
|
+
**Example**
|
|
618
|
+
|
|
619
|
+
```js
|
|
620
|
+
const { isError, message, result } = await oasis.provider.getRegisteredProvider({
|
|
621
|
+
providerType: '<providerType>'
|
|
622
|
+
});
|
|
623
|
+
if (isError) throw new Error(message);
|
|
624
|
+
console.log(result);
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
Example response:
|
|
628
|
+
|
|
629
|
+
```json
|
|
630
|
+
{
|
|
631
|
+
"isError": false,
|
|
632
|
+
"message": "",
|
|
633
|
+
"result": { "ProviderName": "example string", "ProviderDescription": "example string", "ProviderCategory": { "Score": 1.0 }, "ProviderCategories": [], "ProviderType": { "Score": 1.0 }, "Activated": true, "IsProviderActivated": true }
|
|
634
|
+
}
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
---
|
|
638
|
+
|
|
639
|
+
### `isProviderRegistered`
|
|
640
|
+
|
|
641
|
+
Return true if the given provider has been registered, false if it has not.
|
|
642
|
+
|
|
643
|
+
**GET** `api/provider/is-provider-registered/{providerType}`
|
|
644
|
+
|
|
645
|
+
Route parameters:
|
|
646
|
+
|
|
647
|
+
| Field | Type |
|
|
648
|
+
| --- | --- |
|
|
649
|
+
| `providerType` | `ProviderType` |
|
|
650
|
+
|
|
651
|
+
**Request**
|
|
652
|
+
|
|
653
|
+
No request body.
|
|
654
|
+
|
|
655
|
+
**Response**
|
|
656
|
+
|
|
657
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
658
|
+
|
|
659
|
+
`result` type: `bool`
|
|
660
|
+
|
|
661
|
+
**Example**
|
|
662
|
+
|
|
663
|
+
```js
|
|
664
|
+
const { isError, message, result } = await oasis.provider.isProviderRegistered({
|
|
665
|
+
providerType: '<providerType>'
|
|
666
|
+
});
|
|
667
|
+
if (isError) throw new Error(message);
|
|
668
|
+
console.log(result);
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
Example response:
|
|
672
|
+
|
|
673
|
+
```json
|
|
674
|
+
{
|
|
675
|
+
"isError": false,
|
|
676
|
+
"message": "",
|
|
677
|
+
"result": true
|
|
678
|
+
}
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
---
|
|
682
|
+
|
|
683
|
+
### `registerProvider`
|
|
684
|
+
|
|
685
|
+
Register the given provider.
|
|
686
|
+
|
|
687
|
+
**POST** `api/provider/register-provider/{provider}`
|
|
688
|
+
|
|
689
|
+
Route parameters:
|
|
690
|
+
|
|
691
|
+
| Field | Type |
|
|
692
|
+
| --- | --- |
|
|
693
|
+
| `provider` | `IOASISProvider` |
|
|
694
|
+
|
|
695
|
+
**Request**
|
|
696
|
+
|
|
697
|
+
No request body.
|
|
698
|
+
|
|
699
|
+
**Response**
|
|
700
|
+
|
|
701
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
702
|
+
|
|
703
|
+
`result` type: `bool`
|
|
704
|
+
|
|
705
|
+
**Example**
|
|
706
|
+
|
|
707
|
+
```js
|
|
708
|
+
const { isError, message, result } = await oasis.provider.registerProvider({
|
|
709
|
+
provider: '<provider>'
|
|
710
|
+
});
|
|
711
|
+
if (isError) throw new Error(message);
|
|
712
|
+
console.log(result);
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
Example response:
|
|
716
|
+
|
|
717
|
+
```json
|
|
718
|
+
{
|
|
719
|
+
"isError": false,
|
|
720
|
+
"message": "",
|
|
721
|
+
"result": true
|
|
722
|
+
}
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
727
|
+
### `registerProviderType`
|
|
728
|
+
|
|
729
|
+
Register the given provider type.
|
|
730
|
+
|
|
731
|
+
**POST** `api/provider/register-provider-type/{providerType}`
|
|
732
|
+
|
|
733
|
+
Route parameters:
|
|
734
|
+
|
|
735
|
+
| Field | Type |
|
|
736
|
+
| --- | --- |
|
|
737
|
+
| `providerType` | `ProviderType` |
|
|
738
|
+
|
|
739
|
+
**Request**
|
|
740
|
+
|
|
741
|
+
No request body.
|
|
742
|
+
|
|
743
|
+
**Response**
|
|
744
|
+
|
|
745
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
746
|
+
|
|
747
|
+
`result` type: `bool`
|
|
748
|
+
|
|
749
|
+
**Example**
|
|
750
|
+
|
|
751
|
+
```js
|
|
752
|
+
const { isError, message, result } = await oasis.provider.registerProviderType({
|
|
753
|
+
providerType: '<providerType>'
|
|
754
|
+
});
|
|
755
|
+
if (isError) throw new Error(message);
|
|
756
|
+
console.log(result);
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
Example response:
|
|
760
|
+
|
|
761
|
+
```json
|
|
762
|
+
{
|
|
763
|
+
"isError": false,
|
|
764
|
+
"message": "",
|
|
765
|
+
"result": true
|
|
766
|
+
}
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
---
|
|
770
|
+
|
|
771
|
+
### `registerProviderTypes`
|
|
772
|
+
|
|
773
|
+
Register the given provider types.
|
|
774
|
+
|
|
775
|
+
**POST** `api/provider/register-provider-types/{providerTypes}`
|
|
776
|
+
|
|
777
|
+
Route parameters:
|
|
778
|
+
|
|
779
|
+
| Field | Type |
|
|
780
|
+
| --- | --- |
|
|
781
|
+
| `providerTypes` | `string` |
|
|
782
|
+
|
|
783
|
+
**Request**
|
|
784
|
+
|
|
785
|
+
No request body.
|
|
786
|
+
|
|
787
|
+
**Response**
|
|
788
|
+
|
|
789
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
790
|
+
|
|
791
|
+
`result` type: `IOASISStorageProvider` (array)
|
|
792
|
+
|
|
793
|
+
_No fields._
|
|
794
|
+
|
|
795
|
+
**Example**
|
|
796
|
+
|
|
797
|
+
```js
|
|
798
|
+
const { isError, message, result } = await oasis.provider.registerProviderTypes({
|
|
799
|
+
providerTypes: '<providerTypes>'
|
|
800
|
+
});
|
|
801
|
+
if (isError) throw new Error(message);
|
|
802
|
+
console.log(result);
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
Example response:
|
|
806
|
+
|
|
807
|
+
```json
|
|
808
|
+
{
|
|
809
|
+
"isError": false,
|
|
810
|
+
"message": "",
|
|
811
|
+
"result": [{ }]
|
|
812
|
+
}
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
---
|
|
816
|
+
|
|
817
|
+
### `registerProviders`
|
|
818
|
+
|
|
819
|
+
Register the given providers.
|
|
820
|
+
|
|
821
|
+
**POST** `api/provider/register-providers/{providers}`
|
|
822
|
+
|
|
823
|
+
Route parameters:
|
|
824
|
+
|
|
825
|
+
| Field | Type |
|
|
826
|
+
| --- | --- |
|
|
827
|
+
| `providers` | `List<IOASISProvider>` |
|
|
828
|
+
|
|
829
|
+
**Request**
|
|
830
|
+
|
|
831
|
+
No request body.
|
|
832
|
+
|
|
833
|
+
**Response**
|
|
834
|
+
|
|
835
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
836
|
+
|
|
837
|
+
`result` type: `bool`
|
|
838
|
+
|
|
839
|
+
**Example**
|
|
840
|
+
|
|
841
|
+
```js
|
|
842
|
+
const { isError, message, result } = await oasis.provider.registerProviders({
|
|
843
|
+
providers: '<providers>'
|
|
844
|
+
});
|
|
845
|
+
if (isError) throw new Error(message);
|
|
846
|
+
console.log(result);
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
Example response:
|
|
850
|
+
|
|
851
|
+
```json
|
|
852
|
+
{
|
|
853
|
+
"isError": false,
|
|
854
|
+
"message": "",
|
|
855
|
+
"result": true
|
|
856
|
+
}
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
---
|
|
860
|
+
|
|
861
|
+
### `setAndActivateCurrentStorageProvider`
|
|
862
|
+
|
|
863
|
+
Set and activate the current storage provider. If the setGlobally flag is false then this will only apply to the next request made before reverting back to the default provider. If this is set to true then it will permanently switch to the new provider for all future requests.
|
|
864
|
+
|
|
865
|
+
**POST** `api/provider/set-and-activate-current-storage-provider/{providerType}/{setGlobally}`
|
|
866
|
+
|
|
867
|
+
Route parameters:
|
|
868
|
+
|
|
869
|
+
| Field | Type |
|
|
870
|
+
| --- | --- |
|
|
871
|
+
| `providerType` | `ProviderType` |
|
|
872
|
+
| `setGlobally` | `bool` |
|
|
873
|
+
|
|
874
|
+
**Request**
|
|
875
|
+
|
|
876
|
+
No request body.
|
|
877
|
+
|
|
878
|
+
**Response**
|
|
879
|
+
|
|
880
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
881
|
+
|
|
882
|
+
`result` type: `bool`
|
|
883
|
+
|
|
884
|
+
**Example**
|
|
885
|
+
|
|
886
|
+
```js
|
|
887
|
+
const { isError, message, result } = await oasis.provider.setAndActivateCurrentStorageProvider({
|
|
888
|
+
providerType: '<providerType>',
|
|
889
|
+
setGlobally: '<setGlobally>'
|
|
890
|
+
});
|
|
891
|
+
if (isError) throw new Error(message);
|
|
892
|
+
console.log(result);
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
Example response:
|
|
896
|
+
|
|
897
|
+
```json
|
|
898
|
+
{
|
|
899
|
+
"isError": false,
|
|
900
|
+
"message": "",
|
|
901
|
+
"result": true
|
|
902
|
+
}
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
---
|
|
906
|
+
|
|
907
|
+
### `setAutoFailOverForAllProviders`
|
|
908
|
+
|
|
909
|
+
Enable/disable auto-failover for all providers. If this is set to true then the OASIS will automatically switch to the next provider if the current one fails. If load balancing is switched on then it will automatically switch to the next fastest provider.
|
|
910
|
+
|
|
911
|
+
**POST** `api/provider/set-auto-fail-over-for-all-providers/{addToFailOverList}`
|
|
912
|
+
|
|
913
|
+
Route parameters:
|
|
914
|
+
|
|
915
|
+
| Field | Type |
|
|
916
|
+
| --- | --- |
|
|
917
|
+
| `addToFailOverList` | `bool` |
|
|
918
|
+
|
|
919
|
+
**Request**
|
|
920
|
+
|
|
921
|
+
No request body.
|
|
922
|
+
|
|
923
|
+
**Response**
|
|
924
|
+
|
|
925
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
926
|
+
|
|
927
|
+
`result` type: `bool`
|
|
928
|
+
|
|
929
|
+
**Example**
|
|
930
|
+
|
|
931
|
+
```js
|
|
932
|
+
const { isError, message, result } = await oasis.provider.setAutoFailOverForAllProviders({
|
|
933
|
+
addToFailOverList: '<addToFailOverList>'
|
|
934
|
+
});
|
|
935
|
+
if (isError) throw new Error(message);
|
|
936
|
+
console.log(result);
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
Example response:
|
|
940
|
+
|
|
941
|
+
```json
|
|
942
|
+
{
|
|
943
|
+
"isError": false,
|
|
944
|
+
"message": "",
|
|
945
|
+
"result": true
|
|
946
|
+
}
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
### `setAutoFailOverForListOfProviders`
|
|
952
|
+
|
|
953
|
+
Enable/disable auto-failover for providers. If this is set to true then the OASIS will automatically switch to the next provider in the list of providers passed in if the current one fails. If load balancing is switched on then it will automatically switch to the next fastest provider. The OASIS will continue to auto-fail over to the next provider in the list until this method is called again passing in false along with a list of providers to disable auto-failover. NOTE: If a provider is in the list of providers to auto-failover but is missing from the list when false is passed in, then it will continue to auto-failover.
|
|
954
|
+
|
|
955
|
+
**POST** `api/provider/set-auto-fail-over-for-list-of-providers/{addToFailOverList}/{providerTypes}`
|
|
956
|
+
|
|
957
|
+
Route parameters:
|
|
958
|
+
|
|
959
|
+
| Field | Type |
|
|
960
|
+
| --- | --- |
|
|
961
|
+
| `addToFailOverList` | `bool` |
|
|
962
|
+
| `providerTypes` | `string` |
|
|
963
|
+
|
|
964
|
+
**Request**
|
|
965
|
+
|
|
966
|
+
No request body.
|
|
967
|
+
|
|
968
|
+
**Response**
|
|
969
|
+
|
|
970
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
971
|
+
|
|
972
|
+
`result` type: `bool`
|
|
973
|
+
|
|
974
|
+
**Example**
|
|
975
|
+
|
|
976
|
+
```js
|
|
977
|
+
const { isError, message, result } = await oasis.provider.setAutoFailOverForListOfProviders({
|
|
978
|
+
addToFailOverList: '<addToFailOverList>',
|
|
979
|
+
providerTypes: '<providerTypes>'
|
|
980
|
+
});
|
|
981
|
+
if (isError) throw new Error(message);
|
|
982
|
+
console.log(result);
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
Example response:
|
|
986
|
+
|
|
987
|
+
```json
|
|
988
|
+
{
|
|
989
|
+
"isError": false,
|
|
990
|
+
"message": "",
|
|
991
|
+
"result": true
|
|
992
|
+
}
|
|
993
|
+
```
|
|
994
|
+
|
|
995
|
+
---
|
|
996
|
+
|
|
997
|
+
### `setAutoLoadBalanceForAllProviders`
|
|
998
|
+
|
|
999
|
+
Enable/disable auto-load balance for all providers. If this is set to true then the OASIS will automatically switch to the fastest provider within the ONODE's neighbourhood. This effectively load balances the entire internet.
|
|
1000
|
+
|
|
1001
|
+
**POST** `api/provider/set-auto-load-balance-for-all-providers/{addToLoadBalanceList}`
|
|
1002
|
+
|
|
1003
|
+
Route parameters:
|
|
1004
|
+
|
|
1005
|
+
| Field | Type |
|
|
1006
|
+
| --- | --- |
|
|
1007
|
+
| `addToLoadBalanceList` | `bool` |
|
|
1008
|
+
|
|
1009
|
+
**Request**
|
|
1010
|
+
|
|
1011
|
+
No request body.
|
|
1012
|
+
|
|
1013
|
+
**Response**
|
|
1014
|
+
|
|
1015
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1016
|
+
|
|
1017
|
+
`result` type: `bool`
|
|
1018
|
+
|
|
1019
|
+
**Example**
|
|
1020
|
+
|
|
1021
|
+
```js
|
|
1022
|
+
const { isError, message, result } = await oasis.provider.setAutoLoadBalanceForAllProviders({
|
|
1023
|
+
addToLoadBalanceList: '<addToLoadBalanceList>'
|
|
1024
|
+
});
|
|
1025
|
+
if (isError) throw new Error(message);
|
|
1026
|
+
console.log(result);
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
Example response:
|
|
1030
|
+
|
|
1031
|
+
```json
|
|
1032
|
+
{
|
|
1033
|
+
"isError": false,
|
|
1034
|
+
"message": "",
|
|
1035
|
+
"result": true
|
|
1036
|
+
}
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
---
|
|
1040
|
+
|
|
1041
|
+
### `setAutoLoadBalanceForListOfProviders`
|
|
1042
|
+
|
|
1043
|
+
Enable/disable auto-load balance for providers. If this is set to true then the OASIS will automatically switch to the fastest provider within the ONODE's neighbourhood. This effectively load balances the entire internet. The OASIS will continue to auto-load balance over providers in the list until this method is called again passing in false along with a list of providers to disable auto-loadbalance. NOTE: If a provider is in the list of providers to auto-loadbalance but is missing from the list when false is passed in, then it will continue to auto-loadbalance.
|
|
1044
|
+
|
|
1045
|
+
**POST** `api/provider/set-auto-load-balance-for-list-of-providers/{addToLoadBalanceList}/{providerTypes}`
|
|
1046
|
+
|
|
1047
|
+
Route parameters:
|
|
1048
|
+
|
|
1049
|
+
| Field | Type |
|
|
1050
|
+
| --- | --- |
|
|
1051
|
+
| `addToLoadBalanceList` | `bool` |
|
|
1052
|
+
| `providerTypes` | `string` |
|
|
1053
|
+
|
|
1054
|
+
**Request**
|
|
1055
|
+
|
|
1056
|
+
No request body.
|
|
1057
|
+
|
|
1058
|
+
**Response**
|
|
1059
|
+
|
|
1060
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1061
|
+
|
|
1062
|
+
`result` type: `bool`
|
|
1063
|
+
|
|
1064
|
+
**Example**
|
|
1065
|
+
|
|
1066
|
+
```js
|
|
1067
|
+
const { isError, message, result } = await oasis.provider.setAutoLoadBalanceForListOfProviders({
|
|
1068
|
+
addToLoadBalanceList: '<addToLoadBalanceList>',
|
|
1069
|
+
providerTypes: '<providerTypes>'
|
|
1070
|
+
});
|
|
1071
|
+
if (isError) throw new Error(message);
|
|
1072
|
+
console.log(result);
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
Example response:
|
|
1076
|
+
|
|
1077
|
+
```json
|
|
1078
|
+
{
|
|
1079
|
+
"isError": false,
|
|
1080
|
+
"message": "",
|
|
1081
|
+
"result": true
|
|
1082
|
+
}
|
|
1083
|
+
```
|
|
1084
|
+
|
|
1085
|
+
---
|
|
1086
|
+
|
|
1087
|
+
### `setAutoReplicateForAllProviders`
|
|
1088
|
+
|
|
1089
|
+
Enable/disable auto-replication between providers. If this is set to true then the OASIS will automatically replicate all data including the user's avatar to all available providers.
|
|
1090
|
+
|
|
1091
|
+
**POST** `api/provider/set-auto-replicate-for-all-providers/{autoReplicate}`
|
|
1092
|
+
|
|
1093
|
+
Route parameters:
|
|
1094
|
+
|
|
1095
|
+
| Field | Type |
|
|
1096
|
+
| --- | --- |
|
|
1097
|
+
| `autoReplicate` | `bool` |
|
|
1098
|
+
|
|
1099
|
+
**Request**
|
|
1100
|
+
|
|
1101
|
+
No request body.
|
|
1102
|
+
|
|
1103
|
+
**Response**
|
|
1104
|
+
|
|
1105
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1106
|
+
|
|
1107
|
+
`result` type: `bool`
|
|
1108
|
+
|
|
1109
|
+
**Example**
|
|
1110
|
+
|
|
1111
|
+
```js
|
|
1112
|
+
const { isError, message, result } = await oasis.provider.setAutoReplicateForAllProviders({
|
|
1113
|
+
autoReplicate: '<autoReplicate>'
|
|
1114
|
+
});
|
|
1115
|
+
if (isError) throw new Error(message);
|
|
1116
|
+
console.log(result);
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
Example response:
|
|
1120
|
+
|
|
1121
|
+
```json
|
|
1122
|
+
{
|
|
1123
|
+
"isError": false,
|
|
1124
|
+
"message": "",
|
|
1125
|
+
"result": true
|
|
1126
|
+
}
|
|
1127
|
+
```
|
|
1128
|
+
|
|
1129
|
+
---
|
|
1130
|
+
|
|
1131
|
+
### `setAutoReplicateForListOfProviders`
|
|
1132
|
+
|
|
1133
|
+
Enable/disable auto-replication between providers. If this is set to true then the OASIS will automatically replicate all data including the user's avatar to the list of providers passed in. The OASIS will continue to replicate to the given providers until this method is called again passing in false along with a list of providers to disable auto-replication. NOTE: If a provider is in the list of providers to auto-replicate but is missing from the list when false is passed in, then it will continue to auto-replicate.
|
|
1134
|
+
|
|
1135
|
+
**POST** `api/provider/set-auto-replicate-for-list-of-providers/{autoReplicate}/{providerTypes}`
|
|
1136
|
+
|
|
1137
|
+
Route parameters:
|
|
1138
|
+
|
|
1139
|
+
| Field | Type |
|
|
1140
|
+
| --- | --- |
|
|
1141
|
+
| `autoReplicate` | `bool` |
|
|
1142
|
+
| `providerTypes` | `string` |
|
|
1143
|
+
|
|
1144
|
+
**Request**
|
|
1145
|
+
|
|
1146
|
+
No request body.
|
|
1147
|
+
|
|
1148
|
+
**Response**
|
|
1149
|
+
|
|
1150
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1151
|
+
|
|
1152
|
+
`result` type: `bool`
|
|
1153
|
+
|
|
1154
|
+
**Example**
|
|
1155
|
+
|
|
1156
|
+
```js
|
|
1157
|
+
const { isError, message, result } = await oasis.provider.setAutoReplicateForListOfProviders({
|
|
1158
|
+
autoReplicate: '<autoReplicate>',
|
|
1159
|
+
providerTypes: '<providerTypes>'
|
|
1160
|
+
});
|
|
1161
|
+
if (isError) throw new Error(message);
|
|
1162
|
+
console.log(result);
|
|
1163
|
+
```
|
|
1164
|
+
|
|
1165
|
+
Example response:
|
|
1166
|
+
|
|
1167
|
+
```json
|
|
1168
|
+
{
|
|
1169
|
+
"isError": false,
|
|
1170
|
+
"message": "",
|
|
1171
|
+
"result": true
|
|
1172
|
+
}
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
---
|
|
1176
|
+
|
|
1177
|
+
### `setProviderConfig`
|
|
1178
|
+
|
|
1179
|
+
Override a provider's config such as connnectionstring, etc
|
|
1180
|
+
|
|
1181
|
+
**POST** `api/provider/set-provider-config/{providerType}/{connectionString}`
|
|
1182
|
+
|
|
1183
|
+
Route parameters:
|
|
1184
|
+
|
|
1185
|
+
| Field | Type |
|
|
1186
|
+
| --- | --- |
|
|
1187
|
+
| `providerType` | `ProviderType` |
|
|
1188
|
+
| `connectionString` | `string` |
|
|
1189
|
+
|
|
1190
|
+
**Request**
|
|
1191
|
+
|
|
1192
|
+
No request body.
|
|
1193
|
+
|
|
1194
|
+
**Response**
|
|
1195
|
+
|
|
1196
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1197
|
+
|
|
1198
|
+
`result` type: `bool`
|
|
1199
|
+
|
|
1200
|
+
**Example**
|
|
1201
|
+
|
|
1202
|
+
```js
|
|
1203
|
+
const { isError, message, result } = await oasis.provider.setProviderConfig({
|
|
1204
|
+
providerType: '<providerType>',
|
|
1205
|
+
connectionString: '<connectionString>'
|
|
1206
|
+
});
|
|
1207
|
+
if (isError) throw new Error(message);
|
|
1208
|
+
console.log(result);
|
|
1209
|
+
```
|
|
1210
|
+
|
|
1211
|
+
Example response:
|
|
1212
|
+
|
|
1213
|
+
```json
|
|
1214
|
+
{
|
|
1215
|
+
"isError": false,
|
|
1216
|
+
"message": "",
|
|
1217
|
+
"result": true
|
|
1218
|
+
}
|
|
1219
|
+
```
|
|
1220
|
+
|
|
1221
|
+
---
|
|
1222
|
+
|
|
1223
|
+
### `unRegisterProvider`
|
|
1224
|
+
|
|
1225
|
+
Unregister the given provider.
|
|
1226
|
+
|
|
1227
|
+
**POST** `api/provider/unregister-provider/{provider}`
|
|
1228
|
+
|
|
1229
|
+
Route parameters:
|
|
1230
|
+
|
|
1231
|
+
| Field | Type |
|
|
1232
|
+
| --- | --- |
|
|
1233
|
+
| `provider` | `IOASISProvider` |
|
|
1234
|
+
|
|
1235
|
+
**Request**
|
|
1236
|
+
|
|
1237
|
+
No request body.
|
|
1238
|
+
|
|
1239
|
+
**Response**
|
|
1240
|
+
|
|
1241
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1242
|
+
|
|
1243
|
+
`result` type: `bool`
|
|
1244
|
+
|
|
1245
|
+
**Example**
|
|
1246
|
+
|
|
1247
|
+
```js
|
|
1248
|
+
const { isError, message, result } = await oasis.provider.unRegisterProvider({
|
|
1249
|
+
provider: '<provider>'
|
|
1250
|
+
});
|
|
1251
|
+
if (isError) throw new Error(message);
|
|
1252
|
+
console.log(result);
|
|
1253
|
+
```
|
|
1254
|
+
|
|
1255
|
+
Example response:
|
|
1256
|
+
|
|
1257
|
+
```json
|
|
1258
|
+
{
|
|
1259
|
+
"isError": false,
|
|
1260
|
+
"message": "",
|
|
1261
|
+
"result": true
|
|
1262
|
+
}
|
|
1263
|
+
```
|
|
1264
|
+
|
|
1265
|
+
---
|
|
1266
|
+
|
|
1267
|
+
### `unRegisterProviderType`
|
|
1268
|
+
|
|
1269
|
+
Unregister the given provider.
|
|
1270
|
+
|
|
1271
|
+
**POST** `api/provider/unregister-provider-type/{providerType}`
|
|
1272
|
+
|
|
1273
|
+
Route parameters:
|
|
1274
|
+
|
|
1275
|
+
| Field | Type |
|
|
1276
|
+
| --- | --- |
|
|
1277
|
+
| `providerType` | `ProviderType` |
|
|
1278
|
+
|
|
1279
|
+
**Request**
|
|
1280
|
+
|
|
1281
|
+
No request body.
|
|
1282
|
+
|
|
1283
|
+
**Response**
|
|
1284
|
+
|
|
1285
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1286
|
+
|
|
1287
|
+
`result` type: `bool`
|
|
1288
|
+
|
|
1289
|
+
**Example**
|
|
1290
|
+
|
|
1291
|
+
```js
|
|
1292
|
+
const { isError, message, result } = await oasis.provider.unRegisterProviderType({
|
|
1293
|
+
providerType: '<providerType>'
|
|
1294
|
+
});
|
|
1295
|
+
if (isError) throw new Error(message);
|
|
1296
|
+
console.log(result);
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
Example response:
|
|
1300
|
+
|
|
1301
|
+
```json
|
|
1302
|
+
{
|
|
1303
|
+
"isError": false,
|
|
1304
|
+
"message": "",
|
|
1305
|
+
"result": true
|
|
1306
|
+
}
|
|
1307
|
+
```
|
|
1308
|
+
|
|
1309
|
+
---
|
|
1310
|
+
|
|
1311
|
+
### `unRegisterProviderTypes`
|
|
1312
|
+
|
|
1313
|
+
Unregisters the list of providers passed in.
|
|
1314
|
+
|
|
1315
|
+
**POST** `api/provider/unregister-provider-types/{providerTypes}`
|
|
1316
|
+
|
|
1317
|
+
Route parameters:
|
|
1318
|
+
|
|
1319
|
+
| Field | Type |
|
|
1320
|
+
| --- | --- |
|
|
1321
|
+
| `providerTypes` | `string` |
|
|
1322
|
+
|
|
1323
|
+
**Request**
|
|
1324
|
+
|
|
1325
|
+
No request body.
|
|
1326
|
+
|
|
1327
|
+
**Response**
|
|
1328
|
+
|
|
1329
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1330
|
+
|
|
1331
|
+
`result` type: `bool`
|
|
1332
|
+
|
|
1333
|
+
**Example**
|
|
1334
|
+
|
|
1335
|
+
```js
|
|
1336
|
+
const { isError, message, result } = await oasis.provider.unRegisterProviderTypes({
|
|
1337
|
+
providerTypes: '<providerTypes>'
|
|
1338
|
+
});
|
|
1339
|
+
if (isError) throw new Error(message);
|
|
1340
|
+
console.log(result);
|
|
1341
|
+
```
|
|
1342
|
+
|
|
1343
|
+
Example response:
|
|
1344
|
+
|
|
1345
|
+
```json
|
|
1346
|
+
{
|
|
1347
|
+
"isError": false,
|
|
1348
|
+
"message": "",
|
|
1349
|
+
"result": true
|
|
1350
|
+
}
|
|
1351
|
+
```
|
|
1352
|
+
|
|
1353
|
+
---
|
|
1354
|
+
|
|
1355
|
+
### `unRegisterProviders`
|
|
1356
|
+
|
|
1357
|
+
Unregisters the list of providers passed in.
|
|
1358
|
+
|
|
1359
|
+
**POST** `api/provider/unregister-providers/{providers}`
|
|
1360
|
+
|
|
1361
|
+
Route parameters:
|
|
1362
|
+
|
|
1363
|
+
| Field | Type |
|
|
1364
|
+
| --- | --- |
|
|
1365
|
+
| `providers` | `List<IOASISProvider>` |
|
|
1366
|
+
|
|
1367
|
+
**Request**
|
|
1368
|
+
|
|
1369
|
+
No request body.
|
|
1370
|
+
|
|
1371
|
+
**Response**
|
|
1372
|
+
|
|
1373
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1374
|
+
|
|
1375
|
+
`result` type: `bool`
|
|
1376
|
+
|
|
1377
|
+
**Example**
|
|
1378
|
+
|
|
1379
|
+
```js
|
|
1380
|
+
const { isError, message, result } = await oasis.provider.unRegisterProviders({
|
|
1381
|
+
providers: '<providers>'
|
|
1382
|
+
});
|
|
1383
|
+
if (isError) throw new Error(message);
|
|
1384
|
+
console.log(result);
|
|
1385
|
+
```
|
|
1386
|
+
|
|
1387
|
+
Example response:
|
|
1388
|
+
|
|
1389
|
+
```json
|
|
1390
|
+
{
|
|
1391
|
+
"isError": false,
|
|
1392
|
+
"message": "",
|
|
1393
|
+
"result": true
|
|
1394
|
+
}
|
|
1395
|
+
```
|
|
1396
|
+
|