network.swagger.json 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "network.proto",
  5. "version": "version not set"
  6. },
  7. "schemes": [
  8. "http",
  9. "https"
  10. ],
  11. "consumes": [
  12. "application/json"
  13. ],
  14. "produces": [
  15. "application/json"
  16. ],
  17. "paths": {
  18. "/v1/network/associate": {
  19. "post": {
  20. "operationId": "Associate",
  21. "responses": {
  22. "200": {
  23. "description": "",
  24. "schema": {
  25. "$ref": "#/definitions/pbNetworkAssociateResponse"
  26. }
  27. }
  28. },
  29. "parameters": [
  30. {
  31. "name": "body",
  32. "in": "body",
  33. "required": true,
  34. "schema": {
  35. "$ref": "#/definitions/pbNetworkAssociateRequest"
  36. }
  37. }
  38. ],
  39. "tags": [
  40. "NetworkService"
  41. ]
  42. }
  43. },
  44. "/v1/network/create": {
  45. "post": {
  46. "operationId": "Create",
  47. "responses": {
  48. "200": {
  49. "description": "",
  50. "schema": {
  51. "$ref": "#/definitions/pbNetworkCreateResponse"
  52. }
  53. }
  54. },
  55. "parameters": [
  56. {
  57. "name": "body",
  58. "in": "body",
  59. "required": true,
  60. "schema": {
  61. "$ref": "#/definitions/pbNetworkCreateRequest"
  62. }
  63. }
  64. ],
  65. "tags": [
  66. "NetworkService"
  67. ]
  68. }
  69. },
  70. "/v1/network/delete": {
  71. "post": {
  72. "operationId": "Delete",
  73. "responses": {
  74. "200": {
  75. "description": "",
  76. "schema": {
  77. "$ref": "#/definitions/pbNetworkDeleteResponse"
  78. }
  79. }
  80. },
  81. "parameters": [
  82. {
  83. "name": "body",
  84. "in": "body",
  85. "required": true,
  86. "schema": {
  87. "$ref": "#/definitions/pbNetworkDeleteRequest"
  88. }
  89. }
  90. ],
  91. "tags": [
  92. "NetworkService"
  93. ]
  94. }
  95. },
  96. "/v1/network/dissociate": {
  97. "post": {
  98. "operationId": "Dissociate",
  99. "responses": {
  100. "200": {
  101. "description": "",
  102. "schema": {
  103. "$ref": "#/definitions/pbNetworkDissociateResponse"
  104. }
  105. }
  106. },
  107. "parameters": [
  108. {
  109. "name": "body",
  110. "in": "body",
  111. "required": true,
  112. "schema": {
  113. "$ref": "#/definitions/pbNetworkDissociateRequest"
  114. }
  115. }
  116. ],
  117. "tags": [
  118. "NetworkService"
  119. ]
  120. }
  121. },
  122. "/v1/network/getalltypes": {
  123. "post": {
  124. "operationId": "GetAllTypes",
  125. "responses": {
  126. "200": {
  127. "description": "",
  128. "schema": {
  129. "$ref": "#/definitions/pbNetworkGetAllTypesResponse"
  130. }
  131. }
  132. },
  133. "parameters": [
  134. {
  135. "name": "body",
  136. "in": "body",
  137. "required": true,
  138. "schema": {
  139. "$ref": "#/definitions/pbNetworkGetAllTypesRequest"
  140. }
  141. }
  142. ],
  143. "tags": [
  144. "NetworkService"
  145. ]
  146. }
  147. },
  148. "/v1/network/getassociatedusers": {
  149. "post": {
  150. "operationId": "GetAssociatedUsers",
  151. "responses": {
  152. "200": {
  153. "description": "",
  154. "schema": {
  155. "$ref": "#/definitions/pbNetworkGetAssociatedUsersResponse"
  156. }
  157. }
  158. },
  159. "parameters": [
  160. {
  161. "name": "body",
  162. "in": "body",
  163. "required": true,
  164. "schema": {
  165. "$ref": "#/definitions/pbNetworkGetAssociatedUsersRequest"
  166. }
  167. }
  168. ],
  169. "tags": [
  170. "NetworkService"
  171. ]
  172. }
  173. },
  174. "/v1/network/list": {
  175. "post": {
  176. "operationId": "List",
  177. "responses": {
  178. "200": {
  179. "description": "",
  180. "schema": {
  181. "$ref": "#/definitions/pbNetworkListResponse"
  182. }
  183. }
  184. },
  185. "parameters": [
  186. {
  187. "name": "body",
  188. "in": "body",
  189. "required": true,
  190. "schema": {
  191. "$ref": "#/definitions/pbNetworkListRequest"
  192. }
  193. }
  194. ],
  195. "tags": [
  196. "NetworkService"
  197. ]
  198. }
  199. }
  200. },
  201. "definitions": {
  202. "pbNetwork": {
  203. "type": "object",
  204. "properties": {
  205. "Name": {
  206. "type": "string"
  207. },
  208. "CIDR": {
  209. "type": "string"
  210. },
  211. "Type": {
  212. "type": "string"
  213. },
  214. "CreatedAt": {
  215. "type": "string"
  216. },
  217. "AssociatedUsernames": {
  218. "type": "array",
  219. "items": {
  220. "type": "string"
  221. }
  222. },
  223. "Via": {
  224. "type": "string"
  225. }
  226. }
  227. },
  228. "pbNetworkAssociateRequest": {
  229. "type": "object",
  230. "properties": {
  231. "Name": {
  232. "type": "string"
  233. },
  234. "Username": {
  235. "type": "string"
  236. }
  237. }
  238. },
  239. "pbNetworkAssociateResponse": {
  240. "type": "object"
  241. },
  242. "pbNetworkCreateRequest": {
  243. "type": "object",
  244. "properties": {
  245. "Name": {
  246. "type": "string"
  247. },
  248. "CIDR": {
  249. "type": "string"
  250. },
  251. "Type": {
  252. "type": "string"
  253. },
  254. "Via": {
  255. "type": "string"
  256. }
  257. }
  258. },
  259. "pbNetworkCreateResponse": {
  260. "type": "object",
  261. "properties": {
  262. "Network": {
  263. "$ref": "#/definitions/pbNetwork"
  264. }
  265. }
  266. },
  267. "pbNetworkDeleteRequest": {
  268. "type": "object",
  269. "properties": {
  270. "Name": {
  271. "type": "string"
  272. }
  273. }
  274. },
  275. "pbNetworkDeleteResponse": {
  276. "type": "object",
  277. "properties": {
  278. "Network": {
  279. "$ref": "#/definitions/pbNetwork"
  280. }
  281. }
  282. },
  283. "pbNetworkDissociateRequest": {
  284. "type": "object",
  285. "properties": {
  286. "Name": {
  287. "type": "string"
  288. },
  289. "Username": {
  290. "type": "string"
  291. }
  292. }
  293. },
  294. "pbNetworkDissociateResponse": {
  295. "type": "object"
  296. },
  297. "pbNetworkGetAllTypesRequest": {
  298. "type": "object"
  299. },
  300. "pbNetworkGetAllTypesResponse": {
  301. "type": "object",
  302. "properties": {
  303. "Types": {
  304. "type": "array",
  305. "items": {
  306. "$ref": "#/definitions/pbNetworkType"
  307. }
  308. }
  309. }
  310. },
  311. "pbNetworkGetAssociatedUsersRequest": {
  312. "type": "object",
  313. "properties": {
  314. "Name": {
  315. "type": "string"
  316. }
  317. }
  318. },
  319. "pbNetworkGetAssociatedUsersResponse": {
  320. "type": "object",
  321. "properties": {
  322. "Usernames": {
  323. "type": "array",
  324. "items": {
  325. "type": "string"
  326. }
  327. }
  328. }
  329. },
  330. "pbNetworkListRequest": {
  331. "type": "object"
  332. },
  333. "pbNetworkListResponse": {
  334. "type": "object",
  335. "properties": {
  336. "Networks": {
  337. "type": "array",
  338. "items": {
  339. "$ref": "#/definitions/pbNetwork"
  340. }
  341. }
  342. }
  343. },
  344. "pbNetworkType": {
  345. "type": "object",
  346. "properties": {
  347. "Type": {
  348. "type": "string"
  349. },
  350. "Description": {
  351. "type": "string"
  352. }
  353. }
  354. }
  355. }
  356. }