okfn/openspending — Issue #437: Provide simple API to store viewstate objects
Author: nickstenning
Created: 2012-02-28 15:33:15+00:00
State: open

Visualisations need to store and restore their state in a way that's less clunky than query parameters, so that, among other reasons, people can link to specifically set-up visualisations using URLs such as "http://openspending.org/de-bund/v/treemap/12345678".

Provide a simple API to store and retrieve JSON-formatted viewstate objects from the API.

Simplest possible implementation would probably be a naive key-value store:

`POST /api/viewstate` inserts a new viewstate object and returns a `303 SEE OTHER` to `/api/viewstate/12345678`.
`GET /api/viewstate/12345678` returns JSON object