wf_node_api 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +22 -18
- data/Gemfile.lock +3 -3
- data/LICENSE +19 -340
- data/Vagrantfile +28 -23
- data/_docs/api/Api.html +22 -18
- data/_docs/api/Api/NodeApi.html +1 -1
- data/_docs/api/ConfigCheck.html +34 -30
- data/_docs/api/ContainerManager.html +176 -77
- data/_docs/api/ContainerManagerAdapter.html +22 -18
- data/_docs/api/ContainerManagerAdapter/Lxc.html +169 -58
- data/_docs/api/ContainerManagerAdapter/Vserver.html +169 -58
- data/_docs/api/NotFoundError.html +22 -18
- data/_docs/api/OS.html +26 -22
- data/_docs/api/ResourceManager.html +11 -11
- data/_docs/api/ResourceManagerAdapter.html +22 -18
- data/_docs/api/ResourceManagerAdapter/Linux.html +13 -13
- data/_docs/api/WfNodeApi.html +23 -19
- data/_docs/api/_index.html +1 -1
- data/_docs/api/file.README.html +96 -66
- data/_docs/api/index.html +96 -66
- data/_docs/api/method_list.html +60 -42
- data/_docs/api/top-level-namespace.html +7 -7
- data/_docs/rest/api_data.js +934 -1
- data/_docs/rest/api_data.json +934 -1
- data/_docs/rest/api_project.js +31 -1
- data/_docs/rest/api_project.json +31 -1
- data/bin/wf_node_api +25 -21
- data/lib/wf_node_api.rb +25 -21
- data/lib/wf_node_api/api/node_api.rb +36 -27
- data/lib/wf_node_api/config/config_template.erb +36 -4
- data/lib/wf_node_api/config_check.rb +25 -21
- data/lib/wf_node_api/container_manager.rb +34 -22
- data/lib/wf_node_api/container_manager_adapter/lxc.rb +43 -25
- data/lib/wf_node_api/container_manager_adapter/vserver.rb +45 -27
- data/lib/wf_node_api/error/not_found.rb +22 -18
- data/lib/wf_node_api/os.rb +22 -18
- data/lib/wf_node_api/resource_manager.rb +24 -20
- data/lib/wf_node_api/resource_manager_adapter/linux.rb +25 -21
- data/lib/wf_node_api/translations.rb +22 -18
- data/lib/wf_node_api/version.rb +22 -18
- data/wf-node-api.gemspec +26 -22
- metadata +4 -3
data/_docs/rest/api_data.json
CHANGED
@@ -1 +1,934 @@
|
|
1
|
-
[
|
2
1
|
{
|
3
2
|
"type": "post",
|
4
3
|
"url": "/containers",
|
5
4
|
"title": "Create a container",
|
6
5
|
"version": "0.8.0",
|
7
6
|
"name": "CreateContainer",
|
8
7
|
"group": "Container",
|
9
8
|
"description": "<p>Creates a container. Returns 201 on success!</p> ",
|
10
9
|
"header": {
|
11
10
|
"fields": {
|
12
11
|
"Header": [
|
13
12
|
{
|
14
13
|
"group": "Header",
|
15
14
|
"type": "String",
|
16
15
|
"optional": false,
|
17
16
|
"field": "X-Api-Token",
|
18
17
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
19
18
|
}
|
20
19
|
]
|
21
20
|
}
|
22
21
|
},
|
23
22
|
"parameter": {
|
24
23
|
"fields": {
|
25
24
|
"Parameter": [
|
26
25
|
{
|
27
26
|
"group": "Parameter",
|
28
27
|
"type": "<p>String</p> ",
|
29
28
|
"optional": false,
|
30
29
|
"field": "name",
|
31
30
|
"description": "<p>Name of the container (must be unique per node)</p> "
|
32
31
|
},
|
33
32
|
{
|
34
33
|
"group": "Parameter",
|
35
34
|
"type": "<p>String</p> ",
|
36
35
|
"optional": false,
|
37
36
|
"field": "ip_address",
|
38
37
|
"description": "<p>Valid IPv4 address</p> "
|
39
38
|
},
|
40
39
|
{
|
41
40
|
"group": "Parameter",
|
42
41
|
"type": "<p>Integer</p> ",
|
43
42
|
"optional": false,
|
44
43
|
"field": "disk_size_gb",
|
45
44
|
"description": "<p>Container disk size in GB</p> "
|
46
45
|
},
|
47
46
|
{
|
48
47
|
"group": "Parameter",
|
49
48
|
"type": "<p>Integer</p> ",
|
50
49
|
"optional": false,
|
51
50
|
"field": "memory_limit_mb",
|
52
51
|
"description": "<p>Memory limt in MB</p> "
|
53
52
|
},
|
54
53
|
{
|
55
54
|
"group": "Parameter",
|
56
55
|
"type": "<p>Integer</p> ",
|
57
56
|
"optional": false,
|
58
57
|
"field": "cpu_core_count",
|
59
58
|
"description": "<p>Amount of Vcores assigned to the container</p> "
|
60
59
|
}
|
61
60
|
]
|
62
61
|
}
|
63
62
|
},
|
64
63
|
"success": {
|
65
64
|
"fields": {
|
66
65
|
"Success 200": [
|
67
66
|
{
|
68
67
|
"group": "Success 200",
|
69
68
|
"type": "<p>String</p> ",
|
70
69
|
"optional": false,
|
71
70
|
"field": "success",
|
72
71
|
"description": "<p>Success message</p> "
|
73
72
|
},
|
74
73
|
{
|
75
74
|
"group": "Success 200",
|
76
75
|
"type": "<p>String</p> ",
|
77
76
|
"optional": false,
|
78
77
|
"field": "output",
|
79
78
|
"description": "<p>STDOUT from container creation</p> "
|
80
79
|
}
|
81
80
|
]
|
82
81
|
}
|
83
82
|
},
|
84
83
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
85
84
|
"groupTitle": "Container",
|
86
85
|
"error": {
|
87
86
|
"fields": {
|
88
87
|
"Unauthorized 401": [
|
89
88
|
{
|
90
89
|
"group": "Unauthorized 401",
|
91
90
|
"optional": false,
|
92
91
|
"field": "error",
|
93
92
|
"description": "<p>No valid API token was supplied</p> "
|
94
93
|
}
|
95
94
|
],
|
96
95
|
"Bad Request 400": [
|
97
96
|
{
|
98
97
|
"group": "Bad Request 400",
|
99
98
|
"optional": false,
|
100
99
|
"field": "error",
|
101
100
|
"description": "<p>Invalid arguments supplied</p> "
|
102
101
|
}
|
103
102
|
],
|
104
103
|
"Internal Server Error 500": [
|
105
104
|
{
|
106
105
|
"group": "Internal Server Error 500",
|
107
106
|
"optional": false,
|
108
107
|
"field": "error",
|
109
108
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
110
109
|
}
|
111
110
|
]
|
112
111
|
},
|
113
112
|
"examples": [
|
114
113
|
{
|
115
114
|
"title": "401 Unauthorized",
|
116
115
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
117
116
|
"type": "json"
|
118
117
|
},
|
119
118
|
{
|
120
119
|
"title": "400 Bad Request",
|
121
120
|
"content": "HTTP/1.1 400 Bad Request\n{\n \"error\": \"The supplied container name is invalid\"\n}",
|
122
121
|
"type": "json"
|
123
122
|
},
|
124
123
|
{
|
125
124
|
"title": "500 Internal Server Error",
|
126
125
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
127
126
|
"type": "json"
|
128
127
|
}
|
129
128
|
]
|
130
129
|
}
|
131
130
|
},
|
132
131
|
{
|
133
132
|
"type": "delete",
|
134
133
|
"url": "/containers/:name",
|
135
134
|
"title": "Delete a container",
|
136
135
|
"version": "0.8.0",
|
137
136
|
"name": "DeleteContainer",
|
138
137
|
"group": "Container",
|
139
138
|
"description": "<p>Deletes a container if it exists.</p> ",
|
140
139
|
"header": {
|
141
140
|
"fields": {
|
142
141
|
"Header": [
|
143
142
|
{
|
144
143
|
"group": "Header",
|
145
144
|
"type": "String",
|
146
145
|
"optional": false,
|
147
146
|
"field": "X-Api-Token",
|
148
147
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
149
148
|
}
|
150
149
|
]
|
151
150
|
}
|
152
151
|
},
|
153
152
|
"parameter": {
|
154
153
|
"fields": {
|
155
154
|
"Parameter": [
|
156
155
|
{
|
157
156
|
"group": "Parameter",
|
158
157
|
"type": "<p>String</p> ",
|
159
158
|
"optional": false,
|
160
159
|
"field": "name",
|
161
160
|
"description": "<p>Unique name of the container</p> "
|
162
161
|
}
|
163
162
|
]
|
164
163
|
}
|
165
164
|
},
|
166
165
|
"success": {
|
167
166
|
"fields": {
|
168
167
|
"Success 200": [
|
169
168
|
{
|
170
169
|
"group": "Success 200",
|
171
170
|
"type": "<p>String</p> ",
|
172
171
|
"optional": false,
|
173
172
|
"field": "success",
|
174
173
|
"description": "<p>Success message</p> "
|
175
174
|
},
|
176
175
|
{
|
177
176
|
"group": "Success 200",
|
178
177
|
"type": "<p>String</p> ",
|
179
178
|
"optional": false,
|
180
179
|
"field": "output",
|
181
180
|
"description": "<p>STDOUT from container deletion</p> "
|
182
181
|
}
|
183
182
|
]
|
184
183
|
}
|
185
184
|
},
|
186
185
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
187
186
|
"groupTitle": "Container",
|
188
187
|
"error": {
|
189
188
|
"fields": {
|
190
189
|
"Unauthorized 401": [
|
191
190
|
{
|
192
191
|
"group": "Unauthorized 401",
|
193
192
|
"optional": false,
|
194
193
|
"field": "error",
|
195
194
|
"description": "<p>No valid API token was supplied</p> "
|
196
195
|
}
|
197
196
|
],
|
198
197
|
"Not Found 404": [
|
199
198
|
{
|
200
199
|
"group": "Not Found 404",
|
201
200
|
"optional": false,
|
202
201
|
"field": "error",
|
203
202
|
"description": "<p>Object was not found</p> "
|
204
203
|
}
|
205
204
|
],
|
206
205
|
"Internal Server Error 500": [
|
207
206
|
{
|
208
207
|
"group": "Internal Server Error 500",
|
209
208
|
"optional": false,
|
210
209
|
"field": "error",
|
211
210
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
212
211
|
}
|
213
212
|
]
|
214
213
|
},
|
215
214
|
"examples": [
|
216
215
|
{
|
217
216
|
"title": "401 Unauthorized",
|
218
217
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
219
218
|
"type": "json"
|
220
219
|
},
|
221
220
|
{
|
222
221
|
"title": "404 Not Found",
|
223
222
|
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
224
223
|
"type": "json"
|
225
224
|
},
|
226
225
|
{
|
227
226
|
"title": "500 Internal Server Error",
|
228
227
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
229
228
|
"type": "json"
|
230
229
|
}
|
231
230
|
]
|
232
231
|
}
|
233
232
|
},
|
234
233
|
{
|
235
234
|
"type": "get",
|
236
235
|
"url": "/containers/:name",
|
237
236
|
"title": "Request container by its name",
|
238
237
|
"version": "0.8.0",
|
239
238
|
"name": "GetContainer",
|
240
239
|
"group": "Container",
|
241
240
|
"description": "<p>Returns information on a specific container</p> ",
|
242
241
|
"header": {
|
243
242
|
"fields": {
|
244
243
|
"Header": [
|
245
244
|
{
|
246
245
|
"group": "Header",
|
247
246
|
"type": "String",
|
248
247
|
"optional": false,
|
249
248
|
"field": "X-Api-Token",
|
250
249
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
251
250
|
}
|
252
251
|
]
|
253
252
|
}
|
254
253
|
},
|
255
254
|
"parameter": {
|
256
255
|
"fields": {
|
257
256
|
"Parameter": [
|
258
257
|
{
|
259
258
|
"group": "Parameter",
|
260
259
|
"type": "<p>String</p> ",
|
261
260
|
"optional": false,
|
262
261
|
"field": "name",
|
263
262
|
"description": "<p>Unique name of the container</p> "
|
264
263
|
}
|
265
264
|
]
|
266
265
|
}
|
267
266
|
},
|
268
267
|
"success": {
|
269
268
|
"fields": {
|
270
269
|
"Success 200": [
|
271
270
|
{
|
272
271
|
"group": "Success 200",
|
273
272
|
"type": "<p>String</p> ",
|
274
273
|
"optional": false,
|
275
274
|
"field": "name",
|
276
275
|
"description": "<p>Name of the container</p> "
|
277
276
|
},
|
278
277
|
{
|
279
278
|
"group": "Success 200",
|
280
279
|
"type": "<p>String</p> ",
|
281
280
|
"optional": false,
|
282
281
|
"field": "state",
|
283
282
|
"description": "<p>State of the container (either 'RUNNING' or 'STOPPED')</p> "
|
284
283
|
},
|
285
284
|
{
|
286
285
|
"group": "Success 200",
|
287
286
|
"type": "<p>String</p> ",
|
288
287
|
"optional": false,
|
289
288
|
"field": "ip_address",
|
290
289
|
"description": "<p>IP address assigned to the container</p> "
|
291
290
|
},
|
292
291
|
{
|
293
292
|
"group": "Success 200",
|
294
293
|
"type": "<p>Integer</p> ",
|
295
294
|
"optional": false,
|
296
295
|
"field": "cpu_cores",
|
297
296
|
"description": "<p>Number of Vcores</p> "
|
298
297
|
},
|
299
298
|
{
|
300
299
|
"group": "Success 200",
|
301
300
|
"type": "<p>Integer</p> ",
|
302
301
|
"optional": false,
|
303
302
|
"field": "memory_limit_bytes",
|
304
303
|
"description": "<p>Memory limit in bytes</p> "
|
305
304
|
},
|
306
305
|
{
|
307
306
|
"group": "Success 200",
|
308
307
|
"type": "<p>Integer</p> ",
|
309
308
|
"optional": false,
|
310
309
|
"field": "memory_usage_bytes",
|
311
310
|
"description": "<p>Current amount of memory usage in bytes</p> "
|
312
311
|
},
|
313
312
|
{
|
314
313
|
"group": "Success 200",
|
315
314
|
"type": "<p>Integer</p> ",
|
316
315
|
"optional": false,
|
317
316
|
"field": "disk_space_gb",
|
318
317
|
"description": "<p>Available disk space in GB</p> "
|
319
318
|
},
|
320
319
|
{
|
321
320
|
"group": "Success 200",
|
322
321
|
"type": "<p>Integer</p> ",
|
323
322
|
"optional": false,
|
324
323
|
"field": "disk_usage_gb",
|
325
324
|
"description": "<p>Current amount of disk usage in GB</p> "
|
326
325
|
},
|
327
326
|
{
|
328
327
|
"group": "Success 200",
|
329
328
|
"type": "<p>String</p> ",
|
330
329
|
"optional": false,
|
331
330
|
"field": "container_type",
|
332
331
|
"description": "<p>Container type, could be either 'lxc' or 'vserver'</p> "
|
333
332
|
}
|
334
333
|
]
|
335
334
|
}
|
336
335
|
},
|
337
336
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
338
337
|
"groupTitle": "Container",
|
339
338
|
"error": {
|
340
339
|
"fields": {
|
341
340
|
"Unauthorized 401": [
|
342
341
|
{
|
343
342
|
"group": "Unauthorized 401",
|
344
343
|
"optional": false,
|
345
344
|
"field": "error",
|
346
345
|
"description": "<p>No valid API token was supplied</p> "
|
347
346
|
}
|
348
347
|
],
|
349
348
|
"Internal Server Error 500": [
|
350
349
|
{
|
351
350
|
"group": "Internal Server Error 500",
|
352
351
|
"optional": false,
|
353
352
|
"field": "error",
|
354
353
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
355
354
|
}
|
356
355
|
],
|
357
356
|
"Not Found 404": [
|
358
357
|
{
|
359
358
|
"group": "Not Found 404",
|
360
359
|
"optional": false,
|
361
360
|
"field": "error",
|
362
361
|
"description": "<p>Object was not found</p> "
|
363
362
|
}
|
364
363
|
]
|
365
364
|
},
|
366
365
|
"examples": [
|
367
366
|
{
|
368
367
|
"title": "401 Unauthorized",
|
369
368
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
370
369
|
"type": "json"
|
371
370
|
},
|
372
371
|
{
|
373
372
|
"title": "500 Internal Server Error",
|
374
373
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
375
374
|
"type": "json"
|
376
375
|
},
|
377
376
|
{
|
378
377
|
"title": "404 Not Found",
|
379
378
|
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
380
379
|
"type": "json"
|
381
380
|
}
|
382
381
|
]
|
383
382
|
}
|
384
383
|
},
|
385
384
|
{
|
386
385
|
"type": "get",
|
387
386
|
"url": "/containers",
|
388
387
|
"title": "Request container list",
|
389
388
|
"version": "0.8.0",
|
390
389
|
"name": "GetContainers",
|
391
390
|
"group": "Container",
|
392
391
|
"description": "<p>Returns an array of containers which are available on the node.</p> ",
|
393
392
|
"header": {
|
394
393
|
"fields": {
|
395
394
|
"Header": [
|
396
395
|
{
|
397
396
|
"group": "Header",
|
398
397
|
"type": "String",
|
399
398
|
"optional": false,
|
400
399
|
"field": "X-Api-Token",
|
401
400
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
402
401
|
}
|
403
402
|
]
|
404
403
|
}
|
405
404
|
},
|
406
405
|
"success": {
|
407
406
|
"fields": {
|
408
407
|
"Success 200": [
|
409
408
|
{
|
410
409
|
"group": "Success 200",
|
411
410
|
"type": "<p>Object[]</p> ",
|
412
411
|
"optional": false,
|
413
412
|
"field": "containers",
|
414
413
|
"description": "<p>List of available containers</p> "
|
415
414
|
},
|
416
415
|
{
|
417
416
|
"group": "Success 200",
|
418
417
|
"type": "<p>String</p> ",
|
419
418
|
"optional": false,
|
420
419
|
"field": "containers.name",
|
421
420
|
"description": "<p>Name of the container</p> "
|
422
421
|
},
|
423
422
|
{
|
424
423
|
"group": "Success 200",
|
425
424
|
"type": "<p>String</p> ",
|
426
425
|
"optional": false,
|
427
426
|
"field": "containers.state",
|
428
427
|
"description": "<p>State of the container (either 'RUNNING' or 'STOPPED')</p> "
|
429
428
|
},
|
430
429
|
{
|
431
430
|
"group": "Success 200",
|
432
431
|
"type": "<p>String</p> ",
|
433
432
|
"optional": false,
|
434
433
|
"field": "containers.ip_address",
|
435
434
|
"description": "<p>IP address assigned to the container</p> "
|
436
435
|
},
|
437
436
|
{
|
438
437
|
"group": "Success 200",
|
439
438
|
"type": "<p>Integer</p> ",
|
440
439
|
"optional": false,
|
441
440
|
"field": "containers.cpu_cores",
|
442
441
|
"description": "<p>Number of Vcores</p> "
|
443
442
|
},
|
444
443
|
{
|
445
444
|
"group": "Success 200",
|
446
445
|
"type": "<p>Integer</p> ",
|
447
446
|
"optional": false,
|
448
447
|
"field": "containers.memory_limit_bytes",
|
449
448
|
"description": "<p>Memory limit in bytes</p> "
|
450
449
|
},
|
451
450
|
{
|
452
451
|
"group": "Success 200",
|
453
452
|
"type": "<p>Integer</p> ",
|
454
453
|
"optional": false,
|
455
454
|
"field": "containers.memory_usage_bytes",
|
456
455
|
"description": "<p>Current amount of memory usage in bytes</p> "
|
457
456
|
},
|
458
457
|
{
|
459
458
|
"group": "Success 200",
|
460
459
|
"type": "<p>Integer</p> ",
|
461
460
|
"optional": false,
|
462
461
|
"field": "containers.disk_space_gb",
|
463
462
|
"description": "<p>Available disk space in GB</p> "
|
464
463
|
},
|
465
464
|
{
|
466
465
|
"group": "Success 200",
|
467
466
|
"type": "<p>Integer</p> ",
|
468
467
|
"optional": false,
|
469
468
|
"field": "containers.disk_usage_gb",
|
470
469
|
"description": "<p>Current amount of disk usage in GB</p> "
|
471
470
|
},
|
472
471
|
{
|
473
472
|
"group": "Success 200",
|
474
473
|
"type": "<p>String</p> ",
|
475
474
|
"optional": false,
|
476
475
|
"field": "containers.container_type",
|
477
476
|
"description": "<p>Container type, could be either 'lxc' or 'vserver'</p> "
|
478
477
|
}
|
479
478
|
]
|
480
479
|
}
|
481
480
|
},
|
482
481
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
483
482
|
"groupTitle": "Container",
|
484
483
|
"error": {
|
485
484
|
"fields": {
|
486
485
|
"Unauthorized 401": [
|
487
486
|
{
|
488
487
|
"group": "Unauthorized 401",
|
489
488
|
"optional": false,
|
490
489
|
"field": "error",
|
491
490
|
"description": "<p>No valid API token was supplied</p> "
|
492
491
|
}
|
493
492
|
],
|
494
493
|
"Internal Server Error 500": [
|
495
494
|
{
|
496
495
|
"group": "Internal Server Error 500",
|
497
496
|
"optional": false,
|
498
497
|
"field": "error",
|
499
498
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
500
499
|
}
|
501
500
|
]
|
502
501
|
},
|
503
502
|
"examples": [
|
504
503
|
{
|
505
504
|
"title": "401 Unauthorized",
|
506
505
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
507
506
|
"type": "json"
|
508
507
|
},
|
509
508
|
{
|
510
509
|
"title": "500 Internal Server Error",
|
511
510
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
512
511
|
"type": "json"
|
513
512
|
}
|
514
513
|
]
|
515
514
|
}
|
516
515
|
},
|
517
516
|
{
|
518
517
|
"type": "put",
|
519
518
|
"url": "/containers/:name/kill",
|
520
519
|
"title": "Kill a container",
|
521
520
|
"version": "0.8.0",
|
522
521
|
"name": "KillContainer",
|
523
522
|
"group": "Container",
|
524
523
|
"description": "<p>Kills a container if it exists. Does essentially the same as StopContainer but forces the container to shut down and does not care about processes running on it.</p> ",
|
525
524
|
"header": {
|
526
525
|
"fields": {
|
527
526
|
"Header": [
|
528
527
|
{
|
529
528
|
"group": "Header",
|
530
529
|
"type": "String",
|
531
530
|
"optional": false,
|
532
531
|
"field": "X-Api-Token",
|
533
532
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
534
533
|
}
|
535
534
|
]
|
536
535
|
}
|
537
536
|
},
|
538
537
|
"parameter": {
|
539
538
|
"fields": {
|
540
539
|
"Parameter": [
|
541
540
|
{
|
542
541
|
"group": "Parameter",
|
543
542
|
"type": "<p>String</p> ",
|
544
543
|
"optional": false,
|
545
544
|
"field": "name",
|
546
545
|
"description": "<p>Unique name of the container</p> "
|
547
546
|
}
|
548
547
|
]
|
549
548
|
}
|
550
549
|
},
|
551
550
|
"success": {
|
552
551
|
"fields": {
|
553
552
|
"Success 200": [
|
554
553
|
{
|
555
554
|
"group": "Success 200",
|
556
555
|
"type": "<p>String</p> ",
|
557
556
|
"optional": false,
|
558
557
|
"field": "success",
|
559
558
|
"description": "<p>Success message</p> "
|
560
559
|
},
|
561
560
|
{
|
562
561
|
"group": "Success 200",
|
563
562
|
"type": "<p>String</p> ",
|
564
563
|
"optional": false,
|
565
564
|
"field": "output",
|
566
565
|
"description": "<p>STDOUT from container kill</p> "
|
567
566
|
}
|
568
567
|
]
|
569
568
|
}
|
570
569
|
},
|
571
570
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
572
571
|
"groupTitle": "Container",
|
573
572
|
"error": {
|
574
573
|
"fields": {
|
575
574
|
"Unauthorized 401": [
|
576
575
|
{
|
577
576
|
"group": "Unauthorized 401",
|
578
577
|
"optional": false,
|
579
578
|
"field": "error",
|
580
579
|
"description": "<p>No valid API token was supplied</p> "
|
581
580
|
}
|
582
581
|
],
|
583
582
|
"Not Found 404": [
|
584
583
|
{
|
585
584
|
"group": "Not Found 404",
|
586
585
|
"optional": false,
|
587
586
|
"field": "error",
|
588
587
|
"description": "<p>Object was not found</p> "
|
589
588
|
}
|
590
589
|
],
|
591
590
|
"Internal Server Error 500": [
|
592
591
|
{
|
593
592
|
"group": "Internal Server Error 500",
|
594
593
|
"optional": false,
|
595
594
|
"field": "error",
|
596
595
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
597
596
|
}
|
598
597
|
]
|
599
598
|
},
|
600
599
|
"examples": [
|
601
600
|
{
|
602
601
|
"title": "401 Unauthorized",
|
603
602
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
604
603
|
"type": "json"
|
605
604
|
},
|
606
605
|
{
|
607
606
|
"title": "404 Not Found",
|
608
607
|
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
609
608
|
"type": "json"
|
610
609
|
},
|
611
610
|
{
|
612
611
|
"title": "500 Internal Server Error",
|
613
612
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
614
613
|
"type": "json"
|
615
614
|
}
|
616
615
|
]
|
617
616
|
}
|
618
617
|
},
|
619
618
|
{
|
620
619
|
"type": "put",
|
621
620
|
"url": "/containers/:name/start",
|
622
621
|
"title": "Start a container",
|
623
622
|
"version": "0.8.0",
|
624
623
|
"name": "StartContainer",
|
625
624
|
"group": "Container",
|
626
625
|
"description": "<p>Starts a container if it exists</p> ",
|
627
626
|
"header": {
|
628
627
|
"fields": {
|
629
628
|
"Header": [
|
630
629
|
{
|
631
630
|
"group": "Header",
|
632
631
|
"type": "String",
|
633
632
|
"optional": false,
|
634
633
|
"field": "X-Api-Token",
|
635
634
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
636
635
|
}
|
637
636
|
]
|
638
637
|
}
|
639
638
|
},
|
640
639
|
"parameter": {
|
641
640
|
"fields": {
|
642
641
|
"Parameter": [
|
643
642
|
{
|
644
643
|
"group": "Parameter",
|
645
644
|
"type": "<p>String</p> ",
|
646
645
|
"optional": false,
|
647
646
|
"field": "name",
|
648
647
|
"description": "<p>Unique name of the container</p> "
|
649
648
|
}
|
650
649
|
]
|
651
650
|
}
|
652
651
|
},
|
653
652
|
"success": {
|
654
653
|
"fields": {
|
655
654
|
"Success 200": [
|
656
655
|
{
|
657
656
|
"group": "Success 200",
|
658
657
|
"type": "<p>String</p> ",
|
659
658
|
"optional": false,
|
660
659
|
"field": "success",
|
661
660
|
"description": "<p>Success message</p> "
|
662
661
|
},
|
663
662
|
{
|
664
663
|
"group": "Success 200",
|
665
664
|
"type": "<p>String</p> ",
|
666
665
|
"optional": false,
|
667
666
|
"field": "output",
|
668
667
|
"description": "<p>STDOUT from container start</p> "
|
669
668
|
}
|
670
669
|
]
|
671
670
|
}
|
672
671
|
},
|
673
672
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
674
673
|
"groupTitle": "Container",
|
675
674
|
"error": {
|
676
675
|
"fields": {
|
677
676
|
"Unauthorized 401": [
|
678
677
|
{
|
679
678
|
"group": "Unauthorized 401",
|
680
679
|
"optional": false,
|
681
680
|
"field": "error",
|
682
681
|
"description": "<p>No valid API token was supplied</p> "
|
683
682
|
}
|
684
683
|
],
|
685
684
|
"Not Found 404": [
|
686
685
|
{
|
687
686
|
"group": "Not Found 404",
|
688
687
|
"optional": false,
|
689
688
|
"field": "error",
|
690
689
|
"description": "<p>Object was not found</p> "
|
691
690
|
}
|
692
691
|
],
|
693
692
|
"Internal Server Error 500": [
|
694
693
|
{
|
695
694
|
"group": "Internal Server Error 500",
|
696
695
|
"optional": false,
|
697
696
|
"field": "error",
|
698
697
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
699
698
|
}
|
700
699
|
]
|
701
700
|
},
|
702
701
|
"examples": [
|
703
702
|
{
|
704
703
|
"title": "401 Unauthorized",
|
705
704
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
706
705
|
"type": "json"
|
707
706
|
},
|
708
707
|
{
|
709
708
|
"title": "404 Not Found",
|
710
709
|
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
711
710
|
"type": "json"
|
712
711
|
},
|
713
712
|
{
|
714
713
|
"title": "500 Internal Server Error",
|
715
714
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
716
715
|
"type": "json"
|
717
716
|
}
|
718
717
|
]
|
719
718
|
}
|
720
719
|
},
|
721
720
|
{
|
722
721
|
"type": "put",
|
723
722
|
"url": "/containers/:name/stop",
|
724
723
|
"title": "Stop a container",
|
725
724
|
"version": "0.8.0",
|
726
725
|
"name": "StopContainer",
|
727
726
|
"group": "Container",
|
728
727
|
"description": "<p>Stops a container if it exists</p> ",
|
729
728
|
"header": {
|
730
729
|
"fields": {
|
731
730
|
"Header": [
|
732
731
|
{
|
733
732
|
"group": "Header",
|
734
733
|
"type": "String",
|
735
734
|
"optional": false,
|
736
735
|
"field": "X-Api-Token",
|
737
736
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
738
737
|
}
|
739
738
|
]
|
740
739
|
}
|
741
740
|
},
|
742
741
|
"parameter": {
|
743
742
|
"fields": {
|
744
743
|
"Parameter": [
|
745
744
|
{
|
746
745
|
"group": "Parameter",
|
747
746
|
"type": "<p>String</p> ",
|
748
747
|
"optional": false,
|
749
748
|
"field": "name",
|
750
749
|
"description": "<p>Unique name of the container</p> "
|
751
750
|
}
|
752
751
|
]
|
753
752
|
}
|
754
753
|
},
|
755
754
|
"success": {
|
756
755
|
"fields": {
|
757
756
|
"Success 200": [
|
758
757
|
{
|
759
758
|
"group": "Success 200",
|
760
759
|
"type": "<p>String</p> ",
|
761
760
|
"optional": false,
|
762
761
|
"field": "success",
|
763
762
|
"description": "<p>Success message</p> "
|
764
763
|
},
|
765
764
|
{
|
766
765
|
"group": "Success 200",
|
767
766
|
"type": "<p>String</p> ",
|
768
767
|
"optional": false,
|
769
768
|
"field": "output",
|
770
769
|
"description": "<p>STDOUT from container stop</p> "
|
771
770
|
}
|
772
771
|
]
|
773
772
|
}
|
774
773
|
},
|
775
774
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
776
775
|
"groupTitle": "Container",
|
777
776
|
"error": {
|
778
777
|
"fields": {
|
779
778
|
"Unauthorized 401": [
|
780
779
|
{
|
781
780
|
"group": "Unauthorized 401",
|
782
781
|
"optional": false,
|
783
782
|
"field": "error",
|
784
783
|
"description": "<p>No valid API token was supplied</p> "
|
785
784
|
}
|
786
785
|
],
|
787
786
|
"Not Found 404": [
|
788
787
|
{
|
789
788
|
"group": "Not Found 404",
|
790
789
|
"optional": false,
|
791
790
|
"field": "error",
|
792
791
|
"description": "<p>Object was not found</p> "
|
793
792
|
}
|
794
793
|
],
|
795
794
|
"Internal Server Error 500": [
|
796
795
|
{
|
797
796
|
"group": "Internal Server Error 500",
|
798
797
|
"optional": false,
|
799
798
|
"field": "error",
|
800
799
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
801
800
|
}
|
802
801
|
]
|
803
802
|
},
|
804
803
|
"examples": [
|
805
804
|
{
|
806
805
|
"title": "401 Unauthorized",
|
807
806
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
808
807
|
"type": "json"
|
809
808
|
},
|
810
809
|
{
|
811
810
|
"title": "404 Not Found",
|
812
811
|
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
813
812
|
"type": "json"
|
814
813
|
},
|
815
814
|
{
|
816
815
|
"title": "500 Internal Server Error",
|
817
816
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
818
817
|
"type": "json"
|
819
818
|
}
|
820
819
|
]
|
821
820
|
}
|
822
821
|
},
|
823
822
|
{
|
824
823
|
"type": "get",
|
825
824
|
"url": "/info",
|
826
825
|
"title": "Request node information",
|
827
826
|
"version": "0.8.0",
|
828
827
|
"name": "NodeInfo",
|
829
828
|
"group": "Node",
|
830
829
|
"description": "<p>Returns an array containing useful information about the node itself and the resources available on it.</p> ",
|
831
830
|
"header": {
|
832
831
|
"fields": {
|
833
832
|
"Header": [
|
834
833
|
{
|
835
834
|
"group": "Header",
|
836
835
|
"type": "String",
|
837
836
|
"optional": false,
|
838
837
|
"field": "X-Api-Token",
|
839
838
|
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
840
839
|
}
|
841
840
|
]
|
842
841
|
}
|
843
842
|
},
|
844
843
|
"success": {
|
845
844
|
"fields": {
|
846
845
|
"Success 200": [
|
847
846
|
{
|
848
847
|
"group": "Success 200",
|
849
848
|
"type": "<p>String</p> ",
|
850
849
|
"optional": false,
|
851
850
|
"field": "container_type",
|
852
851
|
"description": "<p>The configured container type (lxc or vserver)</p> "
|
853
852
|
},
|
854
853
|
{
|
855
854
|
"group": "Success 200",
|
856
855
|
"type": "<p>String</p> ",
|
857
856
|
"optional": false,
|
858
857
|
"field": "hostname",
|
859
858
|
"description": "<p>The hostname of the system</p> "
|
860
859
|
},
|
861
860
|
{
|
862
861
|
"group": "Success 200",
|
863
862
|
"type": "<p>String</p> ",
|
864
863
|
"optional": false,
|
865
864
|
"field": "api_version",
|
866
865
|
"description": "<p>The version number of the node api</p> "
|
867
866
|
},
|
868
867
|
{
|
869
868
|
"group": "Success 200",
|
870
869
|
"type": "<p>Integer</p> ",
|
871
870
|
"optional": false,
|
872
871
|
"field": "total_cpu_cores",
|
873
872
|
"description": "<p>The number of cpu cores available totally</p> "
|
874
873
|
},
|
875
874
|
{
|
876
875
|
"group": "Success 200",
|
877
876
|
"type": "<p>Integer</p> ",
|
878
877
|
"optional": false,
|
879
878
|
"field": "free_cpu_cores",
|
880
879
|
"description": "<p>The number of free cpu cores</p> "
|
881
880
|
}
|
882
881
|
]
|
883
882
|
}
|
884
883
|
},
|
885
884
|
"filename": "lib/wf_node_api/api/node_api.rb",
|
886
885
|
"groupTitle": "Node",
|
887
886
|
"error": {
|
888
887
|
"fields": {
|
889
888
|
"Unauthorized 401": [
|
890
889
|
{
|
891
890
|
"group": "Unauthorized 401",
|
892
891
|
"optional": false,
|
893
892
|
"field": "error",
|
894
893
|
"description": "<p>No valid API token was supplied</p> "
|
895
894
|
}
|
896
895
|
],
|
897
896
|
"Internal Server Error 500": [
|
898
897
|
{
|
899
898
|
"group": "Internal Server Error 500",
|
900
899
|
"optional": false,
|
901
900
|
"field": "error",
|
902
901
|
"description": "<p>The process could not be requested due to an internal error</p> "
|
903
902
|
}
|
904
903
|
]
|
905
904
|
},
|
906
905
|
"examples": [
|
907
906
|
{
|
908
907
|
"title": "401 Unauthorized",
|
909
908
|
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
910
909
|
"type": "json"
|
911
910
|
},
|
912
911
|
{
|
913
912
|
"title": "500 Internal Server Error",
|
914
913
|
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
915
914
|
"type": "json"
|
916
915
|
}
|
917
916
|
]
|
918
917
|
}
|
919
918
|
}
|
919
|
+
[
|
920
|
+
{
|
921
|
+
"type": "post",
|
922
|
+
"url": "/containers",
|
923
|
+
"title": "Create a container",
|
924
|
+
"version": "1.0.0",
|
925
|
+
"name": "CreateContainer",
|
926
|
+
"group": "Container",
|
927
|
+
"description": "<p>Creates a container. Returns 201 on success!</p> ",
|
928
|
+
"header": {
|
929
|
+
"fields": {
|
930
|
+
"Header": [
|
931
|
+
{
|
932
|
+
"group": "Header",
|
933
|
+
"type": "String",
|
934
|
+
"optional": false,
|
935
|
+
"field": "X-Api-Token",
|
936
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
937
|
+
}
|
938
|
+
]
|
939
|
+
}
|
940
|
+
},
|
941
|
+
"parameter": {
|
942
|
+
"fields": {
|
943
|
+
"Parameter": [
|
944
|
+
{
|
945
|
+
"group": "Parameter",
|
946
|
+
"type": "<p>String</p> ",
|
947
|
+
"optional": false,
|
948
|
+
"field": "name",
|
949
|
+
"description": "<p>Name of the container (must be unique per node)</p> "
|
950
|
+
},
|
951
|
+
{
|
952
|
+
"group": "Parameter",
|
953
|
+
"type": "<p>String</p> ",
|
954
|
+
"optional": false,
|
955
|
+
"field": "ip_address",
|
956
|
+
"description": "<p>Valid IPv4 address</p> "
|
957
|
+
},
|
958
|
+
{
|
959
|
+
"group": "Parameter",
|
960
|
+
"type": "<p>Integer</p> ",
|
961
|
+
"optional": false,
|
962
|
+
"field": "disk_size_gb",
|
963
|
+
"description": "<p>Container disk size in GB</p> "
|
964
|
+
},
|
965
|
+
{
|
966
|
+
"group": "Parameter",
|
967
|
+
"type": "<p>Integer</p> ",
|
968
|
+
"optional": false,
|
969
|
+
"field": "memory_limit_mb",
|
970
|
+
"description": "<p>Memory limt in MB</p> "
|
971
|
+
},
|
972
|
+
{
|
973
|
+
"group": "Parameter",
|
974
|
+
"type": "<p>Integer</p> ",
|
975
|
+
"optional": false,
|
976
|
+
"field": "cpu_core_count",
|
977
|
+
"description": "<p>Amount of Vcores assigned to the container</p> "
|
978
|
+
},
|
979
|
+
{
|
980
|
+
"group": "Parameter",
|
981
|
+
"type": "<p>String</p> ",
|
982
|
+
"optional": false,
|
983
|
+
"field": "template",
|
984
|
+
"description": "<p>Name of the template to use</p> "
|
985
|
+
}
|
986
|
+
]
|
987
|
+
}
|
988
|
+
},
|
989
|
+
"success": {
|
990
|
+
"fields": {
|
991
|
+
"Success 200": [
|
992
|
+
{
|
993
|
+
"group": "Success 200",
|
994
|
+
"type": "<p>String</p> ",
|
995
|
+
"optional": false,
|
996
|
+
"field": "success",
|
997
|
+
"description": "<p>Success message</p> "
|
998
|
+
},
|
999
|
+
{
|
1000
|
+
"group": "Success 200",
|
1001
|
+
"type": "<p>String</p> ",
|
1002
|
+
"optional": false,
|
1003
|
+
"field": "output",
|
1004
|
+
"description": "<p>STDOUT from container creation</p> "
|
1005
|
+
}
|
1006
|
+
]
|
1007
|
+
}
|
1008
|
+
},
|
1009
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1010
|
+
"groupTitle": "Container",
|
1011
|
+
"error": {
|
1012
|
+
"fields": {
|
1013
|
+
"Unauthorized 401": [
|
1014
|
+
{
|
1015
|
+
"group": "Unauthorized 401",
|
1016
|
+
"optional": false,
|
1017
|
+
"field": "error",
|
1018
|
+
"description": "<p>No valid API token was supplied</p> "
|
1019
|
+
}
|
1020
|
+
],
|
1021
|
+
"Bad Request 400": [
|
1022
|
+
{
|
1023
|
+
"group": "Bad Request 400",
|
1024
|
+
"optional": false,
|
1025
|
+
"field": "error",
|
1026
|
+
"description": "<p>Invalid arguments supplied</p> "
|
1027
|
+
}
|
1028
|
+
],
|
1029
|
+
"Internal Server Error 500": [
|
1030
|
+
{
|
1031
|
+
"group": "Internal Server Error 500",
|
1032
|
+
"optional": false,
|
1033
|
+
"field": "error",
|
1034
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1035
|
+
}
|
1036
|
+
]
|
1037
|
+
},
|
1038
|
+
"examples": [
|
1039
|
+
{
|
1040
|
+
"title": "401 Unauthorized",
|
1041
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1042
|
+
"type": "json"
|
1043
|
+
},
|
1044
|
+
{
|
1045
|
+
"title": "400 Bad Request",
|
1046
|
+
"content": "HTTP/1.1 400 Bad Request\n{\n \"error\": \"The supplied container name is invalid\"\n}",
|
1047
|
+
"type": "json"
|
1048
|
+
},
|
1049
|
+
{
|
1050
|
+
"title": "500 Internal Server Error",
|
1051
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1052
|
+
"type": "json"
|
1053
|
+
}
|
1054
|
+
]
|
1055
|
+
}
|
1056
|
+
},
|
1057
|
+
{
|
1058
|
+
"type": "delete",
|
1059
|
+
"url": "/containers/:name",
|
1060
|
+
"title": "Delete a container",
|
1061
|
+
"version": "1.0.0",
|
1062
|
+
"name": "DeleteContainer",
|
1063
|
+
"group": "Container",
|
1064
|
+
"description": "<p>Deletes a container if it exists.</p> ",
|
1065
|
+
"header": {
|
1066
|
+
"fields": {
|
1067
|
+
"Header": [
|
1068
|
+
{
|
1069
|
+
"group": "Header",
|
1070
|
+
"type": "String",
|
1071
|
+
"optional": false,
|
1072
|
+
"field": "X-Api-Token",
|
1073
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
1074
|
+
}
|
1075
|
+
]
|
1076
|
+
}
|
1077
|
+
},
|
1078
|
+
"parameter": {
|
1079
|
+
"fields": {
|
1080
|
+
"Parameter": [
|
1081
|
+
{
|
1082
|
+
"group": "Parameter",
|
1083
|
+
"type": "<p>String</p> ",
|
1084
|
+
"optional": false,
|
1085
|
+
"field": "name",
|
1086
|
+
"description": "<p>Unique name of the container</p> "
|
1087
|
+
}
|
1088
|
+
]
|
1089
|
+
}
|
1090
|
+
},
|
1091
|
+
"success": {
|
1092
|
+
"fields": {
|
1093
|
+
"Success 200": [
|
1094
|
+
{
|
1095
|
+
"group": "Success 200",
|
1096
|
+
"type": "<p>String</p> ",
|
1097
|
+
"optional": false,
|
1098
|
+
"field": "success",
|
1099
|
+
"description": "<p>Success message</p> "
|
1100
|
+
},
|
1101
|
+
{
|
1102
|
+
"group": "Success 200",
|
1103
|
+
"type": "<p>String</p> ",
|
1104
|
+
"optional": false,
|
1105
|
+
"field": "output",
|
1106
|
+
"description": "<p>STDOUT from container deletion</p> "
|
1107
|
+
}
|
1108
|
+
]
|
1109
|
+
}
|
1110
|
+
},
|
1111
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1112
|
+
"groupTitle": "Container",
|
1113
|
+
"error": {
|
1114
|
+
"fields": {
|
1115
|
+
"Unauthorized 401": [
|
1116
|
+
{
|
1117
|
+
"group": "Unauthorized 401",
|
1118
|
+
"optional": false,
|
1119
|
+
"field": "error",
|
1120
|
+
"description": "<p>No valid API token was supplied</p> "
|
1121
|
+
}
|
1122
|
+
],
|
1123
|
+
"Not Found 404": [
|
1124
|
+
{
|
1125
|
+
"group": "Not Found 404",
|
1126
|
+
"optional": false,
|
1127
|
+
"field": "error",
|
1128
|
+
"description": "<p>Object was not found</p> "
|
1129
|
+
}
|
1130
|
+
],
|
1131
|
+
"Internal Server Error 500": [
|
1132
|
+
{
|
1133
|
+
"group": "Internal Server Error 500",
|
1134
|
+
"optional": false,
|
1135
|
+
"field": "error",
|
1136
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1137
|
+
}
|
1138
|
+
]
|
1139
|
+
},
|
1140
|
+
"examples": [
|
1141
|
+
{
|
1142
|
+
"title": "401 Unauthorized",
|
1143
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1144
|
+
"type": "json"
|
1145
|
+
},
|
1146
|
+
{
|
1147
|
+
"title": "404 Not Found",
|
1148
|
+
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
1149
|
+
"type": "json"
|
1150
|
+
},
|
1151
|
+
{
|
1152
|
+
"title": "500 Internal Server Error",
|
1153
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1154
|
+
"type": "json"
|
1155
|
+
}
|
1156
|
+
]
|
1157
|
+
}
|
1158
|
+
},
|
1159
|
+
{
|
1160
|
+
"type": "get",
|
1161
|
+
"url": "/containers/:name",
|
1162
|
+
"title": "Request container by its name",
|
1163
|
+
"version": "1.0.0",
|
1164
|
+
"name": "GetContainer",
|
1165
|
+
"group": "Container",
|
1166
|
+
"description": "<p>Returns information on a specific container</p> ",
|
1167
|
+
"header": {
|
1168
|
+
"fields": {
|
1169
|
+
"Header": [
|
1170
|
+
{
|
1171
|
+
"group": "Header",
|
1172
|
+
"type": "String",
|
1173
|
+
"optional": false,
|
1174
|
+
"field": "X-Api-Token",
|
1175
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
1176
|
+
}
|
1177
|
+
]
|
1178
|
+
}
|
1179
|
+
},
|
1180
|
+
"parameter": {
|
1181
|
+
"fields": {
|
1182
|
+
"Parameter": [
|
1183
|
+
{
|
1184
|
+
"group": "Parameter",
|
1185
|
+
"type": "<p>String</p> ",
|
1186
|
+
"optional": false,
|
1187
|
+
"field": "name",
|
1188
|
+
"description": "<p>Unique name of the container</p> "
|
1189
|
+
}
|
1190
|
+
]
|
1191
|
+
}
|
1192
|
+
},
|
1193
|
+
"success": {
|
1194
|
+
"fields": {
|
1195
|
+
"Success 200": [
|
1196
|
+
{
|
1197
|
+
"group": "Success 200",
|
1198
|
+
"type": "<p>String</p> ",
|
1199
|
+
"optional": false,
|
1200
|
+
"field": "name",
|
1201
|
+
"description": "<p>Name of the container</p> "
|
1202
|
+
},
|
1203
|
+
{
|
1204
|
+
"group": "Success 200",
|
1205
|
+
"type": "<p>String</p> ",
|
1206
|
+
"optional": false,
|
1207
|
+
"field": "state",
|
1208
|
+
"description": "<p>State of the container (either 'RUNNING' or 'STOPPED')</p> "
|
1209
|
+
},
|
1210
|
+
{
|
1211
|
+
"group": "Success 200",
|
1212
|
+
"type": "<p>String</p> ",
|
1213
|
+
"optional": false,
|
1214
|
+
"field": "ip_address",
|
1215
|
+
"description": "<p>IP address assigned to the container</p> "
|
1216
|
+
},
|
1217
|
+
{
|
1218
|
+
"group": "Success 200",
|
1219
|
+
"type": "<p>Integer</p> ",
|
1220
|
+
"optional": false,
|
1221
|
+
"field": "cpu_cores",
|
1222
|
+
"description": "<p>Number of Vcores</p> "
|
1223
|
+
},
|
1224
|
+
{
|
1225
|
+
"group": "Success 200",
|
1226
|
+
"type": "<p>Integer</p> ",
|
1227
|
+
"optional": false,
|
1228
|
+
"field": "memory_limit_bytes",
|
1229
|
+
"description": "<p>Memory limit in bytes</p> "
|
1230
|
+
},
|
1231
|
+
{
|
1232
|
+
"group": "Success 200",
|
1233
|
+
"type": "<p>Integer</p> ",
|
1234
|
+
"optional": false,
|
1235
|
+
"field": "memory_usage_bytes",
|
1236
|
+
"description": "<p>Current amount of memory usage in bytes</p> "
|
1237
|
+
},
|
1238
|
+
{
|
1239
|
+
"group": "Success 200",
|
1240
|
+
"type": "<p>Integer</p> ",
|
1241
|
+
"optional": false,
|
1242
|
+
"field": "disk_space_gb",
|
1243
|
+
"description": "<p>Available disk space in GB</p> "
|
1244
|
+
},
|
1245
|
+
{
|
1246
|
+
"group": "Success 200",
|
1247
|
+
"type": "<p>Integer</p> ",
|
1248
|
+
"optional": false,
|
1249
|
+
"field": "disk_usage_gb",
|
1250
|
+
"description": "<p>Current amount of disk usage in GB</p> "
|
1251
|
+
},
|
1252
|
+
{
|
1253
|
+
"group": "Success 200",
|
1254
|
+
"type": "<p>String</p> ",
|
1255
|
+
"optional": false,
|
1256
|
+
"field": "container_type",
|
1257
|
+
"description": "<p>Container type, could be either 'lxc' or 'vserver'</p> "
|
1258
|
+
}
|
1259
|
+
]
|
1260
|
+
}
|
1261
|
+
},
|
1262
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1263
|
+
"groupTitle": "Container",
|
1264
|
+
"error": {
|
1265
|
+
"fields": {
|
1266
|
+
"Unauthorized 401": [
|
1267
|
+
{
|
1268
|
+
"group": "Unauthorized 401",
|
1269
|
+
"optional": false,
|
1270
|
+
"field": "error",
|
1271
|
+
"description": "<p>No valid API token was supplied</p> "
|
1272
|
+
}
|
1273
|
+
],
|
1274
|
+
"Internal Server Error 500": [
|
1275
|
+
{
|
1276
|
+
"group": "Internal Server Error 500",
|
1277
|
+
"optional": false,
|
1278
|
+
"field": "error",
|
1279
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1280
|
+
}
|
1281
|
+
],
|
1282
|
+
"Not Found 404": [
|
1283
|
+
{
|
1284
|
+
"group": "Not Found 404",
|
1285
|
+
"optional": false,
|
1286
|
+
"field": "error",
|
1287
|
+
"description": "<p>Object was not found</p> "
|
1288
|
+
}
|
1289
|
+
]
|
1290
|
+
},
|
1291
|
+
"examples": [
|
1292
|
+
{
|
1293
|
+
"title": "401 Unauthorized",
|
1294
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1295
|
+
"type": "json"
|
1296
|
+
},
|
1297
|
+
{
|
1298
|
+
"title": "500 Internal Server Error",
|
1299
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1300
|
+
"type": "json"
|
1301
|
+
},
|
1302
|
+
{
|
1303
|
+
"title": "404 Not Found",
|
1304
|
+
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
1305
|
+
"type": "json"
|
1306
|
+
}
|
1307
|
+
]
|
1308
|
+
}
|
1309
|
+
},
|
1310
|
+
{
|
1311
|
+
"type": "get",
|
1312
|
+
"url": "/containers",
|
1313
|
+
"title": "Request container list",
|
1314
|
+
"version": "1.0.0",
|
1315
|
+
"name": "GetContainers",
|
1316
|
+
"group": "Container",
|
1317
|
+
"description": "<p>Returns an array of containers which are available on the node.</p> ",
|
1318
|
+
"header": {
|
1319
|
+
"fields": {
|
1320
|
+
"Header": [
|
1321
|
+
{
|
1322
|
+
"group": "Header",
|
1323
|
+
"type": "String",
|
1324
|
+
"optional": false,
|
1325
|
+
"field": "X-Api-Token",
|
1326
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
1327
|
+
}
|
1328
|
+
]
|
1329
|
+
}
|
1330
|
+
},
|
1331
|
+
"success": {
|
1332
|
+
"fields": {
|
1333
|
+
"Success 200": [
|
1334
|
+
{
|
1335
|
+
"group": "Success 200",
|
1336
|
+
"type": "<p>Object[]</p> ",
|
1337
|
+
"optional": false,
|
1338
|
+
"field": "containers",
|
1339
|
+
"description": "<p>List of available containers</p> "
|
1340
|
+
},
|
1341
|
+
{
|
1342
|
+
"group": "Success 200",
|
1343
|
+
"type": "<p>String</p> ",
|
1344
|
+
"optional": false,
|
1345
|
+
"field": "containers.name",
|
1346
|
+
"description": "<p>Name of the container</p> "
|
1347
|
+
},
|
1348
|
+
{
|
1349
|
+
"group": "Success 200",
|
1350
|
+
"type": "<p>String</p> ",
|
1351
|
+
"optional": false,
|
1352
|
+
"field": "containers.state",
|
1353
|
+
"description": "<p>State of the container (either 'RUNNING' or 'STOPPED')</p> "
|
1354
|
+
},
|
1355
|
+
{
|
1356
|
+
"group": "Success 200",
|
1357
|
+
"type": "<p>String</p> ",
|
1358
|
+
"optional": false,
|
1359
|
+
"field": "containers.ip_address",
|
1360
|
+
"description": "<p>IP address assigned to the container</p> "
|
1361
|
+
},
|
1362
|
+
{
|
1363
|
+
"group": "Success 200",
|
1364
|
+
"type": "<p>Integer</p> ",
|
1365
|
+
"optional": false,
|
1366
|
+
"field": "containers.cpu_cores",
|
1367
|
+
"description": "<p>Number of Vcores</p> "
|
1368
|
+
},
|
1369
|
+
{
|
1370
|
+
"group": "Success 200",
|
1371
|
+
"type": "<p>Integer</p> ",
|
1372
|
+
"optional": false,
|
1373
|
+
"field": "containers.memory_limit_bytes",
|
1374
|
+
"description": "<p>Memory limit in bytes</p> "
|
1375
|
+
},
|
1376
|
+
{
|
1377
|
+
"group": "Success 200",
|
1378
|
+
"type": "<p>Integer</p> ",
|
1379
|
+
"optional": false,
|
1380
|
+
"field": "containers.memory_usage_bytes",
|
1381
|
+
"description": "<p>Current amount of memory usage in bytes</p> "
|
1382
|
+
},
|
1383
|
+
{
|
1384
|
+
"group": "Success 200",
|
1385
|
+
"type": "<p>Integer</p> ",
|
1386
|
+
"optional": false,
|
1387
|
+
"field": "containers.disk_space_gb",
|
1388
|
+
"description": "<p>Available disk space in GB</p> "
|
1389
|
+
},
|
1390
|
+
{
|
1391
|
+
"group": "Success 200",
|
1392
|
+
"type": "<p>Integer</p> ",
|
1393
|
+
"optional": false,
|
1394
|
+
"field": "containers.disk_usage_gb",
|
1395
|
+
"description": "<p>Current amount of disk usage in GB</p> "
|
1396
|
+
},
|
1397
|
+
{
|
1398
|
+
"group": "Success 200",
|
1399
|
+
"type": "<p>String</p> ",
|
1400
|
+
"optional": false,
|
1401
|
+
"field": "containers.container_type",
|
1402
|
+
"description": "<p>Container type, could be either 'lxc' or 'vserver'</p> "
|
1403
|
+
}
|
1404
|
+
]
|
1405
|
+
}
|
1406
|
+
},
|
1407
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1408
|
+
"groupTitle": "Container",
|
1409
|
+
"error": {
|
1410
|
+
"fields": {
|
1411
|
+
"Unauthorized 401": [
|
1412
|
+
{
|
1413
|
+
"group": "Unauthorized 401",
|
1414
|
+
"optional": false,
|
1415
|
+
"field": "error",
|
1416
|
+
"description": "<p>No valid API token was supplied</p> "
|
1417
|
+
}
|
1418
|
+
],
|
1419
|
+
"Internal Server Error 500": [
|
1420
|
+
{
|
1421
|
+
"group": "Internal Server Error 500",
|
1422
|
+
"optional": false,
|
1423
|
+
"field": "error",
|
1424
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1425
|
+
}
|
1426
|
+
]
|
1427
|
+
},
|
1428
|
+
"examples": [
|
1429
|
+
{
|
1430
|
+
"title": "401 Unauthorized",
|
1431
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1432
|
+
"type": "json"
|
1433
|
+
},
|
1434
|
+
{
|
1435
|
+
"title": "500 Internal Server Error",
|
1436
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1437
|
+
"type": "json"
|
1438
|
+
}
|
1439
|
+
]
|
1440
|
+
}
|
1441
|
+
},
|
1442
|
+
{
|
1443
|
+
"type": "put",
|
1444
|
+
"url": "/containers/:name/kill",
|
1445
|
+
"title": "Kill a container",
|
1446
|
+
"version": "1.0.0",
|
1447
|
+
"name": "KillContainer",
|
1448
|
+
"group": "Container",
|
1449
|
+
"description": "<p>Kills a container if it exists. Does essentially the same as StopContainer but forces the container to shut down and does not care about processes running on it.</p> ",
|
1450
|
+
"header": {
|
1451
|
+
"fields": {
|
1452
|
+
"Header": [
|
1453
|
+
{
|
1454
|
+
"group": "Header",
|
1455
|
+
"type": "String",
|
1456
|
+
"optional": false,
|
1457
|
+
"field": "X-Api-Token",
|
1458
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
1459
|
+
}
|
1460
|
+
]
|
1461
|
+
}
|
1462
|
+
},
|
1463
|
+
"parameter": {
|
1464
|
+
"fields": {
|
1465
|
+
"Parameter": [
|
1466
|
+
{
|
1467
|
+
"group": "Parameter",
|
1468
|
+
"type": "<p>String</p> ",
|
1469
|
+
"optional": false,
|
1470
|
+
"field": "name",
|
1471
|
+
"description": "<p>Unique name of the container</p> "
|
1472
|
+
}
|
1473
|
+
]
|
1474
|
+
}
|
1475
|
+
},
|
1476
|
+
"success": {
|
1477
|
+
"fields": {
|
1478
|
+
"Success 200": [
|
1479
|
+
{
|
1480
|
+
"group": "Success 200",
|
1481
|
+
"type": "<p>String</p> ",
|
1482
|
+
"optional": false,
|
1483
|
+
"field": "success",
|
1484
|
+
"description": "<p>Success message</p> "
|
1485
|
+
},
|
1486
|
+
{
|
1487
|
+
"group": "Success 200",
|
1488
|
+
"type": "<p>String</p> ",
|
1489
|
+
"optional": false,
|
1490
|
+
"field": "output",
|
1491
|
+
"description": "<p>STDOUT from container kill</p> "
|
1492
|
+
}
|
1493
|
+
]
|
1494
|
+
}
|
1495
|
+
},
|
1496
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1497
|
+
"groupTitle": "Container",
|
1498
|
+
"error": {
|
1499
|
+
"fields": {
|
1500
|
+
"Unauthorized 401": [
|
1501
|
+
{
|
1502
|
+
"group": "Unauthorized 401",
|
1503
|
+
"optional": false,
|
1504
|
+
"field": "error",
|
1505
|
+
"description": "<p>No valid API token was supplied</p> "
|
1506
|
+
}
|
1507
|
+
],
|
1508
|
+
"Not Found 404": [
|
1509
|
+
{
|
1510
|
+
"group": "Not Found 404",
|
1511
|
+
"optional": false,
|
1512
|
+
"field": "error",
|
1513
|
+
"description": "<p>Object was not found</p> "
|
1514
|
+
}
|
1515
|
+
],
|
1516
|
+
"Internal Server Error 500": [
|
1517
|
+
{
|
1518
|
+
"group": "Internal Server Error 500",
|
1519
|
+
"optional": false,
|
1520
|
+
"field": "error",
|
1521
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1522
|
+
}
|
1523
|
+
]
|
1524
|
+
},
|
1525
|
+
"examples": [
|
1526
|
+
{
|
1527
|
+
"title": "401 Unauthorized",
|
1528
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1529
|
+
"type": "json"
|
1530
|
+
},
|
1531
|
+
{
|
1532
|
+
"title": "404 Not Found",
|
1533
|
+
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
1534
|
+
"type": "json"
|
1535
|
+
},
|
1536
|
+
{
|
1537
|
+
"title": "500 Internal Server Error",
|
1538
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1539
|
+
"type": "json"
|
1540
|
+
}
|
1541
|
+
]
|
1542
|
+
}
|
1543
|
+
},
|
1544
|
+
{
|
1545
|
+
"type": "put",
|
1546
|
+
"url": "/containers/:name/start",
|
1547
|
+
"title": "Start a container",
|
1548
|
+
"version": "1.0.0",
|
1549
|
+
"name": "StartContainer",
|
1550
|
+
"group": "Container",
|
1551
|
+
"description": "<p>Starts a container if it exists</p> ",
|
1552
|
+
"header": {
|
1553
|
+
"fields": {
|
1554
|
+
"Header": [
|
1555
|
+
{
|
1556
|
+
"group": "Header",
|
1557
|
+
"type": "String",
|
1558
|
+
"optional": false,
|
1559
|
+
"field": "X-Api-Token",
|
1560
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
1561
|
+
}
|
1562
|
+
]
|
1563
|
+
}
|
1564
|
+
},
|
1565
|
+
"parameter": {
|
1566
|
+
"fields": {
|
1567
|
+
"Parameter": [
|
1568
|
+
{
|
1569
|
+
"group": "Parameter",
|
1570
|
+
"type": "<p>String</p> ",
|
1571
|
+
"optional": false,
|
1572
|
+
"field": "name",
|
1573
|
+
"description": "<p>Unique name of the container</p> "
|
1574
|
+
}
|
1575
|
+
]
|
1576
|
+
}
|
1577
|
+
},
|
1578
|
+
"success": {
|
1579
|
+
"fields": {
|
1580
|
+
"Success 200": [
|
1581
|
+
{
|
1582
|
+
"group": "Success 200",
|
1583
|
+
"type": "<p>String</p> ",
|
1584
|
+
"optional": false,
|
1585
|
+
"field": "success",
|
1586
|
+
"description": "<p>Success message</p> "
|
1587
|
+
},
|
1588
|
+
{
|
1589
|
+
"group": "Success 200",
|
1590
|
+
"type": "<p>String</p> ",
|
1591
|
+
"optional": false,
|
1592
|
+
"field": "output",
|
1593
|
+
"description": "<p>STDOUT from container start</p> "
|
1594
|
+
}
|
1595
|
+
]
|
1596
|
+
}
|
1597
|
+
},
|
1598
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1599
|
+
"groupTitle": "Container",
|
1600
|
+
"error": {
|
1601
|
+
"fields": {
|
1602
|
+
"Unauthorized 401": [
|
1603
|
+
{
|
1604
|
+
"group": "Unauthorized 401",
|
1605
|
+
"optional": false,
|
1606
|
+
"field": "error",
|
1607
|
+
"description": "<p>No valid API token was supplied</p> "
|
1608
|
+
}
|
1609
|
+
],
|
1610
|
+
"Not Found 404": [
|
1611
|
+
{
|
1612
|
+
"group": "Not Found 404",
|
1613
|
+
"optional": false,
|
1614
|
+
"field": "error",
|
1615
|
+
"description": "<p>Object was not found</p> "
|
1616
|
+
}
|
1617
|
+
],
|
1618
|
+
"Internal Server Error 500": [
|
1619
|
+
{
|
1620
|
+
"group": "Internal Server Error 500",
|
1621
|
+
"optional": false,
|
1622
|
+
"field": "error",
|
1623
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1624
|
+
}
|
1625
|
+
]
|
1626
|
+
},
|
1627
|
+
"examples": [
|
1628
|
+
{
|
1629
|
+
"title": "401 Unauthorized",
|
1630
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1631
|
+
"type": "json"
|
1632
|
+
},
|
1633
|
+
{
|
1634
|
+
"title": "404 Not Found",
|
1635
|
+
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
1636
|
+
"type": "json"
|
1637
|
+
},
|
1638
|
+
{
|
1639
|
+
"title": "500 Internal Server Error",
|
1640
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1641
|
+
"type": "json"
|
1642
|
+
}
|
1643
|
+
]
|
1644
|
+
}
|
1645
|
+
},
|
1646
|
+
{
|
1647
|
+
"type": "put",
|
1648
|
+
"url": "/containers/:name/stop",
|
1649
|
+
"title": "Stop a container",
|
1650
|
+
"version": "1.0.0",
|
1651
|
+
"name": "StopContainer",
|
1652
|
+
"group": "Container",
|
1653
|
+
"description": "<p>Stops a container if it exists</p> ",
|
1654
|
+
"header": {
|
1655
|
+
"fields": {
|
1656
|
+
"Header": [
|
1657
|
+
{
|
1658
|
+
"group": "Header",
|
1659
|
+
"type": "String",
|
1660
|
+
"optional": false,
|
1661
|
+
"field": "X-Api-Token",
|
1662
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
1663
|
+
}
|
1664
|
+
]
|
1665
|
+
}
|
1666
|
+
},
|
1667
|
+
"parameter": {
|
1668
|
+
"fields": {
|
1669
|
+
"Parameter": [
|
1670
|
+
{
|
1671
|
+
"group": "Parameter",
|
1672
|
+
"type": "<p>String</p> ",
|
1673
|
+
"optional": false,
|
1674
|
+
"field": "name",
|
1675
|
+
"description": "<p>Unique name of the container</p> "
|
1676
|
+
}
|
1677
|
+
]
|
1678
|
+
}
|
1679
|
+
},
|
1680
|
+
"success": {
|
1681
|
+
"fields": {
|
1682
|
+
"Success 200": [
|
1683
|
+
{
|
1684
|
+
"group": "Success 200",
|
1685
|
+
"type": "<p>String</p> ",
|
1686
|
+
"optional": false,
|
1687
|
+
"field": "success",
|
1688
|
+
"description": "<p>Success message</p> "
|
1689
|
+
},
|
1690
|
+
{
|
1691
|
+
"group": "Success 200",
|
1692
|
+
"type": "<p>String</p> ",
|
1693
|
+
"optional": false,
|
1694
|
+
"field": "output",
|
1695
|
+
"description": "<p>STDOUT from container stop</p> "
|
1696
|
+
}
|
1697
|
+
]
|
1698
|
+
}
|
1699
|
+
},
|
1700
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1701
|
+
"groupTitle": "Container",
|
1702
|
+
"error": {
|
1703
|
+
"fields": {
|
1704
|
+
"Unauthorized 401": [
|
1705
|
+
{
|
1706
|
+
"group": "Unauthorized 401",
|
1707
|
+
"optional": false,
|
1708
|
+
"field": "error",
|
1709
|
+
"description": "<p>No valid API token was supplied</p> "
|
1710
|
+
}
|
1711
|
+
],
|
1712
|
+
"Not Found 404": [
|
1713
|
+
{
|
1714
|
+
"group": "Not Found 404",
|
1715
|
+
"optional": false,
|
1716
|
+
"field": "error",
|
1717
|
+
"description": "<p>Object was not found</p> "
|
1718
|
+
}
|
1719
|
+
],
|
1720
|
+
"Internal Server Error 500": [
|
1721
|
+
{
|
1722
|
+
"group": "Internal Server Error 500",
|
1723
|
+
"optional": false,
|
1724
|
+
"field": "error",
|
1725
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1726
|
+
}
|
1727
|
+
]
|
1728
|
+
},
|
1729
|
+
"examples": [
|
1730
|
+
{
|
1731
|
+
"title": "401 Unauthorized",
|
1732
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1733
|
+
"type": "json"
|
1734
|
+
},
|
1735
|
+
{
|
1736
|
+
"title": "404 Not Found",
|
1737
|
+
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Not Found\"\n}",
|
1738
|
+
"type": "json"
|
1739
|
+
},
|
1740
|
+
{
|
1741
|
+
"title": "500 Internal Server Error",
|
1742
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1743
|
+
"type": "json"
|
1744
|
+
}
|
1745
|
+
]
|
1746
|
+
}
|
1747
|
+
},
|
1748
|
+
{
|
1749
|
+
"type": "get",
|
1750
|
+
"url": "/info",
|
1751
|
+
"title": "Request node information",
|
1752
|
+
"version": "1.1.0",
|
1753
|
+
"name": "NodeInfo",
|
1754
|
+
"group": "Node",
|
1755
|
+
"description": "<p>Returns an array containing useful information about the node itself and the resources available on it.</p> ",
|
1756
|
+
"header": {
|
1757
|
+
"fields": {
|
1758
|
+
"Header": [
|
1759
|
+
{
|
1760
|
+
"group": "Header",
|
1761
|
+
"type": "String",
|
1762
|
+
"optional": false,
|
1763
|
+
"field": "X-Api-Token",
|
1764
|
+
"description": "<p>API token (from /etc/wf_node_api.conf)</p> "
|
1765
|
+
}
|
1766
|
+
]
|
1767
|
+
}
|
1768
|
+
},
|
1769
|
+
"success": {
|
1770
|
+
"fields": {
|
1771
|
+
"Success 200": [
|
1772
|
+
{
|
1773
|
+
"group": "Success 200",
|
1774
|
+
"type": "<p>String</p> ",
|
1775
|
+
"optional": false,
|
1776
|
+
"field": "container_type",
|
1777
|
+
"description": "<p>The configured container type (lxc or vserver)</p> "
|
1778
|
+
},
|
1779
|
+
{
|
1780
|
+
"group": "Success 200",
|
1781
|
+
"type": "<p>String</p> ",
|
1782
|
+
"optional": false,
|
1783
|
+
"field": "hostname",
|
1784
|
+
"description": "<p>The hostname of the system</p> "
|
1785
|
+
},
|
1786
|
+
{
|
1787
|
+
"group": "Success 200",
|
1788
|
+
"type": "<p>String</p> ",
|
1789
|
+
"optional": false,
|
1790
|
+
"field": "api_version",
|
1791
|
+
"description": "<p>The version number of the node api</p> "
|
1792
|
+
},
|
1793
|
+
{
|
1794
|
+
"group": "Success 200",
|
1795
|
+
"type": "<p>Integer</p> ",
|
1796
|
+
"optional": false,
|
1797
|
+
"field": "total_cpu_cores",
|
1798
|
+
"description": "<p>The number of cpu cores available totally</p> "
|
1799
|
+
},
|
1800
|
+
{
|
1801
|
+
"group": "Success 200",
|
1802
|
+
"type": "<p>Integer</p> ",
|
1803
|
+
"optional": false,
|
1804
|
+
"field": "free_cpu_cores",
|
1805
|
+
"description": "<p>The number of free cpu cores</p> "
|
1806
|
+
},
|
1807
|
+
{
|
1808
|
+
"group": "Success 200",
|
1809
|
+
"type": "<p>Array</p> ",
|
1810
|
+
"optional": false,
|
1811
|
+
"field": "supported_templates",
|
1812
|
+
"description": "<p>A list of supported templates</p> "
|
1813
|
+
}
|
1814
|
+
]
|
1815
|
+
}
|
1816
|
+
},
|
1817
|
+
"filename": "lib/wf_node_api/api/node_api.rb",
|
1818
|
+
"groupTitle": "Node",
|
1819
|
+
"error": {
|
1820
|
+
"fields": {
|
1821
|
+
"Unauthorized 401": [
|
1822
|
+
{
|
1823
|
+
"group": "Unauthorized 401",
|
1824
|
+
"optional": false,
|
1825
|
+
"field": "error",
|
1826
|
+
"description": "<p>No valid API token was supplied</p> "
|
1827
|
+
}
|
1828
|
+
],
|
1829
|
+
"Internal Server Error 500": [
|
1830
|
+
{
|
1831
|
+
"group": "Internal Server Error 500",
|
1832
|
+
"optional": false,
|
1833
|
+
"field": "error",
|
1834
|
+
"description": "<p>The process could not be requested due to an internal error</p> "
|
1835
|
+
}
|
1836
|
+
]
|
1837
|
+
},
|
1838
|
+
"examples": [
|
1839
|
+
{
|
1840
|
+
"title": "401 Unauthorized",
|
1841
|
+
"content": "HTTP/1.1 401 Unauthorized\n{\n \"error\": \"Unauthorized\"\n}",
|
1842
|
+
"type": "json"
|
1843
|
+
},
|
1844
|
+
{
|
1845
|
+
"title": "500 Internal Server Error",
|
1846
|
+
"content": "HTTP/1.1 500 Internal Server Error\n{\n \"error\": \"Unknown error occured\"\n}",
|
1847
|
+
"type": "json"
|
1848
|
+
}
|
1849
|
+
]
|
1850
|
+
}
|
1851
|
+
}
|
1852
|
+
]
|