usergroup.yaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: Users and Groups
  6. description: Organisation of security users and groups
  7. contact:
  8. name: GeoServer
  9. email: 'geoserver-users@osgeo.org'
  10. url: 'https://geoserver.org/comm/'
  11. host: localhost:8080
  12. basePath: /geoserver/rest/security
  13. paths:
  14. /usergroup/users/:
  15. get:
  16. operationId: usersDefaultGet
  17. tags:
  18. - "UserGroup"
  19. summary: Query all users
  20. description: Query all users in the default user/group service.
  21. produces:
  22. - application/xml
  23. - application/json
  24. responses:
  25. 200:
  26. description: OK
  27. schema:
  28. $ref: "#/definitions/Users"
  29. post:
  30. operationId: usersDefaultPost
  31. tags:
  32. - "UserGroup"
  33. summary: Add a new user
  34. description: Add a new user to the default user/group service
  35. parameters:
  36. - name: usersDefaultPostBody
  37. description: the new user's details
  38. in: body
  39. required: true
  40. schema:
  41. $ref: "#/definitions/User"
  42. consumes:
  43. - application/json
  44. - application/xml
  45. responses:
  46. 201:
  47. description: Created
  48. headers:
  49. ID:
  50. description: ID of the newly created user
  51. type: string
  52. /usergroup/service/{serviceName}/users/:
  53. get:
  54. operationId: usersGet
  55. tags:
  56. - "UserGroup"
  57. summary: Query all users
  58. description: Query all users in a particular user/group service.
  59. produces:
  60. - application/xml
  61. - application/json
  62. parameters:
  63. - name: serviceName
  64. description: the name of the user/group service
  65. in: path
  66. required: true
  67. type: string
  68. responses:
  69. 200:
  70. description: OK
  71. schema:
  72. $ref: "#/definitions/Users"
  73. post:
  74. operationId: usersPost
  75. tags:
  76. - "UserGroup"
  77. summary: Add a new user
  78. description: Add a new user to a particular user/group service.
  79. consumes:
  80. - application/json
  81. - application/xml
  82. parameters:
  83. - name: serviceName
  84. description: the name of the user/group service
  85. in: path
  86. required: true
  87. type: string
  88. - name: usersPostBody
  89. description: the new user's details
  90. in: body
  91. required: true
  92. schema:
  93. $ref: "#/definitions/User"
  94. responses:
  95. 201:
  96. description: Created
  97. headers:
  98. ID:
  99. description: ID of the newly created user
  100. type: string
  101. /usergroup/user/{user}:
  102. post:
  103. operationId: userDefaultPost
  104. tags:
  105. - "UserGroup"
  106. summary: Modify a user
  107. description: Modify a user in the default user/group service, unspecified fields remain unchanged.
  108. consumes:
  109. - application/json
  110. - application/xml
  111. parameters:
  112. - name: user
  113. description: the name of the user
  114. in: path
  115. required: true
  116. type: string
  117. - name: userDefaultPostBody
  118. description: the new user's details
  119. in: body
  120. required: true
  121. schema:
  122. $ref: "#/definitions/User"
  123. responses:
  124. 200:
  125. description: OK
  126. delete:
  127. operationId: userDefaultDelete
  128. tags:
  129. - "UserGroup"
  130. summary: Delete a user
  131. description: Delete a user in the default user/group service.
  132. consumes:
  133. - application/json
  134. - application/xml
  135. parameters:
  136. - name: user
  137. description: the name of the user
  138. in: path
  139. required: true
  140. type: string
  141. responses:
  142. 200:
  143. description: OK
  144. /usergroup/service/{serviceName}/user/{user}:
  145. post:
  146. operationId: userPost
  147. tags:
  148. - "UserGroup"
  149. summary: Modify a user
  150. description: Modify a user in a particular user/group service, unspecified fields remain unchanged.
  151. consumes:
  152. - application/json
  153. - application/xml
  154. parameters:
  155. - name: serviceName
  156. description: the name of the user/group service
  157. in: path
  158. required: true
  159. type: string
  160. - name: user
  161. description: the name of the user
  162. in: path
  163. required: true
  164. type: string
  165. - name: userPostBody
  166. description: the new user's details
  167. in: body
  168. required: true
  169. schema:
  170. $ref: "#/definitions/User"
  171. responses:
  172. 200:
  173. description: OK
  174. delete:
  175. operationId: userDelete
  176. tags:
  177. - "UserGroup"
  178. summary: Delete a user
  179. description: Delete a user in a particular user/group service.
  180. consumes:
  181. - application/json
  182. - application/xml
  183. parameters:
  184. - name: serviceName
  185. description: the name of the user/group service
  186. in: path
  187. required: true
  188. type: string
  189. - name: user
  190. description: the name of the user
  191. in: path
  192. required: true
  193. type: string
  194. responses:
  195. 200:
  196. description: OK
  197. /usergroup/group/{group}/users:
  198. get:
  199. operationId: groupDefaultUserGet
  200. tags:
  201. - "UserGroup"
  202. summary: Query all users for a group
  203. description: Query all users for a group in the default user/group service.
  204. produces:
  205. - application/xml
  206. - application/json
  207. parameters:
  208. - name: group
  209. description: the name of the group
  210. in: path
  211. required: true
  212. type: string
  213. responses:
  214. 200:
  215. description: OK
  216. schema:
  217. $ref: "#/definitions/Users"
  218. /usergroup/user/{user}/groups:
  219. get:
  220. operationId: userDefaultGroupGet
  221. tags:
  222. - "UserGroup"
  223. summary: Query all groups for a user
  224. description: Query all groups for a user in the default user/group service.
  225. produces:
  226. - application/xml
  227. - application/json
  228. parameters:
  229. - name: user
  230. description: the name of the user
  231. in: path
  232. required: true
  233. type: string
  234. responses:
  235. 200:
  236. description: OK
  237. schema:
  238. $ref: "#/definitions/Groups"
  239. /usergroup/user/{user}/group/{group}:
  240. post:
  241. operationId: userGroupDefaultPost
  242. tags:
  243. - "UserGroup"
  244. summary: Associate a user with a group
  245. description: Associate a user with a group in the default user/group service.
  246. produces:
  247. - application/xml
  248. - application/json
  249. parameters:
  250. - name: user
  251. description: the name of the user
  252. in: path
  253. required: true
  254. type: string
  255. - name: group
  256. description: the name of the group
  257. in: path
  258. required: true
  259. type: string
  260. responses:
  261. 200:
  262. description: OK
  263. delete:
  264. operationId: userGroupDefaultDelete
  265. tags:
  266. - "UserGroup"
  267. summary: Unassociate a user from a group
  268. description: Unassociate a user from a group in the default user/group service.
  269. produces:
  270. - application/xml
  271. - application/json
  272. parameters:
  273. - name: user
  274. description: the name of the user
  275. in: path
  276. required: true
  277. type: string
  278. - name: group
  279. description: the name of the group
  280. in: path
  281. required: true
  282. type: string
  283. responses:
  284. 200:
  285. description: OK
  286. /usergroup/service/{serviceName}/group/{group}/users:
  287. get:
  288. operationId: groupUserGet
  289. tags:
  290. - "UserGroup"
  291. summary: Query all users for a group
  292. description: Query all users for a group in a particular user/group service.
  293. produces:
  294. - application/xml
  295. - application/json
  296. parameters:
  297. - name: serviceName
  298. description: the name of the user/group service
  299. in: path
  300. required: true
  301. type: string
  302. - name: group
  303. description: the name of the group
  304. in: path
  305. required: true
  306. type: string
  307. responses:
  308. 200:
  309. description: OK
  310. schema:
  311. $ref: "#/definitions/Users"
  312. /usergroup/service/{serviceName}/user/{user}/groups:
  313. get:
  314. operationId: userGroupGet
  315. tags:
  316. - "UserGroup"
  317. summary: Query all groups for a user
  318. description: Query all groups for a user in a particular user/group service.
  319. produces:
  320. - application/xml
  321. - application/json
  322. parameters:
  323. - name: serviceName
  324. description: the name of the user/group service
  325. in: path
  326. required: true
  327. type: string
  328. - name: user
  329. description: the name of the user
  330. in: path
  331. required: true
  332. type: string
  333. responses:
  334. 200:
  335. description: OK
  336. schema:
  337. $ref: "#/definitions/Groups"
  338. /usergroup/service/{serviceName}/user/{user}/group/{group}:
  339. post:
  340. operationId: userGroupPost
  341. tags:
  342. - "UserGroup"
  343. summary: Associate a user with a group
  344. description: Associate a user with a group in a particular user/group service.
  345. produces:
  346. - application/xml
  347. - application/json
  348. parameters:
  349. - name: serviceName
  350. description: the name of the user/group service
  351. in: path
  352. required: true
  353. type: string
  354. - name: user
  355. description: the name of the user
  356. in: path
  357. required: true
  358. type: string
  359. - name: group
  360. description: the name of the group
  361. in: path
  362. required: true
  363. type: string
  364. responses:
  365. 200:
  366. description: OK
  367. delete:
  368. operationId: userGroupDelete
  369. tags:
  370. - "UserGroup"
  371. summary: Unassociate a user from a group
  372. description: Unassociate a user from a group in a particular user/group service.
  373. produces:
  374. - application/xml
  375. - application/json
  376. parameters:
  377. - name: serviceName
  378. description: the name of the user/group service
  379. in: path
  380. required: true
  381. type: string
  382. - name: user
  383. description: the name of the user
  384. in: path
  385. required: true
  386. type: string
  387. - name: group
  388. description: the name of the group
  389. in: path
  390. required: true
  391. type: string
  392. responses:
  393. 200:
  394. description: OK
  395. /usergroup/groups/:
  396. get:
  397. operationId: groupsDefaultGet
  398. tags:
  399. - "UserGroup"
  400. summary: Query all groups
  401. description: Query all groups in the default user/group service.
  402. produces:
  403. - application/xml
  404. - application/json
  405. responses:
  406. 200:
  407. description: OK
  408. schema:
  409. $ref: "#/definitions/Groups"
  410. /usergroup/group/{group}:
  411. post:
  412. operationId: groupDefaultPost
  413. tags:
  414. - "UserGroup"
  415. summary: Add a group
  416. description: Add a group in the default user/group service.
  417. consumes:
  418. - application/json
  419. - application/xml
  420. parameters:
  421. - name: group
  422. description: the name of the group
  423. in: path
  424. required: true
  425. type: string
  426. responses:
  427. 200:
  428. description: OK
  429. delete:
  430. operationId: groupDefaultDelete
  431. tags:
  432. - "UserGroup"
  433. summary: Delete a group
  434. description: Delete a group in the default user/group service.
  435. consumes:
  436. - application/json
  437. - application/xml
  438. parameters:
  439. - name: group
  440. description: the name of the group
  441. in: path
  442. required: true
  443. type: string
  444. responses:
  445. 200:
  446. description: OK
  447. /usergroup/service/{serviceName}/groups/:
  448. get:
  449. operationId: groupsGet
  450. tags:
  451. - "UserGroup"
  452. summary: Query all groups
  453. description: Query all groups in a particular user/group service.
  454. produces:
  455. - application/xml
  456. - application/json
  457. parameters:
  458. - name: serviceName
  459. description: the name of the group group service
  460. in: path
  461. required: true
  462. type: string
  463. responses:
  464. 200:
  465. description: OK
  466. schema:
  467. $ref: "#/definitions/Groups"
  468. /usergroup/service/{serviceName}/group/{group}:
  469. post:
  470. operationId: groupPost
  471. tags:
  472. - "UserGroup"
  473. summary: Add a group
  474. description: Add a group in a particular user/group service.
  475. consumes:
  476. - application/json
  477. - application/xml
  478. parameters:
  479. - name: serviceName
  480. description: the name of the user/group service
  481. in: path
  482. required: true
  483. type: string
  484. - name: group
  485. description: the name of the group
  486. in: path
  487. required: true
  488. type: string
  489. responses:
  490. 200:
  491. description: OK
  492. delete:
  493. operationId: groupDelete
  494. tags:
  495. - "UserGroup"
  496. summary: Delete a group
  497. description: Delete a group in a particular user/group service.
  498. consumes:
  499. - application/json
  500. - application/xml
  501. parameters:
  502. - name: serviceName
  503. description: the name of the user/group service
  504. in: path
  505. required: true
  506. type: string
  507. - name: group
  508. description: the name of the group
  509. in: path
  510. required: true
  511. type: string
  512. responses:
  513. 200:
  514. description: OK
  515. definitions:
  516. Users:
  517. title: users
  518. xml:
  519. name: users
  520. type: array
  521. items:
  522. $ref: "#/definitions/User"
  523. User:
  524. title: user
  525. xml:
  526. name: user
  527. type: object
  528. properties:
  529. userName:
  530. type: string
  531. password:
  532. type: string
  533. enabled:
  534. type: boolean
  535. enum:
  536. - true
  537. - false
  538. Groups:
  539. title: groups
  540. xml:
  541. name: groups
  542. type: array
  543. items:
  544. $ref: "#/definitions/Group"
  545. Group:
  546. title: group
  547. xml:
  548. name: group
  549. type: string