coveragestores.yaml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: GeoServer CoverageStores
  6. description: A coverage store describes how access a raster data source.
  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}/coveragestores:
  15. get:
  16. operationId: getCoverageStores
  17. tags:
  18. - "CoverageStores"
  19. summary: Get a list of all coverage stores in {workspace}
  20. description: Displays a list of all styles on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/coveragestores.xml" for XML). Defaults to HTML representation.
  21. produces:
  22. - text/html
  23. - application/json
  24. - application/xml
  25. parameters:
  26. - name: workspace
  27. in: path
  28. required: true
  29. description: The name of the workspace containing the coverage stores.
  30. type: string
  31. responses:
  32. 200:
  33. description: OK
  34. schema:
  35. $ref: "#/definitions/CoverageStoreList"
  36. examples:
  37. application/json: |
  38. {
  39. "coverageStores": {
  40. "coverageStore": [
  41. {
  42. "name": "arcGridSample",
  43. "href": "http://localhost:8080/geoserver/restng/workspaces/nurc/coveragestores/arcGridSample.json"
  44. },
  45. {
  46. "name": "worldImageSample",
  47. "href": "http://localhost:8080/geoserver/restng/workspaces/nurc/coveragestores/worldImageSample.json"
  48. }
  49. ]
  50. }
  51. }
  52. application/xml: |
  53. <coverageStores>
  54. <coverageStore>
  55. <name>arcGridSample</name>
  56. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/restng/workspaces/nurc/coveragestores/arcGridSample.xml" type="application/atom+xml"/>
  57. </coverageStore>
  58. <coverageStore>
  59. <name>worldImageSample</name>
  60. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/restng/workspaces/nurc/coveragestores/worldImageSample.xml" type="application/atom+xml"/>
  61. </coverageStore>
  62. </coverageStores>
  63. 401:
  64. description: Unauthorized
  65. post:
  66. operationId: postCoverageStores
  67. tags:
  68. - "CoverageStores"
  69. summary: Add a new coverage store
  70. description: Adds a new coverage store entry to the server.
  71. parameters:
  72. - name: workspace
  73. in: path
  74. required: true
  75. description: The name of the workspace containing the coverage stores.
  76. type: string
  77. - $ref: "#/parameters/CoverageStorePost"
  78. consumes:
  79. - application/xml
  80. - application/json
  81. responses:
  82. 201:
  83. description: Created
  84. schema:
  85. type: string
  86. headers:
  87. Location:
  88. description: URL where the newly created store can be found
  89. type: string
  90. 401:
  91. description: Unauthorized
  92. put:
  93. operationId: putCoverageStores
  94. tags:
  95. - "CoverageStores"
  96. description: Invalid. Use POST for adding a new coverage store, or PUT on /coveragestores/{store} to edit/upload an existing coverage store.
  97. responses:
  98. 401:
  99. description: Unauthorized
  100. 405:
  101. description: Method Not Allowed
  102. delete:
  103. operationId: deleteCoverageStores
  104. tags:
  105. - "CoverageStores"
  106. description: Invalid. Use /coverage/{style} instead.
  107. responses:
  108. 401:
  109. description: Unauthorized
  110. 405:
  111. description: Method Not Allowed
  112. /workspaces/{workspace}/coveragestores/{store}:
  113. get:
  114. operationId: getCoverageStore
  115. tags:
  116. - "CoverageStores"
  117. summary: Get a coverage store named {store} in the {workspace} workspace
  118. description: Displays a representation of the coverage store. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/{store}.xml" for XML). Defaults to HTML representation.
  119. produces:
  120. - text/html
  121. - application/json
  122. - application/xml
  123. parameters:
  124. - name: workspace
  125. in: path
  126. required: true
  127. description: The name of the workspace containing the coverage stores.
  128. type: string
  129. - name: store
  130. in: path
  131. required: true
  132. description: The name of the store to be retrieved
  133. type: string
  134. - name: quietOnNotFound
  135. in: query
  136. required: false
  137. description: When set to true, avoids logging an Exception when the coverage store is not present. Note that 404 status code will be returned anyway.
  138. type: boolean
  139. responses:
  140. 200:
  141. description: OK
  142. schema:
  143. $ref: "#/definitions/CoverageStoreInfo"
  144. examples:
  145. application/json: |
  146. {
  147. "coverageStore": {
  148. "name": "arcGridSample",
  149. "description": "Sample ASCII GRID coverage of Global rainfall.",
  150. "type": "ArcGrid",
  151. "enabled": true,
  152. "workspace": {
  153. "name": "nurc",
  154. "href": "http://localhost:8080/geoserver/restng/workspaces/nurc.json"
  155. },
  156. "_default": false,
  157. "url": "file:coverages/arc_sample/precip30min.asc",
  158. "coverages": "http://localhost:8080/geoserver/restng/workspaces/nurc/coveragestores/arcGridSample/coverages.json"
  159. }
  160. }
  161. application/xml: |
  162. <coverageStore>
  163. <name>arcGridSample</name>
  164. <description>Sample ASCII GRID coverage of Global rainfall.</description>
  165. <type>ArcGrid</type>
  166. <enabled>true</enabled>
  167. <workspace>
  168. <name>nurc</name>
  169. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/restng/workspaces/nurc.xml" type="application/atom+xml"/>
  170. </workspace>
  171. <__default>false</__default>
  172. <url>file:coverages/arc_sample/precip30min.asc</url>
  173. <coverages>
  174. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/restng/workspaces/nurc/coveragestores/arcGridSample/coverages.xml" type="application/atom+xml"/>
  175. </coverages>
  176. </coverageStore>
  177. 401:
  178. description: Unauthorized
  179. post:
  180. operationId: postCoverageStore
  181. tags:
  182. - "CoverageStores"
  183. description: Invalid. Use POST on /workspaces/{workspace}/coveragestores for adding a new coverage store, or PUT on /workspaces/{workspace}/coveragestores/{store} to edit/upload an existing coverage store.
  184. responses:
  185. 401:
  186. description: Unauthorized
  187. 405:
  188. description: Method Not Allowed
  189. put:
  190. operationId: putCoverageStore
  191. tags:
  192. - "CoverageStores"
  193. summary: Modify a single coverage store.
  194. description: Modifies a single coverage store. Use the "Accept:" header to specify format or append an extension to the endpoint (example "{store}.xml" for XML).
  195. parameters:
  196. - name: workspace
  197. in: path
  198. required: true
  199. description: The name of the workspace containing the coverage stores.
  200. type: string
  201. - name: store
  202. in: path
  203. required: true
  204. description: The name of the store to be retrieved
  205. type: string
  206. - $ref: "#/parameters/CoverageStorePut"
  207. consumes:
  208. - application/xml
  209. - application/json
  210. responses:
  211. 200:
  212. description: The coverage store was successfully updated.
  213. 401:
  214. description: Unauthorized
  215. delete:
  216. operationId: deleteCoverageStore
  217. tags:
  218. - "CoverageStores"
  219. summary: Delete coverage store
  220. description: Deletes a coverage store
  221. parameters:
  222. - name: workspace
  223. in: path
  224. required: true
  225. description: The name of the workspace containing the coverage stores.
  226. type: string
  227. - name: store
  228. in: path
  229. required: true
  230. description: The name of the store to be retrieved
  231. type: string
  232. - name: purge
  233. in: query
  234. required: false
  235. description: The purge parameter specifies if and how the underlying raster data source is deleted.
  236. Allowable values for this parameter are "none", "metadata", "all".
  237. When set to "none" data and auxiliary files are preserved.
  238. When set to "metadata" delete only auxiliary files and metadata. It’s recommended when data files (such as granules) should not be deleted from disk.
  239. Finally, when set to "all" both data and auxiliary files are removed.
  240. type: string
  241. - name: recurse
  242. in: query
  243. required: false
  244. description: The recurse controls recursive deletion. When set to true all resources contained in the store are also removed. The default value is "false".
  245. type: boolean
  246. responses:
  247. 200:
  248. description: OK
  249. 401:
  250. description: Unauthorized
  251. /workspaces/{workspace}/coveragestores/{store}/{method}.{format}:
  252. get:
  253. operationId: getCoverageStoreUpload
  254. tags:
  255. - "CoverageStores"
  256. description: Invalid, only used for uploads
  257. responses:
  258. 401:
  259. description: Unauthorized
  260. 405:
  261. description: Method Not Allowed
  262. post:
  263. operationId: postCoverageStoreUpload
  264. tags:
  265. - "CoverageStores"
  266. description: Used to harvest new granules in a writable structured grid coverage reader (e.g., image mosaic). Attempting to harvest a file into any other reader will result in a HTTP 405, method not allowed. Multiple granules can be uploaded by wrapping them in a ZIP file.
  267. parameters:
  268. - name: workspace
  269. in: path
  270. required: true
  271. description: The name of the workspace containing the coverage stores.
  272. type: string
  273. - name: store
  274. in: path
  275. required: true
  276. description: The name of the store to be retrieved
  277. type: string
  278. - name: method
  279. in: path
  280. required: true
  281. description: The upload method. Can be "url", "file", "external", "remote".
  282. "file" uploads a file from a local source. The body of the request is the file itself.
  283. "url" uploads a file from a remote source. The body of the request is a URL pointing to the file to upload. This URL must be visible from the server.
  284. "external" uses an existing file on the server. The body of the request is the absolute path to the existing file.
  285. "remote" uses a direct reference to a remote url, i.e. a file on a cloud storage. No data copy will occur. The body of the request is a URL pointing to the remote dataset.
  286. type: string
  287. - name: format
  288. in: path
  289. required: true
  290. description: The type of target coverage store (e.g., "imagemosaic")
  291. type: string
  292. - name: filename
  293. in: query
  294. required: false
  295. description: The filename parameter specifies the target file name for a file that needs to be harvested as part of a mosaic. This is important to avoid clashes and to make sure the right dimension values are available in the name for multidimensional mosaics to work. Only used if method="file".
  296. type: string
  297. - name: updateBBox
  298. in: query
  299. required: false
  300. description: When set to "true", triggers re-calculation of the layer native bbox. Defaults to "false".
  301. type: boolean
  302. responses:
  303. 200:
  304. description: The coverage store was successfully updated.
  305. 401:
  306. description: Unauthorized
  307. put:
  308. operationId: putCoverageStoreUpload
  309. tags:
  310. - "CoverageStores"
  311. summary: Creates or overwrites the files for a coverage store
  312. description: Creates or modified a single coverage store by uploading its raster data files. Multi-file stores like mosaic can be created by uploading a zip file and setting the content type to "application/zip"
  313. parameters:
  314. - name: workspace
  315. in: path
  316. required: true
  317. description: The name of the workspace containing the coverage stores.
  318. type: string
  319. - name: store
  320. in: path
  321. required: true
  322. description: The name of the store to be retrieved
  323. type: string
  324. - name: method
  325. in: path
  326. required: true
  327. description: The upload method. Can be "url", "file", "external", "remote".
  328. "file" uploads a file from a local source. The body of the request is the file itself.
  329. "url" uploads a file from a remote source. The body of the request is a URL pointing to the file to upload. This URL must be visible from the server.
  330. "external" uses an existing file on the server. The body of the request is the absolute path to the existing file.
  331. "remote" uses a direct reference to a remote url, i.e. a file on a cloud storage. No data copy will occur. The body of the request is a URL pointing to the remote dataset.
  332. type: string
  333. - name: format
  334. in: path
  335. required: true
  336. description: The type of target coverage store (e.g., "imagemosaic")
  337. type: string
  338. - name: configure
  339. in: query
  340. required: false
  341. description: The configure parameter controls if a coverage/layer are configured upon file upload, in addition to creating the store. It can have a value of "none" to avoid configuring coverages.
  342. type: string
  343. - name: USE_JAI_IMAGEREAD
  344. in: query
  345. required: false
  346. description: Whether to use deferred loading while configuring the coverage/layer.
  347. type: string
  348. - name: coverageName
  349. in: query
  350. required: false
  351. description: Name of the newly created coverage/layer.
  352. type: string
  353. - name: filename
  354. in: query
  355. required: false
  356. description: The filename parameter specifies the target file name for a file that needs to be harvested as part of a mosaic. This is important to avoid clashes and to make sure the right dimension values are available in the name for multidimensional mosaics to work. Only used if method="file".
  357. type: string
  358. responses:
  359. 200:
  360. description: The coverage store was successfully updated.
  361. 401:
  362. description: Unauthorized
  363. delete:
  364. operationId: deleteCoverageStoreUpload
  365. tags:
  366. - "CoverageStores"
  367. description: Invalid, only used for uploads
  368. responses:
  369. 401:
  370. description: Unauthorized
  371. 405:
  372. description: Method Not Allowed
  373. /workspaces/{workspace}/coveragestores/{store}/reset:
  374. put:
  375. operationId: putCoverageStoreReset
  376. tags:
  377. - "CoverageStores"
  378. summary: Reset the caches related to this specific coverage store.
  379. description: Resets raster caches for this coverage store. This operation is used to force GeoServer to drop caches associated to this coverage store, and reconnect to the raster source the next time it is needed by a request. This is useful as the readers often cache some information about the bounds, coordinate system and image structure that might have changed in the meantime.
  380. parameters:
  381. - name: workspace
  382. in: path
  383. type: string
  384. required: true
  385. description: The name of the workspace containing the coverage store.
  386. - name: store
  387. in: path
  388. required: true
  389. description: The name of the coverage store to modify.
  390. type: string
  391. responses:
  392. 200:
  393. description: OK
  394. post:
  395. operationId: postCoverageStoreReset
  396. tags:
  397. - "CoverageStores"
  398. summary: Reset the caches related to this specific coverage store.
  399. description: Resets raster caches for this coverage store. This operation is used to force GeoServer to drop caches associated to this coverage store, and reconnect to the raster source the next time it is needed by a request. This is useful as the readers often cache some information about the bounds, coordinate system and image structure that might have changed in the meantime.
  400. parameters:
  401. - name: workspace
  402. in: path
  403. type: string
  404. required: true
  405. description: The name of the workspace containing the coverage store.
  406. - name: store
  407. in: path
  408. required: true
  409. description: The name of the coverage store to modify.
  410. type: string
  411. responses:
  412. 200:
  413. description: OK
  414. parameters:
  415. CoverageStorePost:
  416. name: coverageStoreBody
  417. description: |
  418. The coverage store body information to upload.
  419. Examples:
  420. - application/xml:
  421. ```
  422. <coverageStore>
  423. <name>nyc</name>
  424. <url>file:/path/to/file.tiff</url>
  425. </coverageStore>
  426. ```
  427. - application/json:
  428. ```
  429. {
  430. "coverageStore": {
  431. "name": "nyc",
  432. "url": "file:/path/to/file.tiff"
  433. }
  434. }
  435. ```
  436. in: body
  437. required: true
  438. schema:
  439. $ref: "#/definitions/CoverageStoreInfo"
  440. CoverageStorePut:
  441. name: coverageStoreBody
  442. description: |
  443. The coverage store body information to upload.
  444. For a PUT, only values which should be changed need to be included.
  445. Examples:
  446. - application/xml:
  447. ```
  448. <coverageStore>
  449. <description>A coverage store</description>
  450. <enabled>true</enabled>
  451. <__default>true</__default>
  452. <url>file:/path/to/file.tiff</url>
  453. </coverageStore>
  454. ```
  455. - application/json:
  456. ```
  457. {
  458. "coverageStore": {
  459. "description": "A coverage store",
  460. "enabled": "true",
  461. "_default": "true",
  462. "url": "file:/path/to/file.tiff"
  463. }
  464. }
  465. ```
  466. in: body
  467. required: true
  468. schema:
  469. $ref: "#/definitions/CoverageStoreInfo"
  470. definitions:
  471. CoverageStoreInfo:
  472. type: object
  473. required: [ name, type ]
  474. example: |
  475. <coverageStore>
  476. <name>arcGridSample</name>
  477. <description>Sample ASCII GRID coverage of Global rainfall.</description>
  478. <type>ArcGrid</type>
  479. <enabled>true</enabled>
  480. <workspace>
  481. <name>nurc</name>
  482. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/nurc.xml" type="application/xml"/>
  483. </workspace>
  484. <__default>false</__default>
  485. <url>file:coverages/arc_sample/precip30min.asc</url>
  486. <coverages>
  487. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/nurc/coveragestores/arcGridSample/coverages.xml" type="application/xml"/>
  488. </coverages>
  489. </coverageStore>
  490. properties:
  491. name:
  492. type: string
  493. description: Name of the coverage store
  494. description:
  495. type: string
  496. description: Description of the coverage store
  497. type:
  498. type: string
  499. description: Type of coverage store
  500. enabled:
  501. type: boolean
  502. description: Whether the store is enabled, or not
  503. workspace:
  504. type: object
  505. description: The workspace containing the store
  506. required: [name]
  507. properties:
  508. name:
  509. type: string
  510. description: Name of the workspace
  511. link:
  512. type: string
  513. description: A link to the workspace representation
  514. __default__:
  515. type: boolean
  516. description: Whether the store is the default store of the workspace
  517. url:
  518. type: string
  519. description: Location of the raster data source (often, but not necessarily, a file). Can be relative to the data directory.
  520. coverages:
  521. type: object
  522. properties:
  523. link:
  524. type: string
  525. description: A link to the list of coverages contained in this store
  526. CoverageStoreListItem:
  527. type: object
  528. properties:
  529. name:
  530. type: string
  531. description: Name of coverage store
  532. href:
  533. type: string
  534. description: URL to coverage store definition
  535. CoverageStoreList:
  536. type: array
  537. items:
  538. $ref: '#/definitions/CoverageStoreListItem'