importerTransforms.yaml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: GeoServer Importer Extension - Transforms
  6. description: The Importer extension gives a GeoServer administrator an alternate, more-streamlined method for uploading and configuring new layers. The transforms endpoint manages data transforms applied to individual 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}/tasks/{taskId}/transforms:
  15. get:
  16. operationId: getTransforms
  17. tags:
  18. - "ImporterTransforms"
  19. summary: Retrieve transformation list
  20. description: Retrieve the list of transformations of a task with id {taskId} within import with id {importId}
  21. produces:
  22. - application/json
  23. - text/html
  24. parameters:
  25. - $ref: "#/parameters/ImportId"
  26. - $ref: "#/parameters/TaskId"
  27. - $ref: "#/parameters/ExpandParameter"
  28. responses:
  29. 200:
  30. description: OK
  31. schema:
  32. $ref: "#/definitions/Transforms"
  33. examples:
  34. application/json: |
  35. {
  36. "transforms": [
  37. {
  38. "type": "ReprojectTransform",
  39. "href": "http://localhost:8080/geoserver/rest/imports/0/tasks/1/transforms/0",
  40. "source": null,
  41. "target": "EPSG:4326"
  42. },
  43. {
  44. "type": "DateFormatTransform",
  45. "href": "http://localhost:8080/geoserver/rest/imports/0/tasks/1/transforms/1",
  46. "field": "date",
  47. "format": "yyyyMMdd"
  48. }
  49. ]
  50. }
  51. post:
  52. operationId: postTransform
  53. tags:
  54. - "ImporterTransforms"
  55. summary: Create a new transformation
  56. description: Create a new transformation and append it inside a task with id {taskId} within import with id {importId}
  57. consumes:
  58. - application/json
  59. - text/json
  60. parameters:
  61. - $ref: "#/parameters/ImportId"
  62. - $ref: "#/parameters/TaskId"
  63. - $ref: "#/parameters/ExpandParameter"
  64. - $ref: "#/parameters/TransformParameter"
  65. responses:
  66. 201:
  67. description: Created
  68. headers:
  69. Location:
  70. description: href to the newly created transform
  71. type: string
  72. /imports/{importId}/tasks/{taskId}/transforms/{transformId}:
  73. get:
  74. operationId: getTransform
  75. tags:
  76. - "ImporterTransforms"
  77. summary: Retrieve a transformation
  78. description: Retrieve a transformation identified by {transformId} inside a task with id {taskId} within import with id {importId}
  79. produces:
  80. - application/json
  81. - text/html
  82. parameters:
  83. - $ref: "#/parameters/ImportId"
  84. - $ref: "#/parameters/TaskId"
  85. - $ref: "#/parameters/TransformId"
  86. - $ref: "#/parameters/ExpandParameter"
  87. responses:
  88. 200:
  89. description: OK
  90. schema:
  91. $ref: "#/definitions/Transform"
  92. put:
  93. operationId: putTransform
  94. tags:
  95. - "ImporterTransforms"
  96. summary: Modifies a transformation
  97. description: Modifies the definition of a transformation identified by {transformId} inside a task with id {taskId} within import with id {importId}
  98. consumes:
  99. - application/json
  100. - text/json
  101. produces:
  102. - application/json
  103. - text/html
  104. parameters:
  105. - $ref: "#/parameters/ImportId"
  106. - $ref: "#/parameters/TaskId"
  107. - $ref: "#/parameters/TransformId"
  108. - $ref: "#/parameters/ExpandParameter"
  109. - $ref: "#/parameters/TransformParameter"
  110. responses:
  111. 200:
  112. description: OK
  113. schema:
  114. $ref: "#/definitions/Transform"
  115. delete:
  116. operationId: deleteTransform
  117. tags:
  118. - "ImporterTransforms"
  119. summary: Removes the transformation
  120. description: Removes the transformation identified by {transformId} inside a task with id {taskId} within import with id {importId}
  121. parameters:
  122. - $ref: "#/parameters/ImportId"
  123. - $ref: "#/parameters/TaskId"
  124. - $ref: "#/parameters/TransformId"
  125. responses:
  126. 200:
  127. description: OK
  128. parameters:
  129. ExpandParameter:
  130. name: expand
  131. type: string
  132. in: query
  133. 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. Defaults to "self" or "none", depending on the request.'
  134. required: false
  135. TransformParameter:
  136. name: transformBody
  137. description: The transform to add.
  138. in: body
  139. required: true
  140. schema:
  141. $ref: "#/definitions/Transform"
  142. ImportId:
  143. name: importId
  144. in: path
  145. description: The ID of the import
  146. required: true
  147. type: string
  148. TaskId:
  149. name: taskId
  150. in: path
  151. description: The ID of the task
  152. required: true
  153. type: string
  154. TransformId:
  155. name: transformId
  156. in: path
  157. description: The ID of the transform
  158. required: true
  159. type: string
  160. definitions:
  161. Transforms:
  162. title: transforms
  163. type: array
  164. description: A list of transforms
  165. items:
  166. $ref: "#/definitions/Transform"
  167. Transform:
  168. title: transform
  169. type: object
  170. description: A data transform applied to the import data.
  171. properties:
  172. type:
  173. type: string
  174. description: The name of the transform
  175. href:
  176. type: string
  177. description: URL to the transform endpoint