opencoweb/coweb — Issue #150: Enhance Admin Rest Service
Author: rbackhouse
Created: 2011-12-16 13:57:15+00:00
State: open

The current Admin Rest Service supports the following (assuming AdminServlet is mapped to /admin) :

1) POST to /admin that creates or joins a session with the following json structure :

{
key: ... // Required String : configuration key value
collab: ... // Optional Boolean : Indicates if this should be a collaborative session
cacheState: ... Optional Boolean : Indicates if state should be cached for performance benefits
defaultKey: // Optional Boolean : Indicates if the key should be generated
sessionName: // Optional String: Name for the session.
}

2) GET to /admin/disconnect//

Performs a session disconnect based on the provided session id and site id

3) Get to /admin/sessions

Returns a list of sessions. Each session has the following json structure :

{
requestUrl: ...
confKey: ....
sessionName: ....
}

I suggest that all session related service calls be handled by a /admin/sessions url and use different HTTP verbs for different actions :

GET /admin/sessions - returns a list of active sessions
GET /admin/sessions/ - returns the details of the session
PUT /admin/sessions/ - creates a new session or joins and existing session. Post data contains optional sessions params
POST /admin/sessions/ - updates an existing session.
DELETE /admin/sessions// - disconnects the identified session

What else does the Admin REST service have to support ?