templates.yaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: GeoServer Template
  6. description: Manage templates used to configure output (for example GetFeatureInfo reponse). Templates can be registered for the entire server or workspace. You can also configure a template for use with a store, featureType or coverage.
  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. /templates:
  15. get:
  16. operationId: templatesGet
  17. tags:
  18. - "Templates"
  19. summary: List of templates for the server
  20. description: Displays a list of templates registered for use on the server.
  21. produces:
  22. - text/html
  23. - application/xml
  24. - application/json
  25. responses:
  26. 200:
  27. description: OK
  28. schema:
  29. $ref: "#/definitions/Templates"
  30. post:
  31. operationId: templatesPost
  32. tags:
  33. - "Templates"
  34. description: Invalid. PUT to `/{template}` to edit a template.
  35. responses:
  36. 405:
  37. description: Method Not Allowed
  38. put:
  39. operationId: templatesPut
  40. tags:
  41. - "Templates"
  42. description: Invalid. PUT to `/{template}` to edit a template.
  43. responses:
  44. 405:
  45. description: Method Not Allowed
  46. delete:
  47. operationId: templatesDelete
  48. tags:
  49. - "Templates"
  50. description: Invalid. Delete from `/{template}` to remove a template.
  51. responses:
  52. 405:
  53. description: Method Not Allowed
  54. /workspaces/{workspace}/templates:
  55. parameters:
  56. - $ref: "#/parameters/Workspace"
  57. get:
  58. operationId: templatesWorkspaceGet
  59. tags:
  60. - "Templates"
  61. summary: List of templates for workspace
  62. description: Displays a list of templates registered for use in a workspace (example for GetFeatureInfo WMS operation).
  63. produces:
  64. - text/html
  65. - application/xml
  66. - application/json
  67. responses:
  68. 200:
  69. description: OK
  70. schema:
  71. $ref: "#/definitions/Templates"
  72. post:
  73. operationId: templatesWorkspacePost
  74. tags:
  75. - "Templates"
  76. description: Invalid. PUT to `/{template}` to edit a template.
  77. responses:
  78. 405:
  79. description: Method Not Allowed
  80. put:
  81. operationId: templatesWorkspacePut
  82. tags:
  83. - "Templates"
  84. description: Invalid. PUT to `/{template}` to edit a template.
  85. responses:
  86. 405:
  87. description: Method Not Allowed
  88. delete:
  89. operationId: templatesWorkspaceDelete
  90. tags:
  91. - "Templates"
  92. description: Invalid. Delete from `/{template}` to remove a template.
  93. responses:
  94. 405:
  95. description: Method Not Allowed
  96. /workspaces/{workspace}/datastores/{store}/templates:
  97. parameters:
  98. - $ref: "#/parameters/Workspace"
  99. - $ref: "#/parameters/Store"
  100. get:
  101. operationId: templatesDataStoreGet
  102. tags:
  103. - "Templates"
  104. summary: List of templates for a data store
  105. description: Displays a list of templates registered for use by all layers generated by a data store (example for GetFeatureInfo WMS operation).
  106. produces:
  107. - text/html
  108. - application/xml
  109. - application/json
  110. responses:
  111. 200:
  112. description: OK
  113. schema:
  114. $ref: "#/definitions/Templates"
  115. post:
  116. operationId: templatesDataStorePost
  117. tags:
  118. - "Templates"
  119. description: Invalid. PUT to `/{template}` to edit a template.
  120. responses:
  121. 405:
  122. description: Method Not Allowed
  123. put:
  124. operationId: templatesDataStorePut
  125. tags:
  126. - "Templates"
  127. description: Invalid. PUT to `/{template}` to edit a template.
  128. responses:
  129. 405:
  130. description: Method Not Allowed
  131. delete:
  132. operationId: templatesDataStoreDelete
  133. tags:
  134. - "Templates"
  135. description: Invalid. Delete from `/{template}` to remove a template.
  136. responses:
  137. 405:
  138. description: Method Not Allowed
  139. /workspaces/{workspace}/datastores/{store}/featuretypes/{type}/templates:
  140. parameters:
  141. - $ref: "#/parameters/Workspace"
  142. - $ref: "#/parameters/Store"
  143. - name: type
  144. in: path
  145. required: true
  146. type: string
  147. description: The feature type name
  148. get:
  149. operationId: templatesDataStoreFTGet
  150. tags:
  151. - "Templates"
  152. summary: List of templates for a feature type.
  153. description: Displays a list of templates registered for use by feature type (example for GetFeatureInfo WMS operation).
  154. produces:
  155. - text/html
  156. - application/xml
  157. - application/json
  158. responses:
  159. 200:
  160. description: OK
  161. schema:
  162. $ref: "#/definitions/Templates"
  163. post:
  164. operationId: templatesDataStoreFTPost
  165. tags:
  166. - "Templates"
  167. description: Invalid. PUT to `/{template}` to edit a template.
  168. responses:
  169. 405:
  170. description: Method Not Allowed
  171. put:
  172. operationId: templatesDataStoreFTPut
  173. tags:
  174. - "Templates"
  175. description: Invalid. PUT to `/{template}` to edit a template.
  176. responses:
  177. 405:
  178. description: Method Not Allowed
  179. delete:
  180. operationId: templatesDataStoreFTDelete
  181. tags:
  182. - "Templates"
  183. description: Invalid. Delete from `/{template}` to remove a template.
  184. responses:
  185. 405:
  186. description: Method Not Allowed
  187. /workspaces/{workspace}/coveragestore/{store}/templates:
  188. parameters:
  189. - $ref: "#/parameters/Workspace"
  190. - $ref: "#/parameters/Store"
  191. get:
  192. operationId: templatesDataStoreCSGet
  193. tags:
  194. - "Templates"
  195. summary: List of templates for a coverage store
  196. description: Displays a list of templates registered for use by all layers generated by a coverage store (example for GetFeatureInfo WMS operation).
  197. produces:
  198. - text/html
  199. - application/xml
  200. - application/json
  201. responses:
  202. 200:
  203. description: OK
  204. schema:
  205. $ref: "#/definitions/Templates"
  206. post:
  207. operationId: templatesDataStoreCSPost
  208. tags:
  209. - "Templates"
  210. description: Invalid. PUT to `/{template}` to edit a template.
  211. responses:
  212. 405:
  213. description: Method Not Allowed
  214. put:
  215. operationId: templatesDataStoreCSPut
  216. tags:
  217. - "Templates"
  218. description: Invalid. PUT to `/{template}` to edit a template.
  219. responses:
  220. 405:
  221. description: Method Not Allowed
  222. delete:
  223. operationId: templatesDataStoreCSDelete
  224. tags:
  225. - "Templates"
  226. description: Invalid. Delete from `/{template}` to remove a template.
  227. responses:
  228. 405:
  229. description: Method Not Allowed
  230. /workspaces/{workspace}/coveragestore/{store}/coverages/{coverage}/templates:
  231. parameters:
  232. - $ref: "#/parameters/Workspace"
  233. - $ref: "#/parameters/Store"
  234. - name: coverage
  235. in: path
  236. required: true
  237. type: string
  238. description: The coverage name
  239. get:
  240. operationId: templatesCoverageGet
  241. tags:
  242. - "Templates"
  243. summary: List of templates for a coverage
  244. description: Displays a list of templates registered for use by a coverage (example for GetFeatureInfo WMS operation).
  245. produces:
  246. - text/html
  247. - application/xml
  248. - application/json
  249. responses:
  250. 200:
  251. description: OK
  252. schema:
  253. $ref: "#/definitions/Templates"
  254. post:
  255. operationId: templatesCoveragePost
  256. tags:
  257. - "Templates"
  258. description: Invalid. PUT to `/{template}` to edit a template.
  259. responses:
  260. 405:
  261. description: Method Not Allowed
  262. put:
  263. operationId: templatesCoveragePut
  264. tags:
  265. - "Templates"
  266. description: Invalid. PUT to `/{template}` to edit a template.
  267. responses:
  268. 405:
  269. description: Method Not Allowed
  270. delete:
  271. operationId: templatesCoverageDelete
  272. tags:
  273. - "Templates"
  274. description: Invalid. Delete from `/{template}` to remove a template.
  275. responses:
  276. 405:
  277. description: Method Not Allowed
  278. /templates/{template}.ftl:
  279. parameters:
  280. - $ref: "#/parameters/Template"
  281. get:
  282. operationId: templateGet
  283. tags:
  284. - "Templates"
  285. summary: Return a template
  286. description: Displays a single template registered for use on the server.
  287. produces:
  288. - text/plain
  289. responses:
  290. 200:
  291. description: OK
  292. schema:
  293. $ref: "#/definitions/Templates"
  294. post:
  295. operationId: templatePost
  296. tags:
  297. - "Templates"
  298. description: Invalid. Use PUT to insert a template.
  299. responses:
  300. 405:
  301. description: Method Not Allowed
  302. put:
  303. operationId: templatePut
  304. tags:
  305. - "Templates"
  306. summary: Insert or update a template
  307. description: Inserts or updates a single template registered for use on the server. Overwrites any existing template with the same name and location.
  308. consumes:
  309. - text/plain
  310. parameters:
  311. - $ref: "#/parameters/TemplateBody"
  312. responses:
  313. 201:
  314. description: Created
  315. delete:
  316. operationId: templateDelete
  317. tags:
  318. - "Templates"
  319. summary: Delete a template.
  320. description: Deletes a single template registered for use on the server.
  321. responses:
  322. 200:
  323. description: OK
  324. 404:
  325. description: Template not found
  326. /workspaces/{workspace}/templates/{template}.ftl:
  327. parameters:
  328. - $ref: "#/parameters/Workspace"
  329. - $ref: "#/parameters/Template"
  330. get:
  331. operationId: templateWorkspaceGet
  332. tags:
  333. - "Templates"
  334. summary: Return a template for workspace
  335. description: Displays a single template registered for use in a workspace (example for GetFeatureInfo WMS operation).
  336. produces:
  337. - text/plain
  338. responses:
  339. 200:
  340. description: OK
  341. schema:
  342. $ref: "#/definitions/Templates"
  343. post:
  344. operationId: templateWorkspacePost
  345. tags:
  346. - "Templates"
  347. description: Invalid. Use PUT to insert a template.
  348. responses:
  349. 405:
  350. description: Method Not Allowed
  351. put:
  352. operationId: templateWorkspacePut
  353. tags:
  354. - "Templates"
  355. summary: Insert or update a template
  356. description: Inserts or updates a single template registered for use in a workspace (example for GetFeatureInfo WMS operation). Overwrites any existing template with the same name and location.
  357. consumes:
  358. - text/plain
  359. parameters:
  360. - $ref: "#/parameters/TemplateBody"
  361. responses:
  362. 201:
  363. description: Created
  364. delete:
  365. operationId: templateWorkspaceDelete
  366. tags:
  367. - "Templates"
  368. summary: Delete a template.
  369. description: Deletes a single template registered for use in a workspace.
  370. responses:
  371. 200:
  372. description: OK
  373. 404:
  374. description: Template not found
  375. /workspaces/{workspace}/datastores/{store}/templates/{template}.ftl:
  376. parameters:
  377. - $ref: "#/parameters/Workspace"
  378. - $ref: "#/parameters/Store"
  379. - $ref: "#/parameters/Template"
  380. get:
  381. operationId: templateDataStoreGet
  382. tags:
  383. - "Templates"
  384. summary: Return a template for a data store
  385. description: Displays a single template registered for use by all layers generated by a data store (example for GetFeatureInfo WMS operation).
  386. produces:
  387. - text/plain
  388. responses:
  389. 200:
  390. description: OK
  391. schema:
  392. $ref: "#/definitions/Templates"
  393. post:
  394. operationId: templateDataStorePost
  395. tags:
  396. - "Templates"
  397. description: Invalid. Use PUT to insert a template.
  398. responses:
  399. 405:
  400. description: Method Not Allowed
  401. put:
  402. operationId: templateDataStorePut
  403. tags:
  404. - "Templates"
  405. summary: Insert or update a template
  406. description: Inserts or updates a single template registered for use by all layers generated by a data store (example for GetFeatureInfo WMS operation). Overwrites any existing template with the same name and location.
  407. consumes:
  408. - text/plain
  409. parameters:
  410. - $ref: "#/parameters/TemplateBody"
  411. responses:
  412. 201:
  413. description: Created
  414. delete:
  415. operationId: templateDataStoreDelete
  416. tags:
  417. - "Templates"
  418. summary: Delete a template.
  419. description: Deletes a single template registered for use by all layers generated by a data store.
  420. responses:
  421. 200:
  422. description: OK
  423. 404:
  424. description: Template not found
  425. /workspaces/{workspace}/datastores/{store}/featuretypes/{type}/templates/{template}.ftl:
  426. parameters:
  427. - $ref: "#/parameters/Workspace"
  428. - $ref: "#/parameters/Store"
  429. - name: type
  430. in: path
  431. required: true
  432. type: string
  433. description: The feature type name
  434. - $ref: "#/parameters/Template"
  435. get:
  436. operationId: templateDataStoreFTGet
  437. tags:
  438. - "Templates"
  439. summary: Return a template for a feature type.
  440. description: Displays a single template registered for use by a feature type (example for GetFeatureInfo WMS operation).
  441. produces:
  442. - text/plain
  443. responses:
  444. 200:
  445. description: OK
  446. schema:
  447. $ref: "#/definitions/Templates"
  448. post:
  449. operationId: templateDataStoreFTPost*
  450. tags:
  451. - "Templates"
  452. description: Invalid. Use PUT to insert a template.
  453. responses:
  454. 405:
  455. description: Method Not Allowed
  456. put:
  457. operationId: templateDataStoreFTPut
  458. tags:
  459. - "Templates"
  460. summary: Insert or update a template
  461. description: Inserts or updates a single template registered for use by a feature type (example for GetFeatureInfo WMS operation). Overwrites any existing template with the same name and location.
  462. consumes:
  463. - text/plain
  464. parameters:
  465. - $ref: "#/parameters/TemplateBody"
  466. responses:
  467. 201:
  468. description: Created
  469. delete:
  470. operationId: templateDataStoreFTDelete
  471. tags:
  472. - "Templates"
  473. summary: Delete a template.
  474. description: Deletes a single template registered for use by a feature type.
  475. responses:
  476. 200:
  477. description: OK
  478. 404:
  479. description: Template not found
  480. /workspaces/{workspace}/coveragestore/{store}/templates/{template}.ftl:
  481. parameters:
  482. - $ref: "#/parameters/Workspace"
  483. - $ref: "#/parameters/Store"
  484. - $ref: "#/parameters/Template"
  485. get:
  486. operationId: templateDataStoreCSGet
  487. tags:
  488. - "Templates"
  489. summary: Return a template for a coverage store
  490. description: Displays a single template registered for use by all layers generated by a coverage store (example for GetFeatureInfo WMS operation).
  491. produces:
  492. - text/plain
  493. responses:
  494. 200:
  495. description: OK
  496. schema:
  497. $ref: "#/definitions/Templates"
  498. post:
  499. operationId: templateDataStoreCSPost
  500. tags:
  501. - "Templates"
  502. description: Invalid. Use PUT to insert a template.
  503. responses:
  504. 405:
  505. description: Method Not Allowed
  506. put:
  507. operationId: templateDataStoreCSPut
  508. tags:
  509. - "Templates"
  510. summary: Insert or update a template
  511. description: Inserts or updates a single template registered for use by all layers generated by a coverage store (example for GetFeatureInfo WMS operation). Overwrites any existing template with the same name and location.
  512. consumes:
  513. - text/plain
  514. parameters:
  515. - $ref: "#/parameters/TemplateBody"
  516. responses:
  517. 201:
  518. description: Created
  519. delete:
  520. operationId: templateDataStoreCSDelete
  521. tags:
  522. - "Templates"
  523. summary: Delete a template.
  524. description: Deletes a single template registered for use by all layers generated by a coverage store.
  525. responses:
  526. 200:
  527. description: OK
  528. 404:
  529. description: Template not found
  530. /workspaces/{workspace}/coveragestore/{store}/coverages/{coverage}/templates/{template}.ftl:
  531. parameters:
  532. - $ref: "#/parameters/Workspace"
  533. - $ref: "#/parameters/Store"
  534. - name: coverage
  535. in: path
  536. required: true
  537. type: string
  538. description: The coverage name
  539. - $ref: "#/parameters/Template"
  540. get:
  541. operationId: templateCoverageGet
  542. tags:
  543. - "Templates"
  544. summary: Return a template for a coverage
  545. description: Displays a single template registered for use by a coverage (example for GetFeatureInfo WMS operation).
  546. produces:
  547. - text/plain
  548. responses:
  549. 200:
  550. description: OK
  551. schema:
  552. $ref: "#/definitions/Templates"
  553. post:
  554. operationId: templateCoveragePost
  555. tags:
  556. - "Templates"
  557. description: Invalid. Use PUT to insert a template.
  558. responses:
  559. 405:
  560. description: Method Not Allowed
  561. put:
  562. operationId: templateCoveragePut
  563. tags:
  564. - "Templates"
  565. summary: Insert or update a template
  566. description: Inserts or updates a single template registered for use by a coverage (example for GetFeatureInfo WMS operation). Overwrites any existing template with the same name and location.
  567. consumes:
  568. - text/plain
  569. parameters:
  570. - $ref: "#/parameters/TemplateBody"
  571. responses:
  572. 201:
  573. description: Created
  574. delete:
  575. operationId: templateCoverageDelete
  576. tags:
  577. - "Templates"
  578. summary: Delete a template.
  579. description: Deletes a single template registered for use by a coverage.
  580. responses:
  581. 200:
  582. description: OK
  583. 404:
  584. description: Template not found
  585. parameters:
  586. Workspace:
  587. name: workspace
  588. in: path
  589. required: true
  590. type: string
  591. description: The workspace name
  592. Store:
  593. name: store
  594. in: path
  595. required: true
  596. type: string
  597. description: The store name
  598. Template:
  599. name: template
  600. in: path
  601. required: true
  602. type: string
  603. description: The template name
  604. TemplateBody:
  605. name: template
  606. in: body
  607. required: true
  608. description: The template content to upload
  609. schema:
  610. type: string
  611. definitions:
  612. Templates:
  613. title: templates
  614. type: object
  615. properties:
  616. layerGroups:
  617. type: object
  618. TemplateReference:
  619. title: layers
  620. type: object
  621. properties:
  622. name:
  623. type: string
  624. description: Name of template
  625. link:
  626. type: string
  627. description: URL to template definition