importerData.yaml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: GeoServer Importer Extension - Data
  6. description: The Importer extension gives a GeoServer administrator an alternate, more-streamlined method for uploading and configuring new layers. The data endpoint controls uploading layer data to specific import jobs. The importer extension is an optional install and may not be available on all deployments of GeoServer
  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. /imports/{importId}/data:
  15. get:
  16. operationId: getData
  17. tags:
  18. - "ImporterData"
  19. summary: Retrieve the database connection parameters for an import with id {importId}. Only applies to database imports.
  20. description: Get import data
  21. produces:
  22. - application/json
  23. - text/html
  24. parameters:
  25. - $ref: "#/parameters/ImportId"
  26. - $ref: "#/parameters/ExpandParameter"
  27. responses:
  28. 200:
  29. description: OK
  30. schema:
  31. $ref: "#/definitions/Database"
  32. /imports/{importId}/tasks/{taskId}/data:
  33. get:
  34. operationId: getTaskData
  35. tags:
  36. - "ImporterData"
  37. summary: Retrieve the table description for a task with id {taskId} within import with id {importId}. Only applies to database imports.
  38. produces:
  39. - application/json
  40. - text/html
  41. parameters:
  42. - $ref: "#/parameters/ImportId"
  43. - $ref: "#/parameters/TaskId"
  44. - $ref: "#/parameters/ExpandParameter"
  45. responses:
  46. 200:
  47. description: OK
  48. schema:
  49. $ref: "#/definitions/Table"
  50. /imports/{importId}/data/files:
  51. get:
  52. operationId: getDataFiles
  53. tags:
  54. - "ImporterData"
  55. summary: Retrieve the list of files for an import with id {importId}. Only applies to file/directory imports.
  56. produces:
  57. - application/json
  58. - text/html
  59. parameters:
  60. - $ref: "#/parameters/ImportId"
  61. - $ref: "#/parameters/ExpandParameter"
  62. responses:
  63. 200:
  64. description: OK
  65. schema:
  66. $ref: "#/definitions/Directory"
  67. /imports/{importId}/data/files/{filename}:
  68. get:
  69. operationId: getDataFile
  70. tags:
  71. - "ImporterData"
  72. summary: Retrieve information about the file with id {fileId} from the data of an import with id {importId}. Only applies to file/directory imports.
  73. produces:
  74. - application/json
  75. - text/html
  76. parameters:
  77. - $ref: "#/parameters/ImportId"
  78. - $ref: "#/parameters/Filename"
  79. - $ref: "#/parameters/ExpandParameter"
  80. responses:
  81. 200:
  82. description: OK
  83. schema:
  84. $ref: "#/definitions/File"
  85. delete:
  86. operationId: deleteImportDataFile
  87. tags:
  88. - "ImporterData"
  89. summary: Remove a specific file with id {filename} from the import with id {importId}. Only applies to file/directory imports.
  90. responses:
  91. 204:
  92. description: No Content
  93. /imports/{importId}/tasks/{taskId}/data/files:
  94. get:
  95. operationId: getTaskDataFiles
  96. tags:
  97. - "ImporterData"
  98. summary: Retrieve the list of files for a task with id {taskId} within import with id {importId}. Only applies to file/directory imports.
  99. produces:
  100. - application/json
  101. - text/html
  102. parameters:
  103. - $ref: "#/parameters/ImportId"
  104. - $ref: "#/parameters/TaskId"
  105. - $ref: "#/parameters/ExpandParameter"
  106. responses:
  107. 200:
  108. description: OK
  109. schema:
  110. $ref: "#/definitions/Directory"
  111. /imports/{importId}/tasks/{taskId}/data/files/{filename}:
  112. get:
  113. operationId: getTaskDataFile
  114. tags:
  115. - "ImporterData"
  116. summary: Retrieve information about the file with id {fileId} from the data of a task with id {taskId} within import with id {importId}. Only applies to file/directory imports.
  117. produces:
  118. - application/json
  119. - text/html
  120. parameters:
  121. - $ref: "#/parameters/ImportId"
  122. - $ref: "#/parameters/TaskId"
  123. - $ref: "#/parameters/Filename"
  124. - $ref: "#/parameters/ExpandParameter"
  125. responses:
  126. 200:
  127. description: OK
  128. schema:
  129. $ref: "#/definitions/File"
  130. delete:
  131. operationId: deleteTaskDataFile
  132. tags:
  133. - "ImporterData"
  134. summary: Remove a specific file with id {filename} from the task with id {taskId} within import with id {importId}. Only applies to file/directory imports.
  135. responses:
  136. 204:
  137. description: No Content
  138. parameters:
  139. ExpandParameter:
  140. name: expand
  141. type: string
  142. in: query
  143. description: 'What level to expand the response object to. Can be "self" (expand only the response object and its immediate children), "all" (expand all children), "none" (don''t include any children), or a nonnegative integer, indicating the depth of children to expand to.'
  144. default: self
  145. required: false
  146. ImportId:
  147. name: importId
  148. in: path
  149. description: The ID of the import
  150. required: true
  151. type: string
  152. TaskId:
  153. name: taskId
  154. in: path
  155. description: The ID of the task
  156. required: true
  157. type: string
  158. Filename:
  159. name: filename
  160. in: path
  161. description: The filename
  162. required: true
  163. type: string
  164. definitions:
  165. Files:
  166. title: files
  167. type: array
  168. description: List of file descriptors
  169. items:
  170. $ref: "#/definitions/FileContents"
  171. File:
  172. title: file
  173. type: object
  174. description: An import data object representing a spatial file or granule
  175. properties:
  176. type:
  177. type: string
  178. description: '"file"'
  179. format:
  180. type: string
  181. description: Format of the file
  182. href:
  183. type: string
  184. description: URL to the file endpoint
  185. location:
  186. type: string
  187. description: Absolute system path to the file
  188. charset:
  189. type: string
  190. description: The charset encoding of the data
  191. file:
  192. type: string
  193. description: Name of the file
  194. prj:
  195. type: string
  196. description: Name of the .prj file, if applicable
  197. other:
  198. type: array
  199. description: List of other files that comprise this spatial file.
  200. items:
  201. type: string
  202. description: Name of the file
  203. message:
  204. $ref: "#/definitions/Message"
  205. FileContents:
  206. title: filecontents
  207. type: object
  208. description: Description of a spatial file or granule
  209. properties:
  210. file:
  211. type: string
  212. description: Name of the file
  213. href:
  214. type: string
  215. description: URL to the file endpoint
  216. prj:
  217. type: string
  218. description: Name of the .prj file, if applicable
  219. other:
  220. type: array
  221. description: List of other files that comprise this spatial file.
  222. items:
  223. type: string
  224. description: Name of the file
  225. Directory:
  226. title: directory
  227. type: object
  228. description: An import data object representing a directory of spatial files or an image mosaic
  229. properties:
  230. type:
  231. type: string
  232. description: '"directory" or "mosaic"'
  233. location:
  234. type: string
  235. description: Absolute system path to the directory
  236. href:
  237. type: string
  238. description: URL to the directory endpoint
  239. charset:
  240. type: string
  241. description: Charset encoding of the data
  242. files:
  243. $ref: "#/definitions/Files"
  244. Message:
  245. title: message
  246. type: string
  247. description: A message about the import data.
  248. Database:
  249. title: database
  250. type: object
  251. description: An import data object representing a database
  252. properties:
  253. type:
  254. type: string
  255. description: '"database"'
  256. format:
  257. type: string
  258. href:
  259. type: string
  260. description: URL to the database endpoint
  261. properties:
  262. type: object
  263. description: Database connection parameters. Actual paramaters vary depending on the type of database.
  264. tables:
  265. type: array
  266. items:
  267. $ref: "#/definitions/Table"
  268. Table:
  269. title: table
  270. type: object
  271. description: An import data object representing a a database table
  272. properties:
  273. type:
  274. type: string
  275. description: '"table"'
  276. name:
  277. type: string
  278. format:
  279. type: string
  280. href:
  281. type: string
  282. description: URL to the table endpoint