wmsstores.yaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: GeoServer WMS Stores
  6. description: A WMS store is a store whose source is another WMS. Also known as "Cascading WMS" or "Exernal WMS".
  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
  13. paths:
  14. /workspaces/{workspace}/wmsstores:
  15. get:
  16. operationId: getWMSStores
  17. tags:
  18. - "WMSStores"
  19. summary: Get a list of WMS stores
  20. description: Displays a list of all WMS stores on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/rest/workspaces/{workspace}/wmsstores.xml" for XML).
  21. produces:
  22. - application/xml
  23. - application/json
  24. - text/html
  25. responses:
  26. 200:
  27. description: OK
  28. schema:
  29. $ref: "#/definitions/WMSStoresList"
  30. examples:
  31. application/xml: |
  32. <wmsStores>
  33. <wmsStore>
  34. <name>altgs</name>
  35. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmsstores/altgs.xml" type="application/xml"/>
  36. </wmsStore>
  37. </wmsStores>
  38. application/json: |
  39. {"wmsStores":
  40. {"wmsStore": [
  41. {"name":"altgs",
  42. "href":"http://localhost:8080/geoserver/rest/workspaces/cite/wmsstores/altgs.json"}]}}
  43. post:
  44. operationId: postWMSStores
  45. tags:
  46. - "WMSStores"
  47. summary: Add a new WMS store
  48. description: Adds a new WMS store entry to the server.
  49. parameters:
  50. - name: workspace
  51. in: path
  52. required: true
  53. description: Name of the worskpace containing the WMS store.
  54. type: string
  55. - $ref: "#/parameters/WMSStorePost"
  56. consumes:
  57. - application/xml
  58. - application/json
  59. responses:
  60. 201:
  61. description: Created
  62. headers:
  63. Location:
  64. description: URL where the newly created store can be found
  65. type: string
  66. 401:
  67. description: Unauthorized
  68. put:
  69. operationId: putWMSStores
  70. tags:
  71. - "WMSStores"
  72. description: Invalid. Use POST for adding a new WMS store, or PUT on /workspaces/{workspace}/wmsstores/{wmsstore} to edit an existing WMS store.
  73. responses:
  74. 401:
  75. description: Unauthorized
  76. 405:
  77. description: Method Not Allowed
  78. delete:
  79. operationId: deleteWMSStores
  80. tags:
  81. - "WMSStores"
  82. description: Invalid. Use /workspaces/{workspace}/wmsstores/{wmsstore} instead.
  83. responses:
  84. 401:
  85. description: Unauthorized
  86. 405:
  87. description: Method Not Allowed
  88. /workspaces/{workspace}/wmsstores/{store}:
  89. get:
  90. operationId: getWMSStore
  91. tags:
  92. - "WMSStores"
  93. summary: Retrieve a WMS store in a given workspace
  94. description: Displays a representation of the WMS store. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}/wmsstores/{store}.xml" for XML). Defaults to HTML representation.
  95. produces:
  96. - application/xml
  97. - application/json
  98. - text/html
  99. parameters:
  100. - name: workspace
  101. in: path
  102. required: true
  103. description: The name of the workspace containing the WMS store.
  104. type: string
  105. - name: store
  106. in: path
  107. required: true
  108. description: The name of the store to be retrieved
  109. type: string
  110. - name: quietOnNotFound
  111. in: query
  112. required: false
  113. description: When set to true, avoids to log an Exception when the WMS store is not present. Note that 404 status code will be returned anyway.
  114. type: boolean
  115. responses:
  116. 200:
  117. description: OK
  118. schema:
  119. $ref: "#/definitions/WMSStoreInfo"
  120. examples:
  121. application/json: |
  122. {"wmsStore": {
  123. "name":"altgs",
  124. "type":"WMS",
  125. "enabled":true,
  126. "workspace": {"name":"cite", "href":"http://localhost:8080/geoserver/rest/workspaces/cite.json"},
  127. "metadata": {"entry":{"@key":"useConnectionPooling","$":"true"}},
  128. "_default":false,
  129. "capabilitiesURL":"http://localhost:8081/geoserver/wms?request=GetCapabilities",
  130. "maxConnections":6,
  131. "readTimeout":60,
  132. "connectTimeout":30,
  133. "wmsLayers":"http://localhost:8080/geoserver/rest/workspaces/cite/wmsstores/altgs/wmslayers.json"}}
  134. application/xml: |
  135. <wmsStore>
  136. <name>altgs</name>
  137. <type>WMS</type>
  138. <enabled>true</enabled>
  139. <workspace>
  140. <name>cite</name>
  141. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite.xml" type="application/xml"/>
  142. </workspace>
  143. <metadata>
  144. <entry key="useConnectionPooling">true</entry>
  145. </metadata>
  146. <__default>false</__default>
  147. <capabilitiesURL>http://localhost:8081/geoserver/wms?request=GetCapabilities</capabilitiesURL>
  148. <maxConnections>6</maxConnections>
  149. <readTimeout>60</readTimeout>
  150. <connectTimeout>30</connectTimeout>
  151. <wmsLayers>
  152. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmsstores/altgs/wmslayers.xml" type="application/xml"/>
  153. </wmsLayers>
  154. </wmsStore>
  155. 401:
  156. description: Unauthorized
  157. post:
  158. operationId: postWMSStore
  159. tags:
  160. - "WMSStores"
  161. description: Invalid. Use POST on /workspaces/{workspace}/WMSstores for adding a new WMS store, or PUT on /workspaces/{workspace}/WMSstores/{store} to edit/upload an existing WMS store.
  162. responses:
  163. 401:
  164. description: Unauthorized
  165. 405:
  166. description: Method Not Allowed
  167. put:
  168. operationId: putWMSStore
  169. tags:
  170. - "WMSStores"
  171. summary: Modify a single WMS store.
  172. description: Modifies a single WMS store. Use the "Accept:" header to specify format or append an extension to the endpoint (example "{store}.xml" for XML).
  173. parameters:
  174. - name: workspace
  175. in: path
  176. required: true
  177. description: The name of the worskpace containing the WMS stores.
  178. type: string
  179. - name: store
  180. in: path
  181. required: true
  182. description: The name of the store to be retrieved
  183. type: string
  184. - $ref: "#/parameters/WMSStorePut"
  185. consumes:
  186. - application/xml
  187. - application/json
  188. responses:
  189. 200:
  190. description: The WMS store was successfully updated.
  191. 401:
  192. description: Unauthorized
  193. delete:
  194. operationId: deleteWMSStore
  195. tags:
  196. - "WMSStores"
  197. summary: Delete WMS store
  198. description: Deletes a WMS store
  199. parameters:
  200. - name: workspace
  201. in: path
  202. required: true
  203. description: Name of the workspace containing the WMS store.
  204. type: string
  205. - name: store
  206. in: path
  207. required: true
  208. description: Name of the WMS store
  209. type: string
  210. - name: recurse
  211. in: query
  212. required: false
  213. description: When set to true all resources contained in the store are also removed.
  214. default: false
  215. type: boolean
  216. responses:
  217. 200:
  218. description: OK
  219. 401:
  220. description: Unauthorized
  221. parameters:
  222. WMSStorePost:
  223. name: WMSStoreBody
  224. description: |
  225. WMS store body information to upload.
  226. Examples:
  227. - application/xml:
  228. ```
  229. <wmsStore>
  230. <name>remote</name>
  231. <capabilitiesUrl>http://demo.geoserver.org/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities</capabilitiesUrl>
  232. </wmsStore>
  233. ```
  234. - application/json:
  235. ```
  236. {
  237. "wmsStore": {
  238. "name": "remote",
  239. "capabilitiesUrl": "http://demo.geoserver.org/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities"
  240. }
  241. }
  242. ```
  243. in: body
  244. required: true
  245. schema:
  246. $ref: "#/definitions/WMSStoreInfo"
  247. WMSStorePut:
  248. name: WMSStoreBody
  249. description: |
  250. WMS store body information to upload.
  251. For a PUT, only values which should be changed need to be included.
  252. Examples:
  253. - application/xml:
  254. ```
  255. <wmsStore>
  256. <description>A wms store</description>
  257. <enabled>true</enabled>
  258. <__default>true</__default>
  259. <capabilitiesUrl>http://demo.geoserver.org/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities</capabilitiesUrl>
  260. <user>admin</user>
  261. <password>geoserver</password>
  262. <maxConnections>6</maxConnections>
  263. <readTimeout>60</readTimeout>
  264. <connectTimeout>30</connectTimeout>
  265. </wmsStore>
  266. ```
  267. - application/json:
  268. ```
  269. {
  270. "wmsStore": {
  271. "description": "A wms store",
  272. "enabled": "true",
  273. "_default": "true",
  274. "capabilitiesUrl": "http://demo.geoserver.org/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities",
  275. "user": "admin",
  276. "password": "geoserver",
  277. "maxConnections": "6",
  278. "readTimeout": "60",
  279. "connectTimeout": "30"
  280. }
  281. }
  282. ```
  283. in: body
  284. required: true
  285. schema:
  286. $ref: "#/definitions/WMSStoreInfo"
  287. definitions:
  288. WMSStoresList:
  289. title: wmsStores
  290. type: array
  291. items:
  292. $ref: '#/definitions/WMSStoresListItem'
  293. WMSStoresListItem:
  294. title: wmsStore
  295. type: object
  296. properties:
  297. name:
  298. type: string
  299. description: Name of WMS Store
  300. link:
  301. type: string
  302. description: URL to WMS store representation
  303. WMSStoreInfo:
  304. type: object
  305. title: wmsStore
  306. xml:
  307. name: wmsStore
  308. properties:
  309. name:
  310. type: string
  311. description: Name of the WMS store
  312. description:
  313. type: string
  314. description: Description of the WMS store
  315. type:
  316. type: string
  317. description: Type of store. Set to WMS.
  318. enabled:
  319. type: boolean
  320. description: Whether the store is enabled
  321. workspace:
  322. type: object
  323. description: Workspace containing the store
  324. required: [name]
  325. properties:
  326. name:
  327. type: string
  328. description: Name of the workspace
  329. link:
  330. type: string
  331. description: Link to the workspace representation
  332. metadata:
  333. type: object
  334. description: Miscellaneous configuration details about the WMS store
  335. properties:
  336. entry:
  337. type: object
  338. properties:
  339. '@key':
  340. type: string
  341. enum:
  342. - useConnectionPooling
  343. description: Set to useConnectionPooling
  344. text:
  345. type: boolean
  346. description: Whether connection pooling is enabled
  347. __default__:
  348. type: boolean
  349. description: Whether the store is the default store of the workspace
  350. capabilitiesURL:
  351. type: string
  352. description: Location of the WMS capabilities URL where the store originates
  353. user:
  354. type: string
  355. description: User name to use when connecting to the remote WMS
  356. password:
  357. type: string
  358. description: Password or hash to use when connecting to the remote WMS
  359. maxConnections:
  360. type: number
  361. description: Maximum number of simultaneous connections to use
  362. readTimeout:
  363. type: string
  364. description: Time in seconds before read time out
  365. connectTimeout:
  366. type: string
  367. description: Time in seconds before connection time out
  368. wmsLayers:
  369. type: array
  370. items:
  371. type: object
  372. properties:
  373. link:
  374. type: string
  375. description: Link to the WMS layers representation