On 2015-02-02 15:33, Axel Hanikel wrote:
Hi,

I’m not sure if I have enough background to participate in the discussion,
so bear with me...

I think it wouldn’t be too hard to translate oak operations to an
HTTP-based API, if we just define some URLs as “special”, i.e. they don’t
represent the corresponding node in the repo but have special semantics.
For example, /sessions could represent sessions or transactions, which have
to be committed or discarded, or which are discarded automatically after
they expire.

Below are some example requests (responses are: status code - response
header; everything after # is a comment):

Req:        GET / # Get current revision
Resp:       302 - Location: /revisions/12345678-abcd-abcd-abcd-123456789abc

Req:        GET /sessions
Resp:       302 - Location: /sessions/12345678-abcd-abcd-abcd-123456789abc
# possibly several location headers if more than one session available for
the user (if we want to allow that)
             204 - # No sessions

Nit: you can't have multiple Location header fields; if you need more than one URI, you'll have to use Link header fields or the payload (or a new header field).

...

Best regards, Julian

Reply via email to