@oasisomniverse/web5-api 1.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 +250 -0
- package/docs/README.md +44 -0
- package/docs/modules/Avatar.md +606 -0
- package/docs/modules/CelestialBodies.md +1051 -0
- package/docs/modules/CelestialBodiesMetaData.md +949 -0
- package/docs/modules/CelestialSpaces.md +1051 -0
- package/docs/modules/Chapters.md +955 -0
- package/docs/modules/Competition.md +594 -0
- package/docs/modules/Cosmic.md +3653 -0
- package/docs/modules/Games.md +2619 -0
- package/docs/modules/GeoHotSpots.md +1027 -0
- package/docs/modules/GeoNFTs.md +1049 -0
- package/docs/modules/Health.md +90 -0
- package/docs/modules/Holons.md +1139 -0
- package/docs/modules/HolonsMetaData.md +949 -0
- package/docs/modules/InventoryItems.md +1071 -0
- package/docs/modules/Libraries.md +1052 -0
- package/docs/modules/Missions.md +1286 -0
- package/docs/modules/NFTs.md +1008 -0
- package/docs/modules/OAPPs.md +1190 -0
- package/docs/modules/Parks.md +1079 -0
- package/docs/modules/Plugins.md +1138 -0
- package/docs/modules/Quests.md +1941 -0
- package/docs/modules/Runtimes.md +1112 -0
- package/docs/modules/STAR.md +178 -0
- package/docs/modules/Templates.md +990 -0
- package/docs/modules/Zomes.md +1049 -0
- package/docs/modules/ZomesMetaData.md +949 -0
- package/index.d.ts +97 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +117 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +85 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +60 -0
- package/src/modules/Auth.d.ts +15 -0
- package/src/modules/Auth.js +62 -0
- package/src/modules/Avatar.d.ts +45 -0
- package/src/modules/Avatar.js +47 -0
- package/src/modules/CelestialBodies.d.ts +72 -0
- package/src/modules/CelestialBodies.js +65 -0
- package/src/modules/CelestialBodiesMetaData.d.ts +69 -0
- package/src/modules/CelestialBodiesMetaData.js +61 -0
- package/src/modules/CelestialSpaces.d.ts +72 -0
- package/src/modules/CelestialSpaces.js +65 -0
- package/src/modules/Chapters.d.ts +66 -0
- package/src/modules/Chapters.js +61 -0
- package/src/modules/Competition.d.ts +33 -0
- package/src/modules/Competition.js +39 -0
- package/src/modules/Cosmic.d.ts +222 -0
- package/src/modules/Cosmic.js +165 -0
- package/src/modules/Games.d.ts +171 -0
- package/src/modules/Games.js +131 -0
- package/src/modules/GeoHotSpots.d.ts +66 -0
- package/src/modules/GeoHotSpots.js +61 -0
- package/src/modules/GeoNFTs.d.ts +72 -0
- package/src/modules/GeoNFTs.js +65 -0
- package/src/modules/Health.d.ts +12 -0
- package/src/modules/Health.js +25 -0
- package/src/modules/Holons.d.ts +78 -0
- package/src/modules/Holons.js +69 -0
- package/src/modules/HolonsMetaData.d.ts +69 -0
- package/src/modules/HolonsMetaData.js +61 -0
- package/src/modules/InventoryItems.d.ts +69 -0
- package/src/modules/InventoryItems.js +63 -0
- package/src/modules/Libraries.d.ts +72 -0
- package/src/modules/Libraries.js +65 -0
- package/src/modules/Missions.d.ts +87 -0
- package/src/modules/Missions.js +75 -0
- package/src/modules/NFTs.d.ts +69 -0
- package/src/modules/NFTs.js +63 -0
- package/src/modules/OAPPs.d.ts +69 -0
- package/src/modules/OAPPs.js +61 -0
- package/src/modules/Parks.d.ts +72 -0
- package/src/modules/Parks.js +65 -0
- package/src/modules/Plugins.d.ts +78 -0
- package/src/modules/Plugins.js +69 -0
- package/src/modules/Quests.d.ts +129 -0
- package/src/modules/Quests.js +101 -0
- package/src/modules/Runtimes.d.ts +81 -0
- package/src/modules/Runtimes.js +69 -0
- package/src/modules/STAR.d.ts +18 -0
- package/src/modules/STAR.js +29 -0
- package/src/modules/Templates.d.ts +72 -0
- package/src/modules/Templates.js +63 -0
- package/src/modules/Zomes.d.ts +72 -0
- package/src/modules/Zomes.js +65 -0
- package/src/modules/ZomesMetaData.d.ts +69 -0
- package/src/modules/ZomesMetaData.js +61 -0
- package/src/modules/index.js +67 -0
|
@@ -0,0 +1,1112 @@
|
|
|
1
|
+
# Runtimes — `star.runtimes`
|
|
2
|
+
|
|
3
|
+
Source controller: [`RuntimesController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/RuntimesController.cs)
|
|
4
|
+
Route prefix: `api/runtimes`
|
|
5
|
+
24 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
|
+
### `activateRuntime`
|
|
22
|
+
|
|
23
|
+
Activates a runtime in the STARNET system.
|
|
24
|
+
|
|
25
|
+
**POST** `api/runtimes/{id}/activate`
|
|
26
|
+
|
|
27
|
+
Route parameters:
|
|
28
|
+
|
|
29
|
+
| Field | Type |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `id` | `Guid` |
|
|
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: `IActionResult` (not part of the request/response payload).
|
|
42
|
+
|
|
43
|
+
**Example**
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
const { isError, message, result } = await star.runtimes.activateRuntime({
|
|
47
|
+
id: '<id>'
|
|
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": null
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### `cloneRuntime`
|
|
66
|
+
|
|
67
|
+
**POST** `api/runtimes/{id}/clone`
|
|
68
|
+
|
|
69
|
+
Route parameters:
|
|
70
|
+
|
|
71
|
+
| Field | Type |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `id` | `Guid` |
|
|
74
|
+
|
|
75
|
+
**Request**
|
|
76
|
+
|
|
77
|
+
Body type: `CloneRequest`
|
|
78
|
+
|
|
79
|
+
| Field | Type |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `NewName` | `string` |
|
|
82
|
+
|
|
83
|
+
**Response**
|
|
84
|
+
|
|
85
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
86
|
+
|
|
87
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
88
|
+
|
|
89
|
+
**Example**
|
|
90
|
+
|
|
91
|
+
```js
|
|
92
|
+
const { isError, message, result } = await star.runtimes.cloneRuntime({
|
|
93
|
+
id: '<id>',
|
|
94
|
+
newName: "example string"
|
|
95
|
+
});
|
|
96
|
+
if (isError) throw new Error(message);
|
|
97
|
+
console.log(result);
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Example response:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"isError": false,
|
|
105
|
+
"message": "",
|
|
106
|
+
"result": null
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### `createRuntime`
|
|
113
|
+
|
|
114
|
+
Creates a new runtime for the authenticated avatar.
|
|
115
|
+
|
|
116
|
+
**POST** `api/runtimes`
|
|
117
|
+
|
|
118
|
+
**Request**
|
|
119
|
+
|
|
120
|
+
Body type: `CreateRuntimeRequest`
|
|
121
|
+
|
|
122
|
+
| Field | Type |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| `Name` | `string` |
|
|
125
|
+
| `Description` | `string` |
|
|
126
|
+
| `RuntimeType` | `string` |
|
|
127
|
+
| `Version` | `string` |
|
|
128
|
+
| `Category` | `string` |
|
|
129
|
+
|
|
130
|
+
**Response**
|
|
131
|
+
|
|
132
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
133
|
+
|
|
134
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
135
|
+
|
|
136
|
+
**Example**
|
|
137
|
+
|
|
138
|
+
```js
|
|
139
|
+
const { isError, message, result } = await star.runtimes.createRuntime({
|
|
140
|
+
name: "example string",
|
|
141
|
+
description: "example string",
|
|
142
|
+
runtimeType: "example string",
|
|
143
|
+
version: "example string",
|
|
144
|
+
category: "example string"
|
|
145
|
+
});
|
|
146
|
+
if (isError) throw new Error(message);
|
|
147
|
+
console.log(result);
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Example response:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"isError": false,
|
|
155
|
+
"message": "",
|
|
156
|
+
"result": null
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### `createRuntimeWithOptions`
|
|
163
|
+
|
|
164
|
+
Creates a new runtime with specified parameters.
|
|
165
|
+
|
|
166
|
+
**POST** `api/runtimes/create`
|
|
167
|
+
|
|
168
|
+
**Request**
|
|
169
|
+
|
|
170
|
+
Body type: `CreateRuntimeWithOptionsRequest`
|
|
171
|
+
|
|
172
|
+
| Field | Type |
|
|
173
|
+
| --- | --- |
|
|
174
|
+
| `Name` | `string` |
|
|
175
|
+
| `Description` | `string` |
|
|
176
|
+
| `HolonSubType` | `HolonType` |
|
|
177
|
+
| `SourceFolderPath` | `string` |
|
|
178
|
+
| `CreateOptions` | `ISTARNETCreateOptions<Runtime, STARNETDNA>?` |
|
|
179
|
+
|
|
180
|
+
**Response**
|
|
181
|
+
|
|
182
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
183
|
+
|
|
184
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
185
|
+
|
|
186
|
+
**Example**
|
|
187
|
+
|
|
188
|
+
```js
|
|
189
|
+
const { isError, message, result } = await star.runtimes.createRuntimeWithOptions({
|
|
190
|
+
name: "example string",
|
|
191
|
+
description: "example string",
|
|
192
|
+
holonSubType: { },
|
|
193
|
+
sourceFolderPath: "example string",
|
|
194
|
+
createOptions: { "STARNETHolon": /* <T1> */, "STARNETDNA": /* <T2> */, "MetaTagMappings": { "MetaHolonTags": [{ "HolonName": "example string", "HolonType": { }, "NodeName": "example string", "NodeType": { "Score": 1.0 }, "MetaTag": "example string" }], "MetaTags": { "<string>": "example string" } }, "CheckIfSourcePathExists": true, "CustomCreateParams": { "<string>": {} } }
|
|
195
|
+
});
|
|
196
|
+
if (isError) throw new Error(message);
|
|
197
|
+
console.log(result);
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Example response:
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"isError": false,
|
|
205
|
+
"message": "",
|
|
206
|
+
"result": null
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### `deactivateRuntime`
|
|
213
|
+
|
|
214
|
+
Deactivates a runtime in the STARNET system.
|
|
215
|
+
|
|
216
|
+
**POST** `api/runtimes/{id}/deactivate`
|
|
217
|
+
|
|
218
|
+
Route parameters:
|
|
219
|
+
|
|
220
|
+
| Field | Type |
|
|
221
|
+
| --- | --- |
|
|
222
|
+
| `id` | `Guid` |
|
|
223
|
+
|
|
224
|
+
**Request**
|
|
225
|
+
|
|
226
|
+
No request body.
|
|
227
|
+
|
|
228
|
+
**Response**
|
|
229
|
+
|
|
230
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
231
|
+
|
|
232
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
233
|
+
|
|
234
|
+
**Example**
|
|
235
|
+
|
|
236
|
+
```js
|
|
237
|
+
const { isError, message, result } = await star.runtimes.deactivateRuntime({
|
|
238
|
+
id: '<id>'
|
|
239
|
+
});
|
|
240
|
+
if (isError) throw new Error(message);
|
|
241
|
+
console.log(result);
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Example response:
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"isError": false,
|
|
249
|
+
"message": "",
|
|
250
|
+
"result": null
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
### `deleteRuntime`
|
|
257
|
+
|
|
258
|
+
**DELETE** `api/runtimes/{id}`
|
|
259
|
+
|
|
260
|
+
Route parameters:
|
|
261
|
+
|
|
262
|
+
| Field | Type |
|
|
263
|
+
| --- | --- |
|
|
264
|
+
| `id` | `Guid` |
|
|
265
|
+
|
|
266
|
+
**Request**
|
|
267
|
+
|
|
268
|
+
No request body.
|
|
269
|
+
|
|
270
|
+
**Response**
|
|
271
|
+
|
|
272
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
273
|
+
|
|
274
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
275
|
+
|
|
276
|
+
**Example**
|
|
277
|
+
|
|
278
|
+
```js
|
|
279
|
+
const { isError, message, result } = await star.runtimes.deleteRuntime({
|
|
280
|
+
id: '<id>'
|
|
281
|
+
});
|
|
282
|
+
if (isError) throw new Error(message);
|
|
283
|
+
console.log(result);
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Example response:
|
|
287
|
+
|
|
288
|
+
```json
|
|
289
|
+
{
|
|
290
|
+
"isError": false,
|
|
291
|
+
"message": "",
|
|
292
|
+
"result": null
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
### `downloadRuntime`
|
|
299
|
+
|
|
300
|
+
Downloads a runtime from the STARNET system.
|
|
301
|
+
|
|
302
|
+
**POST** `api/runtimes/{id}/download`
|
|
303
|
+
|
|
304
|
+
Route parameters:
|
|
305
|
+
|
|
306
|
+
| Field | Type |
|
|
307
|
+
| --- | --- |
|
|
308
|
+
| `id` | `Guid` |
|
|
309
|
+
|
|
310
|
+
**Request**
|
|
311
|
+
|
|
312
|
+
Body type: `DownloadRuntimeRequest`
|
|
313
|
+
|
|
314
|
+
| Field | Type |
|
|
315
|
+
| --- | --- |
|
|
316
|
+
| `DestinationPath` | `string` |
|
|
317
|
+
| `Overwrite` | `bool` |
|
|
318
|
+
|
|
319
|
+
**Response**
|
|
320
|
+
|
|
321
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
322
|
+
|
|
323
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
324
|
+
|
|
325
|
+
**Example**
|
|
326
|
+
|
|
327
|
+
```js
|
|
328
|
+
const { isError, message, result } = await star.runtimes.downloadRuntime({
|
|
329
|
+
id: '<id>',
|
|
330
|
+
destinationPath: "example string",
|
|
331
|
+
overwrite: true
|
|
332
|
+
});
|
|
333
|
+
if (isError) throw new Error(message);
|
|
334
|
+
console.log(result);
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Example response:
|
|
338
|
+
|
|
339
|
+
```json
|
|
340
|
+
{
|
|
341
|
+
"isError": false,
|
|
342
|
+
"message": "",
|
|
343
|
+
"result": null
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
### `editRuntime`
|
|
350
|
+
|
|
351
|
+
Edits a runtime with the provided changes.
|
|
352
|
+
|
|
353
|
+
**PUT** `api/runtimes/{id}/edit`
|
|
354
|
+
|
|
355
|
+
Route parameters:
|
|
356
|
+
|
|
357
|
+
| Field | Type |
|
|
358
|
+
| --- | --- |
|
|
359
|
+
| `id` | `Guid` |
|
|
360
|
+
|
|
361
|
+
**Request**
|
|
362
|
+
|
|
363
|
+
Body type: `EditRuntimeRequest`
|
|
364
|
+
|
|
365
|
+
| Field | Type |
|
|
366
|
+
| --- | --- |
|
|
367
|
+
| `NewDNA` | `STARNETDNA` |
|
|
368
|
+
|
|
369
|
+
**Response**
|
|
370
|
+
|
|
371
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
372
|
+
|
|
373
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
374
|
+
|
|
375
|
+
**Example**
|
|
376
|
+
|
|
377
|
+
```js
|
|
378
|
+
const { isError, message, result } = await star.runtimes.editRuntime({
|
|
379
|
+
id: '<id>',
|
|
380
|
+
newDNA: { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "STARNETHolonType": "example string", "STARNETCategory": {}, "STARNETSubCategory": {}, "Dependencies": { "OAPPs": [{ "Type": { }, "HolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "STARNETHolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "Version": "example string", "VersionSequence": 1, "Install": true, "InstallMode": { }, "InstalledFrom": "example string", "InstalledTo": "example string" }], "Runtimes": [], "Libraries": [], "Templates": [], "NFTs": [], "NFTCollections": [], "GeoNFTs": [], "GeoNFTCollections": [], "GeoHotSpots": [], "Quests": [], "Missions": [], "Chapters": [], "InventoryItems": [], "CelestialSpaces": [], "CelestialBodies": [], "Zomes": [], "Holons": [], "CelestialBodiesMetaDataDNA": [], "ZomesMetaDataDNA": [], "HolonsMetaDataDNA": [] }, "MetaData": { "<string>": {} }, "MetaHolonTagMappings": /* <>> */, "MetaTagMappings": { "<string>": "example string" }, "CreatedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "CreatedByAvatarUsername": "example string", "CreatedOn": "2026-01-01T00:00:00Z", "SourcePath": "example string", "PublishedPath": "example string", "PublishedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PublishedByAvatarUsername": "example string", "PublishedOn": "2026-01-01T00:00:00Z", "LaunchTarget": "example string", "ModifiedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ModifiedByAvatarUsername": "example string", "ModifiedOn": "2026-01-01T00:00:00Z", "PublishedOnSTARNET": true, "PublishedToCloud": true, "PublishedToPinata": true, "PinataIPFSHash": "example string", "PublishedProviderType": "example string", "FileSize": 1, "Version": "example string", "OASISRuntimeVersion": "example string", "OASISAPIVersion": "example string", "COSMICVersion": "example string", "STARRuntimeVersion": "example string", "STARODKVersion": "example string", "STARAPIVersion": "example string", "STARNETVersion": "example string", "DotNetVersion": "example string", "VersionSequence": 1, "Downloads": 1, "Installs": 1, "TotalDownloads": 1, "TotalInstalls": 1, "NumberOfVersions": 1 }
|
|
381
|
+
});
|
|
382
|
+
if (isError) throw new Error(message);
|
|
383
|
+
console.log(result);
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
Example response:
|
|
387
|
+
|
|
388
|
+
```json
|
|
389
|
+
{
|
|
390
|
+
"isError": false,
|
|
391
|
+
"message": "",
|
|
392
|
+
"result": null
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
### `getAllRuntimes`
|
|
399
|
+
|
|
400
|
+
Retrieves all runtimes in the system.
|
|
401
|
+
|
|
402
|
+
**GET** `api/runtimes`
|
|
403
|
+
|
|
404
|
+
**Request**
|
|
405
|
+
|
|
406
|
+
No request body.
|
|
407
|
+
|
|
408
|
+
**Response**
|
|
409
|
+
|
|
410
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
411
|
+
|
|
412
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
413
|
+
|
|
414
|
+
**Example**
|
|
415
|
+
|
|
416
|
+
```js
|
|
417
|
+
const { isError, message, result } = await star.runtimes.getAllRuntimes({});
|
|
418
|
+
if (isError) throw new Error(message);
|
|
419
|
+
console.log(result);
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
Example response:
|
|
423
|
+
|
|
424
|
+
```json
|
|
425
|
+
{
|
|
426
|
+
"isError": false,
|
|
427
|
+
"message": "",
|
|
428
|
+
"result": null
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
### `getRuntime`
|
|
435
|
+
|
|
436
|
+
Retrieves a specific runtime by its unique identifier.
|
|
437
|
+
|
|
438
|
+
**GET** `api/runtimes/{id}`
|
|
439
|
+
|
|
440
|
+
Route parameters:
|
|
441
|
+
|
|
442
|
+
| Field | Type |
|
|
443
|
+
| --- | --- |
|
|
444
|
+
| `id` | `Guid` |
|
|
445
|
+
|
|
446
|
+
**Request**
|
|
447
|
+
|
|
448
|
+
No request body.
|
|
449
|
+
|
|
450
|
+
**Response**
|
|
451
|
+
|
|
452
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
453
|
+
|
|
454
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
455
|
+
|
|
456
|
+
**Example**
|
|
457
|
+
|
|
458
|
+
```js
|
|
459
|
+
const { isError, message, result } = await star.runtimes.getRuntime({
|
|
460
|
+
id: '<id>'
|
|
461
|
+
});
|
|
462
|
+
if (isError) throw new Error(message);
|
|
463
|
+
console.log(result);
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
Example response:
|
|
467
|
+
|
|
468
|
+
```json
|
|
469
|
+
{
|
|
470
|
+
"isError": false,
|
|
471
|
+
"message": "",
|
|
472
|
+
"result": null
|
|
473
|
+
}
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
### `getRuntimeStatus`
|
|
479
|
+
|
|
480
|
+
**GET** `api/runtimes/{id}/status`
|
|
481
|
+
|
|
482
|
+
Route parameters:
|
|
483
|
+
|
|
484
|
+
| Field | Type |
|
|
485
|
+
| --- | --- |
|
|
486
|
+
| `id` | `Guid` |
|
|
487
|
+
|
|
488
|
+
**Request**
|
|
489
|
+
|
|
490
|
+
No request body.
|
|
491
|
+
|
|
492
|
+
**Response**
|
|
493
|
+
|
|
494
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
495
|
+
|
|
496
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
497
|
+
|
|
498
|
+
**Example**
|
|
499
|
+
|
|
500
|
+
```js
|
|
501
|
+
const { isError, message, result } = await star.runtimes.getRuntimeStatus({
|
|
502
|
+
id: '<id>'
|
|
503
|
+
});
|
|
504
|
+
if (isError) throw new Error(message);
|
|
505
|
+
console.log(result);
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Example response:
|
|
509
|
+
|
|
510
|
+
```json
|
|
511
|
+
{
|
|
512
|
+
"isError": false,
|
|
513
|
+
"message": "",
|
|
514
|
+
"result": null
|
|
515
|
+
}
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
### `getRuntimeVersions`
|
|
521
|
+
|
|
522
|
+
Gets all versions of a runtime.
|
|
523
|
+
|
|
524
|
+
**GET** `api/runtimes/{id}/versions`
|
|
525
|
+
|
|
526
|
+
Route parameters:
|
|
527
|
+
|
|
528
|
+
| Field | Type |
|
|
529
|
+
| --- | --- |
|
|
530
|
+
| `id` | `Guid` |
|
|
531
|
+
|
|
532
|
+
**Request**
|
|
533
|
+
|
|
534
|
+
No request body.
|
|
535
|
+
|
|
536
|
+
**Response**
|
|
537
|
+
|
|
538
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
539
|
+
|
|
540
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
541
|
+
|
|
542
|
+
**Example**
|
|
543
|
+
|
|
544
|
+
```js
|
|
545
|
+
const { isError, message, result } = await star.runtimes.getRuntimeVersions({
|
|
546
|
+
id: '<id>'
|
|
547
|
+
});
|
|
548
|
+
if (isError) throw new Error(message);
|
|
549
|
+
console.log(result);
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
Example response:
|
|
553
|
+
|
|
554
|
+
```json
|
|
555
|
+
{
|
|
556
|
+
"isError": false,
|
|
557
|
+
"message": "",
|
|
558
|
+
"result": null
|
|
559
|
+
}
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
---
|
|
563
|
+
|
|
564
|
+
### `getRuntimesByType`
|
|
565
|
+
|
|
566
|
+
**GET** `api/runtimes/by-type/{type}`
|
|
567
|
+
|
|
568
|
+
Route parameters:
|
|
569
|
+
|
|
570
|
+
| Field | Type |
|
|
571
|
+
| --- | --- |
|
|
572
|
+
| `type` | `string` |
|
|
573
|
+
|
|
574
|
+
**Request**
|
|
575
|
+
|
|
576
|
+
No request body.
|
|
577
|
+
|
|
578
|
+
**Response**
|
|
579
|
+
|
|
580
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
581
|
+
|
|
582
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
583
|
+
|
|
584
|
+
**Example**
|
|
585
|
+
|
|
586
|
+
```js
|
|
587
|
+
const { isError, message, result } = await star.runtimes.getRuntimesByType({
|
|
588
|
+
type: '<type>'
|
|
589
|
+
});
|
|
590
|
+
if (isError) throw new Error(message);
|
|
591
|
+
console.log(result);
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
Example response:
|
|
595
|
+
|
|
596
|
+
```json
|
|
597
|
+
{
|
|
598
|
+
"isError": false,
|
|
599
|
+
"message": "",
|
|
600
|
+
"result": null
|
|
601
|
+
}
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
### `loadAllRuntimesForAvatar`
|
|
607
|
+
|
|
608
|
+
Loads all runtimes for the current avatar.
|
|
609
|
+
|
|
610
|
+
**GET** `api/runtimes/load-all-for-avatar`
|
|
611
|
+
|
|
612
|
+
**Request**
|
|
613
|
+
|
|
614
|
+
No request body.
|
|
615
|
+
|
|
616
|
+
**Response**
|
|
617
|
+
|
|
618
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
619
|
+
|
|
620
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
621
|
+
|
|
622
|
+
**Example**
|
|
623
|
+
|
|
624
|
+
```js
|
|
625
|
+
const { isError, message, result } = await star.runtimes.loadAllRuntimesForAvatar({});
|
|
626
|
+
if (isError) throw new Error(message);
|
|
627
|
+
console.log(result);
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
Example response:
|
|
631
|
+
|
|
632
|
+
```json
|
|
633
|
+
{
|
|
634
|
+
"isError": false,
|
|
635
|
+
"message": "",
|
|
636
|
+
"result": null
|
|
637
|
+
}
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
### `loadRuntimeFromPath`
|
|
643
|
+
|
|
644
|
+
Loads a runtime from the specified path.
|
|
645
|
+
|
|
646
|
+
**GET** `api/runtimes/load-from-path`
|
|
647
|
+
|
|
648
|
+
**Request**
|
|
649
|
+
|
|
650
|
+
Query parameters:
|
|
651
|
+
|
|
652
|
+
| Field | Type |
|
|
653
|
+
| --- | --- |
|
|
654
|
+
| `path` | `string` |
|
|
655
|
+
|
|
656
|
+
**Response**
|
|
657
|
+
|
|
658
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
659
|
+
|
|
660
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
661
|
+
|
|
662
|
+
**Example**
|
|
663
|
+
|
|
664
|
+
```js
|
|
665
|
+
const { isError, message, result } = await star.runtimes.loadRuntimeFromPath({
|
|
666
|
+
path: 'example string'
|
|
667
|
+
});
|
|
668
|
+
if (isError) throw new Error(message);
|
|
669
|
+
console.log(result);
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
Example response:
|
|
673
|
+
|
|
674
|
+
```json
|
|
675
|
+
{
|
|
676
|
+
"isError": false,
|
|
677
|
+
"message": "",
|
|
678
|
+
"result": null
|
|
679
|
+
}
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
---
|
|
683
|
+
|
|
684
|
+
### `loadRuntimeFromPublished`
|
|
685
|
+
|
|
686
|
+
Loads a runtime from published sources.
|
|
687
|
+
|
|
688
|
+
**GET** `api/runtimes/load-from-published`
|
|
689
|
+
|
|
690
|
+
**Request**
|
|
691
|
+
|
|
692
|
+
Query parameters:
|
|
693
|
+
|
|
694
|
+
| Field | Type |
|
|
695
|
+
| --- | --- |
|
|
696
|
+
| `publishedFilePath` | `string` |
|
|
697
|
+
|
|
698
|
+
**Response**
|
|
699
|
+
|
|
700
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
701
|
+
|
|
702
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
703
|
+
|
|
704
|
+
**Example**
|
|
705
|
+
|
|
706
|
+
```js
|
|
707
|
+
const { isError, message, result } = await star.runtimes.loadRuntimeFromPublished({
|
|
708
|
+
publishedFilePath: 'example string'
|
|
709
|
+
});
|
|
710
|
+
if (isError) throw new Error(message);
|
|
711
|
+
console.log(result);
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
Example response:
|
|
715
|
+
|
|
716
|
+
```json
|
|
717
|
+
{
|
|
718
|
+
"isError": false,
|
|
719
|
+
"message": "",
|
|
720
|
+
"result": null
|
|
721
|
+
}
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
---
|
|
725
|
+
|
|
726
|
+
### `loadRuntimeVersion`
|
|
727
|
+
|
|
728
|
+
Loads a specific version of a runtime.
|
|
729
|
+
|
|
730
|
+
**GET** `api/runtimes/{id}/versions/{version}`
|
|
731
|
+
|
|
732
|
+
Route parameters:
|
|
733
|
+
|
|
734
|
+
| Field | Type |
|
|
735
|
+
| --- | --- |
|
|
736
|
+
| `id` | `Guid` |
|
|
737
|
+
| `version` | `string` |
|
|
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: `IActionResult` (not part of the request/response payload).
|
|
748
|
+
|
|
749
|
+
**Example**
|
|
750
|
+
|
|
751
|
+
```js
|
|
752
|
+
const { isError, message, result } = await star.runtimes.loadRuntimeVersion({
|
|
753
|
+
id: '<id>',
|
|
754
|
+
version: '<version>'
|
|
755
|
+
});
|
|
756
|
+
if (isError) throw new Error(message);
|
|
757
|
+
console.log(result);
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
Example response:
|
|
761
|
+
|
|
762
|
+
```json
|
|
763
|
+
{
|
|
764
|
+
"isError": false,
|
|
765
|
+
"message": "",
|
|
766
|
+
"result": null
|
|
767
|
+
}
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
### `publishRuntime`
|
|
773
|
+
|
|
774
|
+
Publishes a runtime to the STARNET system with optional cloud upload.
|
|
775
|
+
|
|
776
|
+
**POST** `api/runtimes/{id}/publish`
|
|
777
|
+
|
|
778
|
+
Route parameters:
|
|
779
|
+
|
|
780
|
+
| Field | Type |
|
|
781
|
+
| --- | --- |
|
|
782
|
+
| `id` | `Guid` |
|
|
783
|
+
|
|
784
|
+
**Request**
|
|
785
|
+
|
|
786
|
+
Body type: `PublishRequest`
|
|
787
|
+
|
|
788
|
+
| Field | Type |
|
|
789
|
+
| --- | --- |
|
|
790
|
+
| `SourcePath` | `string` |
|
|
791
|
+
| `LaunchTarget` | `string` |
|
|
792
|
+
| `PublishPath` | `string` |
|
|
793
|
+
| `Edit` | `bool` |
|
|
794
|
+
| `RegisterOnSTARNET` | `bool` |
|
|
795
|
+
| `GenerateBinary` | `bool` |
|
|
796
|
+
| `UploadToCloud` | `bool` |
|
|
797
|
+
|
|
798
|
+
**Response**
|
|
799
|
+
|
|
800
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
801
|
+
|
|
802
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
803
|
+
|
|
804
|
+
**Example**
|
|
805
|
+
|
|
806
|
+
```js
|
|
807
|
+
const { isError, message, result } = await star.runtimes.publishRuntime({
|
|
808
|
+
id: '<id>',
|
|
809
|
+
sourcePath: "example string",
|
|
810
|
+
launchTarget: "example string",
|
|
811
|
+
publishPath: "example string",
|
|
812
|
+
edit: true,
|
|
813
|
+
registerOnSTARNET: true,
|
|
814
|
+
generateBinary: true,
|
|
815
|
+
uploadToCloud: true
|
|
816
|
+
});
|
|
817
|
+
if (isError) throw new Error(message);
|
|
818
|
+
console.log(result);
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
Example response:
|
|
822
|
+
|
|
823
|
+
```json
|
|
824
|
+
{
|
|
825
|
+
"isError": false,
|
|
826
|
+
"message": "",
|
|
827
|
+
"result": null
|
|
828
|
+
}
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
---
|
|
832
|
+
|
|
833
|
+
### `republishRuntime`
|
|
834
|
+
|
|
835
|
+
Republishes a runtime to the STARNET system.
|
|
836
|
+
|
|
837
|
+
**POST** `api/runtimes/{id}/republish`
|
|
838
|
+
|
|
839
|
+
Route parameters:
|
|
840
|
+
|
|
841
|
+
| Field | Type |
|
|
842
|
+
| --- | --- |
|
|
843
|
+
| `id` | `Guid` |
|
|
844
|
+
|
|
845
|
+
**Request**
|
|
846
|
+
|
|
847
|
+
Body type: `PublishRequest`
|
|
848
|
+
|
|
849
|
+
| Field | Type |
|
|
850
|
+
| --- | --- |
|
|
851
|
+
| `SourcePath` | `string` |
|
|
852
|
+
| `LaunchTarget` | `string` |
|
|
853
|
+
| `PublishPath` | `string` |
|
|
854
|
+
| `Edit` | `bool` |
|
|
855
|
+
| `RegisterOnSTARNET` | `bool` |
|
|
856
|
+
| `GenerateBinary` | `bool` |
|
|
857
|
+
| `UploadToCloud` | `bool` |
|
|
858
|
+
|
|
859
|
+
**Response**
|
|
860
|
+
|
|
861
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
862
|
+
|
|
863
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
864
|
+
|
|
865
|
+
**Example**
|
|
866
|
+
|
|
867
|
+
```js
|
|
868
|
+
const { isError, message, result } = await star.runtimes.republishRuntime({
|
|
869
|
+
id: '<id>',
|
|
870
|
+
sourcePath: "example string",
|
|
871
|
+
launchTarget: "example string",
|
|
872
|
+
publishPath: "example string",
|
|
873
|
+
edit: true,
|
|
874
|
+
registerOnSTARNET: true,
|
|
875
|
+
generateBinary: true,
|
|
876
|
+
uploadToCloud: true
|
|
877
|
+
});
|
|
878
|
+
if (isError) throw new Error(message);
|
|
879
|
+
console.log(result);
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
Example response:
|
|
883
|
+
|
|
884
|
+
```json
|
|
885
|
+
{
|
|
886
|
+
"isError": false,
|
|
887
|
+
"message": "",
|
|
888
|
+
"result": null
|
|
889
|
+
}
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
---
|
|
893
|
+
|
|
894
|
+
### `searchRuntimes`
|
|
895
|
+
|
|
896
|
+
**GET** `api/runtimes/search`
|
|
897
|
+
|
|
898
|
+
**Request**
|
|
899
|
+
|
|
900
|
+
Query parameters:
|
|
901
|
+
|
|
902
|
+
| Field | Type |
|
|
903
|
+
| --- | --- |
|
|
904
|
+
| `searchTerm` | `string` |
|
|
905
|
+
|
|
906
|
+
**Response**
|
|
907
|
+
|
|
908
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
909
|
+
|
|
910
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
911
|
+
|
|
912
|
+
**Example**
|
|
913
|
+
|
|
914
|
+
```js
|
|
915
|
+
const { isError, message, result } = await star.runtimes.searchRuntimes({
|
|
916
|
+
searchTerm: 'example string'
|
|
917
|
+
});
|
|
918
|
+
if (isError) throw new Error(message);
|
|
919
|
+
console.log(result);
|
|
920
|
+
```
|
|
921
|
+
|
|
922
|
+
Example response:
|
|
923
|
+
|
|
924
|
+
```json
|
|
925
|
+
{
|
|
926
|
+
"isError": false,
|
|
927
|
+
"message": "",
|
|
928
|
+
"result": null
|
|
929
|
+
}
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
---
|
|
933
|
+
|
|
934
|
+
### `startRuntime`
|
|
935
|
+
|
|
936
|
+
**POST** `api/runtimes/{id}/start`
|
|
937
|
+
|
|
938
|
+
Route parameters:
|
|
939
|
+
|
|
940
|
+
| Field | Type |
|
|
941
|
+
| --- | --- |
|
|
942
|
+
| `id` | `Guid` |
|
|
943
|
+
|
|
944
|
+
**Request**
|
|
945
|
+
|
|
946
|
+
No request body.
|
|
947
|
+
|
|
948
|
+
**Response**
|
|
949
|
+
|
|
950
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
951
|
+
|
|
952
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
953
|
+
|
|
954
|
+
**Example**
|
|
955
|
+
|
|
956
|
+
```js
|
|
957
|
+
const { isError, message, result } = await star.runtimes.startRuntime({
|
|
958
|
+
id: '<id>'
|
|
959
|
+
});
|
|
960
|
+
if (isError) throw new Error(message);
|
|
961
|
+
console.log(result);
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
Example response:
|
|
965
|
+
|
|
966
|
+
```json
|
|
967
|
+
{
|
|
968
|
+
"isError": false,
|
|
969
|
+
"message": "",
|
|
970
|
+
"result": null
|
|
971
|
+
}
|
|
972
|
+
```
|
|
973
|
+
|
|
974
|
+
---
|
|
975
|
+
|
|
976
|
+
### `stopRuntime`
|
|
977
|
+
|
|
978
|
+
**POST** `api/runtimes/{id}/stop`
|
|
979
|
+
|
|
980
|
+
Route parameters:
|
|
981
|
+
|
|
982
|
+
| Field | Type |
|
|
983
|
+
| --- | --- |
|
|
984
|
+
| `id` | `Guid` |
|
|
985
|
+
|
|
986
|
+
**Request**
|
|
987
|
+
|
|
988
|
+
No request body.
|
|
989
|
+
|
|
990
|
+
**Response**
|
|
991
|
+
|
|
992
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
993
|
+
|
|
994
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
995
|
+
|
|
996
|
+
**Example**
|
|
997
|
+
|
|
998
|
+
```js
|
|
999
|
+
const { isError, message, result } = await star.runtimes.stopRuntime({
|
|
1000
|
+
id: '<id>'
|
|
1001
|
+
});
|
|
1002
|
+
if (isError) throw new Error(message);
|
|
1003
|
+
console.log(result);
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
Example response:
|
|
1007
|
+
|
|
1008
|
+
```json
|
|
1009
|
+
{
|
|
1010
|
+
"isError": false,
|
|
1011
|
+
"message": "",
|
|
1012
|
+
"result": null
|
|
1013
|
+
}
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
---
|
|
1017
|
+
|
|
1018
|
+
### `unpublishRuntime`
|
|
1019
|
+
|
|
1020
|
+
Unpublishes a runtime from the STARNET system.
|
|
1021
|
+
|
|
1022
|
+
**POST** `api/runtimes/{id}/unpublish`
|
|
1023
|
+
|
|
1024
|
+
Route parameters:
|
|
1025
|
+
|
|
1026
|
+
| Field | Type |
|
|
1027
|
+
| --- | --- |
|
|
1028
|
+
| `id` | `Guid` |
|
|
1029
|
+
|
|
1030
|
+
**Request**
|
|
1031
|
+
|
|
1032
|
+
No request body.
|
|
1033
|
+
|
|
1034
|
+
**Response**
|
|
1035
|
+
|
|
1036
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1037
|
+
|
|
1038
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
1039
|
+
|
|
1040
|
+
**Example**
|
|
1041
|
+
|
|
1042
|
+
```js
|
|
1043
|
+
const { isError, message, result } = await star.runtimes.unpublishRuntime({
|
|
1044
|
+
id: '<id>'
|
|
1045
|
+
});
|
|
1046
|
+
if (isError) throw new Error(message);
|
|
1047
|
+
console.log(result);
|
|
1048
|
+
```
|
|
1049
|
+
|
|
1050
|
+
Example response:
|
|
1051
|
+
|
|
1052
|
+
```json
|
|
1053
|
+
{
|
|
1054
|
+
"isError": false,
|
|
1055
|
+
"message": "",
|
|
1056
|
+
"result": null
|
|
1057
|
+
}
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
---
|
|
1061
|
+
|
|
1062
|
+
### `updateRuntime`
|
|
1063
|
+
|
|
1064
|
+
**PUT** `api/runtimes/{id}`
|
|
1065
|
+
|
|
1066
|
+
Route parameters:
|
|
1067
|
+
|
|
1068
|
+
| Field | Type |
|
|
1069
|
+
| --- | --- |
|
|
1070
|
+
| `id` | `Guid` |
|
|
1071
|
+
|
|
1072
|
+
**Request**
|
|
1073
|
+
|
|
1074
|
+
Body type: `UpdateRuntimeRequest`
|
|
1075
|
+
|
|
1076
|
+
| Field | Type |
|
|
1077
|
+
| --- | --- |
|
|
1078
|
+
| `Name` | `string?` |
|
|
1079
|
+
| `Description` | `string?` |
|
|
1080
|
+
| `Category` | `string?` |
|
|
1081
|
+
| `Version` | `string?` |
|
|
1082
|
+
|
|
1083
|
+
**Response**
|
|
1084
|
+
|
|
1085
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1086
|
+
|
|
1087
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
1088
|
+
|
|
1089
|
+
**Example**
|
|
1090
|
+
|
|
1091
|
+
```js
|
|
1092
|
+
const { isError, message, result } = await star.runtimes.updateRuntime({
|
|
1093
|
+
id: '<id>',
|
|
1094
|
+
name: "example string",
|
|
1095
|
+
description: "example string",
|
|
1096
|
+
category: "example string",
|
|
1097
|
+
version: "example string"
|
|
1098
|
+
});
|
|
1099
|
+
if (isError) throw new Error(message);
|
|
1100
|
+
console.log(result);
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
Example response:
|
|
1104
|
+
|
|
1105
|
+
```json
|
|
1106
|
+
{
|
|
1107
|
+
"isError": false,
|
|
1108
|
+
"message": "",
|
|
1109
|
+
"result": null
|
|
1110
|
+
}
|
|
1111
|
+
```
|
|
1112
|
+
|