Setup micro-service of multivim broker
[multicloud/framework.git] / multivimbroker / multivimbroker / swagger / multivim.tenant.swagger.json
1 {
2     "swagger": "2.0",
3     "info": {
4         "version": "1.0.0",
5         "title": "MultiVIM Service rest API"
6     },
7     "basePath": "/openoapi/multivim/v1/",
8     "tags": [
9         {
10             "name": "MultiVIM broker"
11         }
12     ],
13     "paths": {
14         "/{vimid}/tenants": {
15             "get": {
16                 "tags": [
17                     "vim tenants"
18                 ],
19                 "summary": "query vim tenants list",
20                 "description": "query vim tenants list",
21                 "operationId": "query_vim_tenants",
22                 "consumes": [
23                     "application/json"
24                 ],
25                 "produces": [
26                     "application/json"
27                 ],
28                 "parameters": [
29                     {
30                         "name": "vimid",
31                         "in": "path",
32                         "description": "vim instance id",
33                         "required": true,
34                         "type": "string"
35                     },
36                     {
37                         "in": "body",
38                         "name": "body",
39                         "description": "get a list of vim tenants request param",
40                         "required": false,
41                         "schema": {
42                             "$ref": "#/definitions/ListVimTenants"
43                         }
44                     }
45                 ],
46                 "responses": {
47                     "200": {
48                         "description": "successful operation",
49                         "schema": {
50                             "$ref": "#/definitions/VimTenantsInfo"
51                         }
52                     },
53                     "404": {
54                         "description": "the vim id is wrong"
55                     },
56                     "500": {
57                         "description": "the vim tenants is not accessable"
58                     }
59                 }
60             }
61         }
62     },
63     "definitions": {
64         "ListVimTenants": {
65             "type": "object",
66             "properties": {
67                 "name": {
68                     "type": "string",
69                     "description": "tenant name to filter tenant list"
70                 }
71             }
72         },
73         "VimTenantsInfo": {
74             "type": "object",
75             "required": [
76                 "vimId",
77                 "tenants"
78             ],
79             "properties": {
80                 "vimId": {
81                     "type": "string"
82                 },
83                 "vimName": {
84                     "type": "string"
85                 },
86                 "tenants": {
87                     "type": "array",
88                     "description": "tenant list information",
89                     "items": {
90                        "$ref": "#/definitions/VimTenantInfo"
91                     }
92                 }
93             }
94         },
95         "VimTenantInfo": {
96             "type": "object",
97             "required": [
98                 "name",
99                 "id"
100             ],
101             "properties": {
102                 "name": {
103                     "type": "string",
104                     "description": "tenant name"
105                 },
106                 "id": {
107                     "type": "string",
108                     "description": "tenant UUID"
109                 },
110                 "vimId": {
111                     "type": "string"
112                 },
113                 "vimName": {
114                     "type": "string"
115                 }
116             }
117         }
118     }
119 }