X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit-ng%2Fapi.txt;h=4621f9bec94d1d02263eceb3a64e2efc26de81a4;hb=HEAD;hp=a8761daf6eb35fc823cd346a6db62bf10c072370;hpb=761d6c3c8a476a2ed327db5cf115c19d66d081b7;p=citadel.git diff --git a/webcit-ng/api.txt b/webcit-ng/api.txt index a8761daf6..8660c8f2c 100644 --- a/webcit-ng/api.txt +++ b/webcit-ng/api.txt @@ -1,32 +1,52 @@ +Method URL Function +------ ------------------------------ ------------------------------------- +GET / Site root will redirect to a landing page -Method URL Function ------- ------------------------------ ------------------------------------- -GET / Site root will redirect to a landing page -GET /ctdl/f/ returns a JSON-encoded list of accessible floors -GET /ctdl/r/ returns a JSON-encoded list of accessible rooms -OPTIONS /ctdl/r/ROOMNAME/ returns just what you'd expect -PROPFIND /ctdl/r/ROOMNAME/ Show a bunch of crap -GET /ctdl/r/ROOMNAME/ Returns information about the room (name, view, etc.) in JSON format -GET /ctdl/r/ROOMNAME/info.txt Returns the room info banner for this room -GET /ctdl/r/ROOMNAME/msgs.all JSON array of message list in room -GET /ctdl/r/ROOMNAME/msgs.new JSON array of message list in room (new messages) -GET /ctdl/r/ROOMNAME/MSGNUM Retrieve the content of an individual message - (Should we output RFC822 fields as HTTP headers? Decide soon...) +GET /ctdl/f/ returns a JSON-encoded list of accessible floors -PUT /ctdl/r/ROOMNAME/xxx DAV operation to insert a new message into a room - Accepted parameters: - wefw List of message references - subj Message subject - The returned ETag will be the new message number. +GET /ctdl/r/ returns a JSON-encoded list of accessible rooms +OPTIONS /ctdl/r// returns just what you'd expect +PROPFIND /ctdl/r// Show a bunch of crap +GET /ctdl/r// Returns information about the room (name, view, etc.) in JSON format +GET /ctdl/r//info.txt Returns the room info banner for this room +GET /ctdl/r//msgs.all JSON array of message list in room +GET /ctdl/r//msgs.new JSON array of message list in room (new messages) +GET /ctdl/r//mailbox JSON dictionary of a mailbox summary in this room +GET /ctdl/r//stat JSON dictionary of the server STAT command (room name and modification time) +GET /ctdl/r// Retrieve the content of an individual message +GET /ctdl/r///json Retrieve an individual message in a room, encapsulated in JSON +GET /ctdl/r/// Retrieve a MIME component of a message, specified by partnum +DELETE /ctdl/r// Delete a message from a room +MOVE /ctdl/r// Move a message to another room (requires Destination) -GET /ctdl/r/ROOMNAME/slrp Set the "Last Read Pointer" for the room - Accepted parameters: - last The number of the most recently seen message +PUT /ctdl/r// DAV operation to insert a new message into a room + Accepted parameters: + wefw List of message references, separated by "!" delimiter + subj Message subject + The returned ETag will be the new message number. -GET /ctdl/r/ROOMNAME/MSGNUM/json Retrieve an individual message in a room, encapsulated in JSON -GET /ctdl/c/info Returns a JSON representation of the output of an INFO server command -POST /ctdl/a/login Send it a your credentials and it will log you in -GET /ctdl/a/whoami -GET /ctdl/u/USERNAME/userpic Returns an image containing the photo/avatar of the specified user -GET /ctdl/s/ Static content (html, css, js, images...) -GET /.well-known/ Static content (RFC5785 compliant paths) +GET /ctdl/r//slrp Set the "Last Read Pointer" for the room + Accepted parameters: + last The number of the most recently seen message + +GET /ctdl/c/info Returns a JSON representation of the output of an INFO server command +POST /ctdl/a/login Send it a your credentials and it will log you in +GET /ctdl/a/whoami +GET /ctdl/a/biff Check for new mail +GET /ctdl/u//userpic Returns an image containing the photo/avatar of the specified user +GET /ctdl/s/ Static content (html, css, js, images...) +GET /.well-known/ Static content (RFC5785 compliant paths) +POST /ctdl/p Handler for uploading attachments and other file items + The JSON returned wil contain one or more uploads in an array like this: + [ + { + "uploadfilename" : "Track 01.wav", + "contenttype" : "audio/wav", + "ref" : "cdarzowkk", + "contentlength" : 56222252 + } + ] +GET /ctdl/p/ Fetch a specific item that was uploaded ("ref" was returned by the upload) +DELETE /ctdl/p/ Delete a specific item that was uploaded ("ref" was returned by the upload) +GET /ctdl/p/ Load the attachments from message in, as if they were uploaded + by the client. Returns the same JSON as "POST /ctdl/p".