Labs/Bespin/ServerAPI: Difference between revisions

no edit summary
No edit summary
Line 29: Line 29:
* POST (or GET) /file/close/[path] to mark the file closed. The server will discard your edit history.  
* POST (or GET) /file/close/[path] to mark the file closed. The server will discard your edit history.  
* GET /file/listopen/ to list open files. a JSON dictionary of {filename: {mode: [user names]}} will be returned. For example, if subdir1/subdir2/test.py is open readonly by bgalbs and read/write by jbellis, openfiles will return <tt>{"subdir1/subdir2/test.py": {"r": ["bgalbs"], "rw": ["jbellis"]}}</tt>
* GET /file/listopen/ to list open files. a JSON dictionary of {filename: {mode: [user names]}} will be returned. For example, if subdir1/subdir2/test.py is open readonly by bgalbs and read/write by jbellis, openfiles will return <tt>{"subdir1/subdir2/test.py": {"r": ["bgalbs"], "rw": ["jbellis"]}}</tt>
== Settings ==
* GET /settings/ to list all settings for currently logged in user as json dict
* GET /settings/[setting] to get the value for a single setting as json string
* POST /settings/ with HTTP POST DATA key=value to set the value for a single setting (all values are strings)
* DELETE /settings/[setting] to delete a single setting
123

edits