On 2016-01-13 09:44 AM, Jody Garnett wrote:
> Got a question ... do we need both a resource and a dir endpoint?
>
> /resource</path/to/resource[\?<format>]
>
>   * GET
>     Download a resource (json listing if directory)
>     html format produces human readable description, lists directory
>     contents.
>     info format produces machine readable description, lists directory
>     contents.
>     return 200
>   * POST
>     Upload a resource, create directories on the fly (fail if resource
>     already existed).
>     Upload a zipfile to a directory is unpacked (is that useful?).
>     Upload a zipfile to a resource (such as icons.zip) is not unpacked.
>     return 201
>   * PUT
>     Upload a resource, create directories on the fly (overwrite if
>     exists, fail if directory).
>     Zipfile handling as above.
>     return 200 (exists) 201 (new)
>   * DELETE
>     Delete a resource (delete contents if directory)
>     return 200
>
> Exceptions
>
>   * GET or DELETE for a resource that does not exist
>     return 404
>   * GET, POST, PUT or DELETE on directory
>     return 405
>   * POST for a resource that exists
>     return 405
>
>

Maybe it would make sense to have the query take a named argument in
case we need to extend the API with additional parameters later later?

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

Or just

/resource</path/to/resource[?metadata]

And the format is specified via HTTP content type negotiation.

-- 
Kevin Michael Smith
<[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to