Bring in new dkim code
[citadel.git] / webcit-ng / api.txt
1 Method          URL                                Function
2 ------          ------------------------------     -------------------------------------
3 GET             /                                  Site root will redirect to a landing page
4
5 GET             /ctdl/f/                           returns a JSON-encoded list of accessible floors
6
7 GET             /ctdl/r/                           returns a JSON-encoded list of accessible rooms
8 OPTIONS         /ctdl/r/<roomname>/                returns just what you'd expect
9 PROPFIND        /ctdl/r/<roomname>/                Show a bunch of crap
10 GET             /ctdl/r/<roomname>/                Returns information about the room (name, view, etc.) in JSON format
11 GET             /ctdl/r/<roomname>/info.txt        Returns the room info banner for this room
12 GET             /ctdl/r/<roomname>/msgs.all        JSON array of message list in room
13 GET             /ctdl/r/<roomname>/msgs.new        JSON array of message list in room (new messages)
14 GET             /ctdl/r/<roomname>/mailbox         JSON dictionary of a mailbox summary in this room
15 GET             /ctdl/r/<roomname>/stat            JSON dictionary of the server STAT command (room name and modification time)
16 GET             /ctdl/r/<roomname>/<msgnum>        Retrieve the content of an individual message
17 GET             /ctdl/r/<roomname>/<msgnum>/json   Retrieve an individual message in a room, encapsulated in JSON
18 GET             /ctdl/r/<roomname>/<msgnum>/<part> Retrieve a MIME component of a message, specified by partnum
19 DELETE          /ctdl/r/<roomname>/<msgnum>        Delete a message from a room
20 MOVE            /ctdl/r/<roomname>/<msgnum>        Move a message to another room (requires Destination)
21
22 PUT             /ctdl/r/<roomname>/<xxx>           DAV operation to insert a new message into a room
23                 Accepted parameters:
24                 wefw List of message references, separated by "!" delimiter
25                 subj Message subject
26                 The returned ETag will be the new message number.
27
28 GET             /ctdl/r/<roomname>/slrp            Set the "Last Read Pointer" for the room
29                 Accepted parameters:
30                 last The number of the most recently seen message
31
32 GET             /ctdl/c/info                       Returns a JSON representation of the output of an INFO server command
33 POST            /ctdl/a/login                      Send it a your credentials and it will log you in
34 GET             /ctdl/a/whoami
35 GET             /ctdl/a/biff                       Check for new mail
36 GET             /ctdl/u/<username>/userpic         Returns an image containing the photo/avatar of the specified user
37 GET             /ctdl/s/                           Static content (html, css, js, images...)
38 GET             /.well-known/                      Static content (RFC5785 compliant paths)
39 POST            /ctdl/p                            Handler for uploading attachments and other file items
40                                                    The JSON returned wil contain one or more uploads in an array like this:
41                                                    [
42                                                      {
43                                                        "uploadfilename" : "Track 01.wav",
44                                                        "contenttype" : "audio/wav",
45                                                        "ref" : "cdarzowkk",
46                                                        "contentlength" : 56222252
47                                                      }
48                                                    ]
49 GET             /ctdl/p/<ref>                      Fetch a specific item that was uploaded ("ref" was returned by the upload)
50 DELETE          /ctdl/p/<ref>                      Delete a specific item that was uploaded ("ref" was returned by the upload)
51 GET             /ctdl/p/<msgnum>                   Load the attachments from message <msgnum> in, as if they were uploaded
52                                                    by the client.  Returns the same JSON as "POST /ctdl/p".