Skip to content

GSIP 137

NielsCharlier edited this page Jan 26, 2016 · 37 revisions

GSIP 137 - ResourceStore Rest API

Overview

Proposed By

Niels Charlier

Assigned to Release

This proposal is for GeoServer 2.9.0 and later

State

  • Under Discussion
  • In Progress
  • Completed
  • Rejected
  • Deferred

Motivation

Once the data directory has been ported to a jdbcresourcestore, there is no way to manually edit resources and directories in the resource store. Some of the resources can be manipulated through specific rest API's, but not all of them.

Example of configuration information stored as resources:

  • icons and fonts used during styling
  • projection support files (such as grid sets)
  • templates used for GetFeatureInfo
  • printing templates

Proposal

/resource</path/to/resource>[?format=<extension>][&metadata=1]]

  • GET
    • Download a resource OR return a list of children if it is directory
    • return 200
    • formats (for directory): HTML (default), XML, JSON
  • GET with [?metadata=1]
    • Get metadata of resource
    • return 200
    • formats (for directory): HTML (default), XML, JSON
  • POST
    • Upload a resource, create directories on the fly (fail if exists) (Optional: Zip-file to directory is unpacked?)
    • return 201
  • PUT
    • Upload a resource, create directories on the fly (overwrite if exists) (Optional: Zip-file to directory is unpacked?)
    • return 200 (exists) 201 (new)
  • DELETE
    • Delete a resource (recursive if directory)
    • return 200

Also: research support for HEAD requests for metadata.

Exceptions

  • GET or DELETE for a resource that does not exist
    • return 404
  • POST for a resource that exists
    • return 405
  • PUT on directory
    • return 405

Feedback

  • Q: Do we need both a resource and a dir endpoint?
  • A: made changes to use one endpoint

Email Discussion:

Backwards Compatibility

This is new functionality, does not apply.

Voting

Project Steering Committee:

  • Alessio Fabiani
  • Andrea Aime
  • Ben Caradoc-Davies
  • Christian Mueller
  • Ian Turton
  • Jody Garnett
  • Jukka Rahkonen
  • Kevin Smith
  • Simone Giannecchini

Committers:

Links

Clone this wiki locally