Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
alisan16 edited this page Feb 9, 2014 · 21 revisions
  • [[POST mws/|API-POST mws]] - Creates a new mws resource
  • [[POST mws/:res_id/keep-alive|API-POST mws-res_id-keep-alive]] - Resets the given mws resource's timeout period

db.collection Routes

  • [[GET mws/:res_id/db/:collection_name/find|API-GET mws-res_id-db-collection_name-find]] :: db.collection.find(query, projection) - Gets a result set from the given mws resource
  • [[POST mws/:res_id/db/:collection_name/insert|API-POST mws-res_id-db-collection_name-insert]] :: db.collection.insert(document) - Inserts the given document into the given mws resource

Objects

  • [[cursor_methods|API-cursor_methods]] - An object that enumerates the methods that will be applied to the cursor before the query's result set is returned

Notes

  • All objects are intended to be sent and returned as JSON.
  • Requests to a specific resource ID (a path of the form, mws/:res_id/) require the requester to hold a valid session ID which has access to the specified resource ID.

Glossary

  • mws_resource - A title for the web shell's REST resource. It is the back-end for a single shell session, which includes (what appears to the user to be) a single mongo database to query and the authentication criteria from a user session ID to resource.
  • timeout period - The amount of time before which an mws_resource is deleted from the backend (to recover unused resources).

TODO

  • Add types to params/return values?
  • Fix error handling. It is not well defined (nor well thought-out and possibly not implemented to spec) so the API made need to change to compensate.
  • Make the internal Wiki links ref links to improve plaintext readability.