@xen-orchestra/rest-api 0.5.0 → 0.6.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.
@@ -0,0 +1,60 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
8
+ return function (target, key) { decorator(target, key, paramIndex); }
9
+ };
10
+ import { Example, Get, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
11
+ import { provide } from 'inversify-binding-decorators';
12
+ import { notFoundResp, unauthorizedResp } from '../open-api/common/response.common.mjs';
13
+ import { group, groupIds, partialGroups } from '../open-api/oa-examples/group.oa-example.mjs';
14
+ import { XoController } from '../abstract-classes/xo-controller.mjs';
15
+ let GroupController = class GroupController extends XoController {
16
+ // --- abstract methods
17
+ getAllCollectionObjects() {
18
+ return this.restApi.xoApp.getAllGroups();
19
+ }
20
+ getCollectionObject(id) {
21
+ return this.restApi.xoApp.getGroup(id);
22
+ }
23
+ /**
24
+ * @example fields "name,id,users"
25
+ * @example filter "users:length:>0"
26
+ * @example limit 42
27
+ */
28
+ async getGroups(req, fields, filter, limit) {
29
+ return this.sendObjects(Object.values(await this.getObjects({ filter, limit })), req);
30
+ }
31
+ /**
32
+ * @example id "7d98fee4-3357-41a7-ac3f-9124212badb7"
33
+ */
34
+ getGroup(id) {
35
+ return this.getObject(id);
36
+ }
37
+ };
38
+ __decorate([
39
+ Example(groupIds),
40
+ Example(partialGroups),
41
+ Get(''),
42
+ __param(0, Request()),
43
+ __param(1, Query()),
44
+ __param(2, Query()),
45
+ __param(3, Query())
46
+ ], GroupController.prototype, "getGroups", null);
47
+ __decorate([
48
+ Example(group),
49
+ Get('{id}'),
50
+ Response(notFoundResp.status, notFoundResp.description),
51
+ __param(0, Path())
52
+ ], GroupController.prototype, "getGroup", null);
53
+ GroupController = __decorate([
54
+ Route('groups'),
55
+ Security('*'),
56
+ Response(unauthorizedResp.status, unauthorizedResp.description),
57
+ Tags('groups'),
58
+ provide(GroupController)
59
+ ], GroupController);
60
+ export { GroupController };
@@ -0,0 +1,59 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
8
+ return function (target, key) { decorator(target, key, paramIndex); }
9
+ };
10
+ import { Example, Get, Path, Query, Response, Request, Route, Security, Tags } from 'tsoa';
11
+ import { inject } from 'inversify';
12
+ import { provide } from 'inversify-binding-decorators';
13
+ import { network, networkIds, partialNetworks } from '../oa-examples/network.oa-example.mjs';
14
+ import { notFoundResp, unauthorizedResp } from '../common/response.common.mjs';
15
+ import { RestApi } from '../../rest-api/rest-api.mjs';
16
+ import { XapiXoController } from '../../abstract-classes/xapi-xo-controller.mjs';
17
+ let NetworkController = class NetworkController extends XapiXoController {
18
+ constructor(restApi) {
19
+ super('network', restApi);
20
+ }
21
+ /**
22
+ * @example fields "nbd,name_label,id"
23
+ * @example filter "nbd?"
24
+ * @example limit 42
25
+ */
26
+ getNetworks(req, fields, filter, limit) {
27
+ return this.sendObjects(Object.values(this.getObjects({ filter, limit })), req);
28
+ }
29
+ /**
30
+ * @example id "9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f"
31
+ */
32
+ getNetwork(id) {
33
+ return this.getObject(id);
34
+ }
35
+ };
36
+ __decorate([
37
+ Example(networkIds),
38
+ Example(partialNetworks),
39
+ Get(''),
40
+ __param(0, Request()),
41
+ __param(1, Query()),
42
+ __param(2, Query()),
43
+ __param(3, Query())
44
+ ], NetworkController.prototype, "getNetworks", null);
45
+ __decorate([
46
+ Example(network),
47
+ Get('{id}'),
48
+ Response(notFoundResp.status, notFoundResp.description),
49
+ __param(0, Path())
50
+ ], NetworkController.prototype, "getNetwork", null);
51
+ NetworkController = __decorate([
52
+ Route('networks'),
53
+ Security('*'),
54
+ Response(unauthorizedResp.status, unauthorizedResp.description),
55
+ Tags('networks'),
56
+ provide(NetworkController),
57
+ __param(0, inject(RestApi))
58
+ ], NetworkController);
59
+ export { NetworkController };
@@ -0,0 +1,23 @@
1
+ export const groupIds = [
2
+ '/rest/v0/groups/7d98fee4-3357-41a7-ac3f-9124212badb7',
3
+ '/rest/v0/groups/7981ba62-c395-4546-bfa4-d1261653a77f',
4
+ ];
5
+ export const partialGroups = [
6
+ {
7
+ name: 'group 1',
8
+ id: '7d98fee4-3357-41a7-ac3f-9124212badb7',
9
+ users: ['722d17b9-699b-49d2-8193-be1ac573d3de'],
10
+ href: '/rest/v0/groups/7d98fee4-3357-41a7-ac3f-9124212badb7',
11
+ },
12
+ {
13
+ name: 'group 2',
14
+ id: '7981ba62-c395-4546-bfa4-d1261653a77f',
15
+ users: ['722d17b9-699b-49d2-8193-be1ac573d3de', '088124f3-41b6-4258-9653-6eedc7b46111'],
16
+ href: '/rest/v0/groups/7981ba62-c395-4546-bfa4-d1261653a77f',
17
+ },
18
+ ];
19
+ export const group = {
20
+ name: 'group 1',
21
+ users: ['722d17b9-699b-49d2-8193-be1ac573d3de'],
22
+ id: '7d98fee4-3357-41a7-ac3f-9124212badb7',
23
+ };
@@ -0,0 +1,50 @@
1
+ export const networkIds = [
2
+ '/rest/v0/networks/9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f',
3
+ '/rest/v0/networks/6b6ca0f5-6611-0636-4b0a-1fb1c8e96414',
4
+ ];
5
+ export const partialNetworks = [
6
+ {
7
+ nbd: true,
8
+ name_label: 'Host internal management network',
9
+ id: '9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f',
10
+ href: '/rest/v0/networks/9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f',
11
+ },
12
+ {
13
+ nbd: true,
14
+ name_label: 'Lab v2 (VLAN 11)',
15
+ id: '6b6ca0f5-6611-0636-4b0a-1fb1c8e96414',
16
+ href: '/rest/v0/networks/6b6ca0f5-6611-0636-4b0a-1fb1c8e96414',
17
+ },
18
+ ];
19
+ export const network = {
20
+ automatic: false,
21
+ bridge: 'xenapi',
22
+ current_operations: {},
23
+ defaultIsLocked: false,
24
+ MTU: 1500,
25
+ name_description: 'Network on which guests will be assigned a private link-local IP address which can be used to talk XenAPI',
26
+ name_label: 'Host internal management network',
27
+ other_config: {
28
+ is_guest_installer_network: 'true',
29
+ is_host_internal_management_network: 'true',
30
+ ip_begin: '169.254.0.1',
31
+ ip_end: '169.254.255.254',
32
+ netmask: '255.255.0.0',
33
+ },
34
+ tags: [],
35
+ PIFs: [],
36
+ VIFs: [
37
+ '2d039fc8-e522-75db-34c9-536b9553bd5a',
38
+ '38623621-d30e-0307-dcef-eb7ed6c69f0c',
39
+ 'cc4b090f-5ff1-254b-558f-f7ac237e6fc5',
40
+ 'a9f3d042-a2e1-102f-74fc-ff1df41c6eb3',
41
+ ],
42
+ nbd: false,
43
+ insecureNbd: false,
44
+ id: '9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f',
45
+ type: 'network',
46
+ uuid: '9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f',
47
+ $pool: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
48
+ $poolId: 'b7569d99-30f8-178a-7d94-801de3e29b5b',
49
+ _xapiRef: 'OpaqueRef:eb906e77-2221-5399-4a26-60f0ad069b61',
50
+ };
@@ -26,11 +26,15 @@ import { ScheduleController } from './../../schedules/schedule.controller.mjs';
26
26
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
27
27
  import { PoolController } from './../../pools/pool.controller.mjs';
28
28
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
29
+ import { NetworkController } from './../networks/network.controller.mjs';
30
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
29
31
  import { AlarmController } from './../../alarms/alarm.controller.mjs';
30
32
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
31
33
  import { MessageController } from './../../messages/message.controller.mjs';
32
34
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
33
35
  import { HostController } from './../../hosts/host.controller.mjs';
36
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
37
+ import { GroupController } from './../../groups/group.controller.mjs';
34
38
  import { expressAuthentication } from './../../middlewares/authentication.middleware.mjs';
35
39
  // @ts-ignore - no great way to install types from subpackage
36
40
  import { iocContainer } from './../../ioc/ioc.mjs';
@@ -312,6 +316,26 @@ const models = {
312
316
  "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "string", "required": true }, "$poolId": { "dataType": "string", "required": true }, "_xapiRef": { "dataType": "string", "required": true }, "uuid": { "dataType": "string", "required": true }, "auto_poweron": { "dataType": "boolean", "required": true }, "cpus": { "dataType": "nestedObjectLiteral", "nestedProperties": { "sockets": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "cores": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] } }, "required": true }, "crashDumpSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "current_operations": { "ref": "Record_string.POOL_ALLOWED_OPERATIONS_", "required": true }, "defaultSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "HA_enabled": { "dataType": "boolean", "required": true }, "haSrs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "id": { "dataType": "string", "required": true }, "master": { "dataType": "string", "required": true }, "migrationCompression": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "string", "required": true }, "name_label": { "dataType": "string", "required": true }, "otherConfig": { "ref": "Record_string.string_", "required": true }, "platform_version": { "dataType": "string", "required": true }, "suspendSr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "tags": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "type": { "dataType": "enum", "enums": ["pool"], "required": true }, "vtpmSupported": { "dataType": "boolean", "required": true }, "xosanPackInstallationTime": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "enum", "enums": [null] }], "required": true }, "zstdSupported": { "dataType": "boolean", "required": true } }, "validators": {} },
313
317
  },
314
318
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
319
+ "Record_string.attaching_": {
320
+ "dataType": "refAlias",
321
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": {}, "validators": {} },
322
+ },
323
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
324
+ "Partial_Unbrand_XoNetwork__": {
325
+ "dataType": "refAlias",
326
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "$poolId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "_xapiRef": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "uuid": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "MTU": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "PIFs": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "VIFs": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "automatic": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "bridge": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "current_operations": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.attaching_" }, { "dataType": "undefined" }] }, "defaultIsLocked": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "insecureNbd": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "nbd": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "other_config": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "tags": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["network"] }, { "dataType": "undefined" }] } }, "validators": {} },
327
+ },
328
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
329
+ "WithHref_Partial_Unbrand_XoNetwork___": {
330
+ "dataType": "refAlias",
331
+ "type": { "dataType": "intersection", "subSchemas": [{ "ref": "Partial_Unbrand_XoNetwork__" }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "href": { "dataType": "string", "required": true } } }], "validators": {} },
332
+ },
333
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
334
+ "Unbrand_XoNetwork_": {
335
+ "dataType": "refAlias",
336
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "string", "required": true }, "$poolId": { "dataType": "string", "required": true }, "_xapiRef": { "dataType": "string", "required": true }, "uuid": { "dataType": "string", "required": true }, "MTU": { "dataType": "double", "required": true }, "PIFs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "VIFs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "automatic": { "dataType": "boolean", "required": true }, "bridge": { "dataType": "string", "required": true }, "current_operations": { "ref": "Record_string.attaching_", "required": true }, "defaultIsLocked": { "dataType": "boolean", "required": true }, "id": { "dataType": "string", "required": true }, "insecureNbd": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "string", "required": true }, "name_label": { "dataType": "string", "required": true }, "nbd": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "other_config": { "ref": "Record_string.string_", "required": true }, "tags": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "type": { "dataType": "enum", "enums": ["network"], "required": true } }, "validators": {} },
337
+ },
338
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
315
339
  "Partial_UnbrandedXoAlarm_": {
316
340
  "dataType": "refAlias",
317
341
  "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "$poolId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "_xapiRef": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "uuid": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["message"] }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "time": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "body": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "name": { "dataType": "string", "required": true }, "value": { "dataType": "string", "required": true } } }, { "dataType": "undefined" }] }, "object": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "href": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "uuid": { "dataType": "string", "required": true }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["pool"] }, { "dataType": "enum", "enums": ["VBD"] }, { "dataType": "enum", "enums": ["VGPU"] }, { "dataType": "enum", "enums": ["host"] }, { "dataType": "enum", "enums": ["VIF"] }, { "dataType": "enum", "enums": ["VTPM"] }, { "dataType": "enum", "enums": ["VM"] }, { "dataType": "enum", "enums": ["VM-snapshot"] }, { "dataType": "enum", "enums": ["SR"] }, { "dataType": "enum", "enums": ["message"] }, { "dataType": "enum", "enums": ["network"] }, { "dataType": "enum", "enums": ["VDI"] }, { "dataType": "enum", "enums": ["VDI-snapshot"] }, { "dataType": "enum", "enums": ["VDI-unmanaged"] }, { "dataType": "enum", "enums": ["VM-controller"] }, { "dataType": "enum", "enums": ["VM-template"] }, { "dataType": "enum", "enums": ["unknown"] }], "required": true } } }, { "dataType": "undefined" }] } }, "validators": {} },
@@ -397,6 +421,21 @@ const models = {
397
421
  "type": { "ref": "XapiStatsResponse__cpus-Record_string.number-Array_--ioThroughput_58__r-Record_string.number-Array_--w-Record_string.number-Array__--iops_58__r-Record_string.number-Array_--w-Record_string.number-Array__--iowait-Record_string.number-Array_--latency_58__r-Record_string.number-Array_--w-Record_string.number-Array__--load-number-Array--memory-number-Array--memoryFree-number-Array--pifs_58__rx-Record_string.number-Array_--tx-Record_string.number-Array____", "validators": {} },
398
422
  },
399
423
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
424
+ "Partial_Unbrand_XoGroup__": {
425
+ "dataType": "refAlias",
426
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "provider": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "providerGroupId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "users": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] } }, "validators": {} },
427
+ },
428
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
429
+ "WithHref_Partial_Unbrand_XoGroup___": {
430
+ "dataType": "refAlias",
431
+ "type": { "dataType": "intersection", "subSchemas": [{ "ref": "Partial_Unbrand_XoGroup__" }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "href": { "dataType": "string", "required": true } } }], "validators": {} },
432
+ },
433
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
434
+ "Unbrand_XoGroup_": {
435
+ "dataType": "refAlias",
436
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "id": { "dataType": "string", "required": true }, "name": { "dataType": "string", "required": true }, "provider": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "providerGroupId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "users": { "dataType": "array", "array": { "dataType": "string" }, "required": true } }, "validators": {} },
437
+ },
438
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
400
439
  };
401
440
  const templateService = new ExpressTemplateService(models, { "noImplicitAdditionalProperties": "throw-on-extras", "bodyCoercion": true });
402
441
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
@@ -1230,6 +1269,63 @@ export function RegisterRoutes(app) {
1230
1269
  }
1231
1270
  });
1232
1271
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1272
+ const argsNetworkController_getNetworks = {
1273
+ req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
1274
+ fields: { "in": "query", "name": "fields", "dataType": "string" },
1275
+ filter: { "in": "query", "name": "filter", "dataType": "string" },
1276
+ limit: { "in": "query", "name": "limit", "dataType": "double" },
1277
+ };
1278
+ app.get('/rest/v0/networks', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(NetworkController)), ...(fetchMiddlewares(NetworkController.prototype.getNetworks)), async function NetworkController_getNetworks(request, response, next) {
1279
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1280
+ let validatedArgs = [];
1281
+ try {
1282
+ validatedArgs = templateService.getValidatedArgs({ args: argsNetworkController_getNetworks, request, response });
1283
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
1284
+ const controller = await container.get(NetworkController);
1285
+ if (typeof controller['setStatus'] === 'function') {
1286
+ controller.setStatus(undefined);
1287
+ }
1288
+ await templateService.apiHandler({
1289
+ methodName: 'getNetworks',
1290
+ controller,
1291
+ response,
1292
+ next,
1293
+ validatedArgs,
1294
+ successStatus: undefined,
1295
+ });
1296
+ }
1297
+ catch (err) {
1298
+ return next(err);
1299
+ }
1300
+ });
1301
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1302
+ const argsNetworkController_getNetwork = {
1303
+ id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
1304
+ };
1305
+ app.get('/rest/v0/networks/:id', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(NetworkController)), ...(fetchMiddlewares(NetworkController.prototype.getNetwork)), async function NetworkController_getNetwork(request, response, next) {
1306
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1307
+ let validatedArgs = [];
1308
+ try {
1309
+ validatedArgs = templateService.getValidatedArgs({ args: argsNetworkController_getNetwork, request, response });
1310
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
1311
+ const controller = await container.get(NetworkController);
1312
+ if (typeof controller['setStatus'] === 'function') {
1313
+ controller.setStatus(undefined);
1314
+ }
1315
+ await templateService.apiHandler({
1316
+ methodName: 'getNetwork',
1317
+ controller,
1318
+ response,
1319
+ next,
1320
+ validatedArgs,
1321
+ successStatus: undefined,
1322
+ });
1323
+ }
1324
+ catch (err) {
1325
+ return next(err);
1326
+ }
1327
+ });
1328
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1233
1329
  const argsAlarmController_getAlarms = {
1234
1330
  req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
1235
1331
  fields: { "in": "query", "name": "fields", "dataType": "string" },
@@ -1429,6 +1525,63 @@ export function RegisterRoutes(app) {
1429
1525
  }
1430
1526
  });
1431
1527
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1528
+ const argsGroupController_getGroups = {
1529
+ req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
1530
+ fields: { "in": "query", "name": "fields", "dataType": "string" },
1531
+ filter: { "in": "query", "name": "filter", "dataType": "string" },
1532
+ limit: { "in": "query", "name": "limit", "dataType": "double" },
1533
+ };
1534
+ app.get('/rest/v0/groups', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(GroupController)), ...(fetchMiddlewares(GroupController.prototype.getGroups)), async function GroupController_getGroups(request, response, next) {
1535
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1536
+ let validatedArgs = [];
1537
+ try {
1538
+ validatedArgs = templateService.getValidatedArgs({ args: argsGroupController_getGroups, request, response });
1539
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
1540
+ const controller = await container.get(GroupController);
1541
+ if (typeof controller['setStatus'] === 'function') {
1542
+ controller.setStatus(undefined);
1543
+ }
1544
+ await templateService.apiHandler({
1545
+ methodName: 'getGroups',
1546
+ controller,
1547
+ response,
1548
+ next,
1549
+ validatedArgs,
1550
+ successStatus: undefined,
1551
+ });
1552
+ }
1553
+ catch (err) {
1554
+ return next(err);
1555
+ }
1556
+ });
1557
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1558
+ const argsGroupController_getGroup = {
1559
+ id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
1560
+ };
1561
+ app.get('/rest/v0/groups/:id', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(GroupController)), ...(fetchMiddlewares(GroupController.prototype.getGroup)), async function GroupController_getGroup(request, response, next) {
1562
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1563
+ let validatedArgs = [];
1564
+ try {
1565
+ validatedArgs = templateService.getValidatedArgs({ args: argsGroupController_getGroup, request, response });
1566
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
1567
+ const controller = await container.get(GroupController);
1568
+ if (typeof controller['setStatus'] === 'function') {
1569
+ controller.setStatus(undefined);
1570
+ }
1571
+ await templateService.apiHandler({
1572
+ methodName: 'getGroup',
1573
+ controller,
1574
+ response,
1575
+ next,
1576
+ validatedArgs,
1577
+ successStatus: undefined,
1578
+ });
1579
+ }
1580
+ catch (err) {
1581
+ return next(err);
1582
+ }
1583
+ });
1584
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1432
1585
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1433
1586
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1434
1587
  function authenticateMiddleware(security = []) {
@@ -4759,6 +4759,202 @@
4759
4759
  ],
4760
4760
  "type": "object"
4761
4761
  },
4762
+ "Record_string.attaching_": {
4763
+ "properties": {},
4764
+ "type": "object",
4765
+ "description": "Construct a type with a set of properties K of type T"
4766
+ },
4767
+ "Partial_Unbrand_XoNetwork__": {
4768
+ "properties": {
4769
+ "$pool": {
4770
+ "type": "string"
4771
+ },
4772
+ "$poolId": {
4773
+ "type": "string",
4774
+ "deprecated": true
4775
+ },
4776
+ "_xapiRef": {
4777
+ "type": "string"
4778
+ },
4779
+ "uuid": {
4780
+ "type": "string"
4781
+ },
4782
+ "MTU": {
4783
+ "type": "number",
4784
+ "format": "double"
4785
+ },
4786
+ "PIFs": {
4787
+ "items": {
4788
+ "type": "string"
4789
+ },
4790
+ "type": "array"
4791
+ },
4792
+ "VIFs": {
4793
+ "items": {
4794
+ "type": "string"
4795
+ },
4796
+ "type": "array"
4797
+ },
4798
+ "automatic": {
4799
+ "type": "boolean"
4800
+ },
4801
+ "bridge": {
4802
+ "type": "string"
4803
+ },
4804
+ "current_operations": {
4805
+ "$ref": "#/components/schemas/Record_string.attaching_"
4806
+ },
4807
+ "defaultIsLocked": {
4808
+ "type": "boolean"
4809
+ },
4810
+ "id": {
4811
+ "type": "string"
4812
+ },
4813
+ "insecureNbd": {
4814
+ "type": "boolean"
4815
+ },
4816
+ "name_description": {
4817
+ "type": "string"
4818
+ },
4819
+ "name_label": {
4820
+ "type": "string"
4821
+ },
4822
+ "nbd": {
4823
+ "type": "boolean"
4824
+ },
4825
+ "other_config": {
4826
+ "$ref": "#/components/schemas/Record_string.string_"
4827
+ },
4828
+ "tags": {
4829
+ "items": {
4830
+ "type": "string"
4831
+ },
4832
+ "type": "array"
4833
+ },
4834
+ "type": {
4835
+ "type": "string",
4836
+ "enum": [
4837
+ "network"
4838
+ ]
4839
+ }
4840
+ },
4841
+ "type": "object",
4842
+ "description": "Make all properties in T optional"
4843
+ },
4844
+ "WithHref_Partial_Unbrand_XoNetwork___": {
4845
+ "allOf": [
4846
+ {
4847
+ "$ref": "#/components/schemas/Partial_Unbrand_XoNetwork__"
4848
+ },
4849
+ {
4850
+ "properties": {
4851
+ "href": {
4852
+ "type": "string"
4853
+ }
4854
+ },
4855
+ "required": [
4856
+ "href"
4857
+ ],
4858
+ "type": "object"
4859
+ }
4860
+ ]
4861
+ },
4862
+ "Unbrand_XoNetwork_": {
4863
+ "properties": {
4864
+ "$pool": {
4865
+ "type": "string"
4866
+ },
4867
+ "$poolId": {
4868
+ "type": "string",
4869
+ "deprecated": true
4870
+ },
4871
+ "_xapiRef": {
4872
+ "type": "string"
4873
+ },
4874
+ "uuid": {
4875
+ "type": "string"
4876
+ },
4877
+ "MTU": {
4878
+ "type": "number",
4879
+ "format": "double"
4880
+ },
4881
+ "PIFs": {
4882
+ "items": {
4883
+ "type": "string"
4884
+ },
4885
+ "type": "array"
4886
+ },
4887
+ "VIFs": {
4888
+ "items": {
4889
+ "type": "string"
4890
+ },
4891
+ "type": "array"
4892
+ },
4893
+ "automatic": {
4894
+ "type": "boolean"
4895
+ },
4896
+ "bridge": {
4897
+ "type": "string"
4898
+ },
4899
+ "current_operations": {
4900
+ "$ref": "#/components/schemas/Record_string.attaching_"
4901
+ },
4902
+ "defaultIsLocked": {
4903
+ "type": "boolean"
4904
+ },
4905
+ "id": {
4906
+ "type": "string"
4907
+ },
4908
+ "insecureNbd": {
4909
+ "type": "boolean"
4910
+ },
4911
+ "name_description": {
4912
+ "type": "string"
4913
+ },
4914
+ "name_label": {
4915
+ "type": "string"
4916
+ },
4917
+ "nbd": {
4918
+ "type": "boolean"
4919
+ },
4920
+ "other_config": {
4921
+ "$ref": "#/components/schemas/Record_string.string_"
4922
+ },
4923
+ "tags": {
4924
+ "items": {
4925
+ "type": "string"
4926
+ },
4927
+ "type": "array"
4928
+ },
4929
+ "type": {
4930
+ "type": "string",
4931
+ "enum": [
4932
+ "network"
4933
+ ],
4934
+ "nullable": false
4935
+ }
4936
+ },
4937
+ "required": [
4938
+ "$pool",
4939
+ "$poolId",
4940
+ "_xapiRef",
4941
+ "uuid",
4942
+ "MTU",
4943
+ "PIFs",
4944
+ "VIFs",
4945
+ "automatic",
4946
+ "bridge",
4947
+ "current_operations",
4948
+ "defaultIsLocked",
4949
+ "id",
4950
+ "name_description",
4951
+ "name_label",
4952
+ "other_config",
4953
+ "tags",
4954
+ "type"
4955
+ ],
4956
+ "type": "object"
4957
+ },
4762
4958
  "Partial_UnbrandedXoAlarm_": {
4763
4959
  "properties": {
4764
4960
  "$pool": {
@@ -5948,6 +6144,76 @@
5948
6144
  },
5949
6145
  "XapiHostStats": {
5950
6146
  "$ref": "#/components/schemas/XapiStatsResponse__cpus-Record_string.number-Array_--ioThroughput_58__r-Record_string.number-Array_--w-Record_string.number-Array__--iops_58__r-Record_string.number-Array_--w-Record_string.number-Array__--iowait-Record_string.number-Array_--latency_58__r-Record_string.number-Array_--w-Record_string.number-Array__--load-number-Array--memory-number-Array--memoryFree-number-Array--pifs_58__rx-Record_string.number-Array_--tx-Record_string.number-Array____"
6147
+ },
6148
+ "Partial_Unbrand_XoGroup__": {
6149
+ "properties": {
6150
+ "id": {
6151
+ "type": "string"
6152
+ },
6153
+ "name": {
6154
+ "type": "string"
6155
+ },
6156
+ "provider": {
6157
+ "type": "string"
6158
+ },
6159
+ "providerGroupId": {
6160
+ "type": "string"
6161
+ },
6162
+ "users": {
6163
+ "items": {
6164
+ "type": "string"
6165
+ },
6166
+ "type": "array"
6167
+ }
6168
+ },
6169
+ "type": "object",
6170
+ "description": "Make all properties in T optional"
6171
+ },
6172
+ "WithHref_Partial_Unbrand_XoGroup___": {
6173
+ "allOf": [
6174
+ {
6175
+ "$ref": "#/components/schemas/Partial_Unbrand_XoGroup__"
6176
+ },
6177
+ {
6178
+ "properties": {
6179
+ "href": {
6180
+ "type": "string"
6181
+ }
6182
+ },
6183
+ "required": [
6184
+ "href"
6185
+ ],
6186
+ "type": "object"
6187
+ }
6188
+ ]
6189
+ },
6190
+ "Unbrand_XoGroup_": {
6191
+ "properties": {
6192
+ "id": {
6193
+ "type": "string"
6194
+ },
6195
+ "name": {
6196
+ "type": "string"
6197
+ },
6198
+ "provider": {
6199
+ "type": "string"
6200
+ },
6201
+ "providerGroupId": {
6202
+ "type": "string"
6203
+ },
6204
+ "users": {
6205
+ "items": {
6206
+ "type": "string"
6207
+ },
6208
+ "type": "array"
6209
+ }
6210
+ },
6211
+ "required": [
6212
+ "id",
6213
+ "name",
6214
+ "users"
6215
+ ],
6216
+ "type": "object"
5951
6217
  }
5952
6218
  },
5953
6219
  "securitySchemes": {
@@ -5960,7 +6226,7 @@
5960
6226
  },
5961
6227
  "info": {
5962
6228
  "title": "@xen-orchestra/rest-api",
5963
- "version": "0.5.0",
6229
+ "version": "0.6.0",
5964
6230
  "description": "REST API to manage your XOA",
5965
6231
  "license": {
5966
6232
  "name": "AGPL-3.0-or-later"
@@ -9922,6 +10188,179 @@
9922
10188
  ]
9923
10189
  }
9924
10190
  },
10191
+ "/networks": {
10192
+ "get": {
10193
+ "operationId": "GetNetworks",
10194
+ "responses": {
10195
+ "200": {
10196
+ "description": "Ok",
10197
+ "content": {
10198
+ "application/json": {
10199
+ "schema": {
10200
+ "anyOf": [
10201
+ {
10202
+ "items": {
10203
+ "type": "string"
10204
+ },
10205
+ "type": "array"
10206
+ },
10207
+ {
10208
+ "items": {
10209
+ "$ref": "#/components/schemas/WithHref_Partial_Unbrand_XoNetwork___"
10210
+ },
10211
+ "type": "array"
10212
+ }
10213
+ ]
10214
+ },
10215
+ "examples": {
10216
+ "Example 1": {
10217
+ "value": [
10218
+ "/rest/v0/networks/9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f",
10219
+ "/rest/v0/networks/6b6ca0f5-6611-0636-4b0a-1fb1c8e96414"
10220
+ ]
10221
+ },
10222
+ "Example 2": {
10223
+ "value": [
10224
+ {
10225
+ "nbd": true,
10226
+ "name_label": "Host internal management network",
10227
+ "id": "9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f",
10228
+ "href": "/rest/v0/networks/9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f"
10229
+ },
10230
+ {
10231
+ "nbd": true,
10232
+ "name_label": "Lab v2 (VLAN 11)",
10233
+ "id": "6b6ca0f5-6611-0636-4b0a-1fb1c8e96414",
10234
+ "href": "/rest/v0/networks/6b6ca0f5-6611-0636-4b0a-1fb1c8e96414"
10235
+ }
10236
+ ]
10237
+ }
10238
+ }
10239
+ }
10240
+ }
10241
+ },
10242
+ "401": {
10243
+ "description": "Authentication required"
10244
+ }
10245
+ },
10246
+ "tags": [
10247
+ "networks"
10248
+ ],
10249
+ "security": [
10250
+ {
10251
+ "*": []
10252
+ }
10253
+ ],
10254
+ "parameters": [
10255
+ {
10256
+ "in": "query",
10257
+ "name": "fields",
10258
+ "required": false,
10259
+ "schema": {
10260
+ "type": "string"
10261
+ },
10262
+ "example": "nbd,name_label,id"
10263
+ },
10264
+ {
10265
+ "in": "query",
10266
+ "name": "filter",
10267
+ "required": false,
10268
+ "schema": {
10269
+ "type": "string"
10270
+ },
10271
+ "example": "nbd?"
10272
+ },
10273
+ {
10274
+ "in": "query",
10275
+ "name": "limit",
10276
+ "required": false,
10277
+ "schema": {
10278
+ "format": "double",
10279
+ "type": "number"
10280
+ },
10281
+ "example": 42
10282
+ }
10283
+ ]
10284
+ }
10285
+ },
10286
+ "/networks/{id}": {
10287
+ "get": {
10288
+ "operationId": "GetNetwork",
10289
+ "responses": {
10290
+ "200": {
10291
+ "description": "Ok",
10292
+ "content": {
10293
+ "application/json": {
10294
+ "schema": {
10295
+ "$ref": "#/components/schemas/Unbrand_XoNetwork_"
10296
+ },
10297
+ "examples": {
10298
+ "Example 1": {
10299
+ "value": {
10300
+ "automatic": false,
10301
+ "bridge": "xenapi",
10302
+ "current_operations": {},
10303
+ "defaultIsLocked": false,
10304
+ "MTU": 1500,
10305
+ "name_description": "Network on which guests will be assigned a private link-local IP address which can be used to talk XenAPI",
10306
+ "name_label": "Host internal management network",
10307
+ "other_config": {
10308
+ "is_guest_installer_network": "true",
10309
+ "is_host_internal_management_network": "true",
10310
+ "ip_begin": "169.254.0.1",
10311
+ "ip_end": "169.254.255.254",
10312
+ "netmask": "255.255.0.0"
10313
+ },
10314
+ "tags": [],
10315
+ "PIFs": [],
10316
+ "VIFs": [
10317
+ "2d039fc8-e522-75db-34c9-536b9553bd5a",
10318
+ "38623621-d30e-0307-dcef-eb7ed6c69f0c",
10319
+ "cc4b090f-5ff1-254b-558f-f7ac237e6fc5",
10320
+ "a9f3d042-a2e1-102f-74fc-ff1df41c6eb3"
10321
+ ],
10322
+ "nbd": false,
10323
+ "insecureNbd": false,
10324
+ "id": "9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f",
10325
+ "type": "network",
10326
+ "uuid": "9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f",
10327
+ "$pool": "b7569d99-30f8-178a-7d94-801de3e29b5b",
10328
+ "$poolId": "b7569d99-30f8-178a-7d94-801de3e29b5b",
10329
+ "_xapiRef": "OpaqueRef:eb906e77-2221-5399-4a26-60f0ad069b61"
10330
+ }
10331
+ }
10332
+ }
10333
+ }
10334
+ }
10335
+ },
10336
+ "401": {
10337
+ "description": "Authentication required"
10338
+ },
10339
+ "404": {
10340
+ "description": "Resource not found"
10341
+ }
10342
+ },
10343
+ "tags": [
10344
+ "networks"
10345
+ ],
10346
+ "security": [
10347
+ {
10348
+ "*": []
10349
+ }
10350
+ ],
10351
+ "parameters": [
10352
+ {
10353
+ "in": "path",
10354
+ "name": "id",
10355
+ "required": true,
10356
+ "schema": {
10357
+ "type": "string"
10358
+ },
10359
+ "example": "9fe12ca3-d75d-cfb0-492e-cfd2bc6c568f"
10360
+ }
10361
+ ]
10362
+ }
10363
+ },
9925
10364
  "/alarms": {
9926
10365
  "get": {
9927
10366
  "operationId": "GetAlarms",
@@ -16828,6 +17267,159 @@
16828
17267
  }
16829
17268
  ]
16830
17269
  }
17270
+ },
17271
+ "/groups": {
17272
+ "get": {
17273
+ "operationId": "GetGroups",
17274
+ "responses": {
17275
+ "200": {
17276
+ "description": "Ok",
17277
+ "content": {
17278
+ "application/json": {
17279
+ "schema": {
17280
+ "anyOf": [
17281
+ {
17282
+ "items": {
17283
+ "type": "string"
17284
+ },
17285
+ "type": "array"
17286
+ },
17287
+ {
17288
+ "items": {
17289
+ "$ref": "#/components/schemas/WithHref_Partial_Unbrand_XoGroup___"
17290
+ },
17291
+ "type": "array"
17292
+ }
17293
+ ]
17294
+ },
17295
+ "examples": {
17296
+ "Example 1": {
17297
+ "value": [
17298
+ "/rest/v0/groups/7d98fee4-3357-41a7-ac3f-9124212badb7",
17299
+ "/rest/v0/groups/7981ba62-c395-4546-bfa4-d1261653a77f"
17300
+ ]
17301
+ },
17302
+ "Example 2": {
17303
+ "value": [
17304
+ {
17305
+ "name": "group 1",
17306
+ "id": "7d98fee4-3357-41a7-ac3f-9124212badb7",
17307
+ "users": [
17308
+ "722d17b9-699b-49d2-8193-be1ac573d3de"
17309
+ ],
17310
+ "href": "/rest/v0/groups/7d98fee4-3357-41a7-ac3f-9124212badb7"
17311
+ },
17312
+ {
17313
+ "name": "group 2",
17314
+ "id": "7981ba62-c395-4546-bfa4-d1261653a77f",
17315
+ "users": [
17316
+ "722d17b9-699b-49d2-8193-be1ac573d3de",
17317
+ "088124f3-41b6-4258-9653-6eedc7b46111"
17318
+ ],
17319
+ "href": "/rest/v0/groups/7981ba62-c395-4546-bfa4-d1261653a77f"
17320
+ }
17321
+ ]
17322
+ }
17323
+ }
17324
+ }
17325
+ }
17326
+ },
17327
+ "401": {
17328
+ "description": "Authentication required"
17329
+ }
17330
+ },
17331
+ "tags": [
17332
+ "groups"
17333
+ ],
17334
+ "security": [
17335
+ {
17336
+ "*": []
17337
+ }
17338
+ ],
17339
+ "parameters": [
17340
+ {
17341
+ "in": "query",
17342
+ "name": "fields",
17343
+ "required": false,
17344
+ "schema": {
17345
+ "type": "string"
17346
+ },
17347
+ "example": "name,id,users"
17348
+ },
17349
+ {
17350
+ "in": "query",
17351
+ "name": "filter",
17352
+ "required": false,
17353
+ "schema": {
17354
+ "type": "string"
17355
+ },
17356
+ "example": "users:length:>0"
17357
+ },
17358
+ {
17359
+ "in": "query",
17360
+ "name": "limit",
17361
+ "required": false,
17362
+ "schema": {
17363
+ "format": "double",
17364
+ "type": "number"
17365
+ },
17366
+ "example": 42
17367
+ }
17368
+ ]
17369
+ }
17370
+ },
17371
+ "/groups/{id}": {
17372
+ "get": {
17373
+ "operationId": "GetGroup",
17374
+ "responses": {
17375
+ "200": {
17376
+ "description": "Ok",
17377
+ "content": {
17378
+ "application/json": {
17379
+ "schema": {
17380
+ "$ref": "#/components/schemas/Unbrand_XoGroup_"
17381
+ },
17382
+ "examples": {
17383
+ "Example 1": {
17384
+ "value": {
17385
+ "name": "group 1",
17386
+ "users": [
17387
+ "722d17b9-699b-49d2-8193-be1ac573d3de"
17388
+ ],
17389
+ "id": "7d98fee4-3357-41a7-ac3f-9124212badb7"
17390
+ }
17391
+ }
17392
+ }
17393
+ }
17394
+ }
17395
+ },
17396
+ "401": {
17397
+ "description": "Authentication required"
17398
+ },
17399
+ "404": {
17400
+ "description": "Resource not found"
17401
+ }
17402
+ },
17403
+ "tags": [
17404
+ "groups"
17405
+ ],
17406
+ "security": [
17407
+ {
17408
+ "*": []
17409
+ }
17410
+ ],
17411
+ "parameters": [
17412
+ {
17413
+ "in": "path",
17414
+ "name": "id",
17415
+ "required": true,
17416
+ "schema": {
17417
+ "type": "string"
17418
+ },
17419
+ "example": "7d98fee4-3357-41a7-ac3f-9124212badb7"
17420
+ }
17421
+ ]
17422
+ }
16831
17423
  }
16832
17424
  },
16833
17425
  "servers": [
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "main": "./dist/index.mjs",
7
7
  "name": "@xen-orchestra/rest-api",
8
8
  "homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/rest-api",
9
- "version": "0.5.0",
9
+ "version": "0.6.0",
10
10
  "description": "REST API to manage your XOA",
11
11
  "license": "AGPL-3.0-or-later",
12
12
  "private": false,