click on the envelope to go to the inbox
[citadel.git] / webcit-ng / api.txt
1
2 Method          URL                             Function
3 ------          ------------------------------  -------------------------------------
4 GET             /                               Site root will redirect to a landing page
5 GET             /ctdl/f/                        returns a JSON-encoded list of accessible floors
6 GET             /ctdl/r/                        returns a JSON-encoded list of accessible rooms
7 OPTIONS         /ctdl/r/ROOMNAME/               returns just what you'd expect
8 PROPFIND        /ctdl/r/ROOMNAME/               Show a bunch of crap
9 GET             /ctdl/r/ROOMNAME/               Returns information about the room (name, view, etc.) in JSON format
10 GET             /ctdl/r/ROOMNAME/info.txt       Returns the room info banner for this room
11 GET             /ctdl/r/ROOMNAME/msgs.all       JSON array of message list in room
12 GET             /ctdl/r/ROOMNAME/msgs.new       JSON array of message list in room (new messages)
13 GET             /ctdl/r/ROOMNAME/MSGNUM         Retrieve the content of an individual message
14 GET             /ctdl/r/ROOMNAME/MSGNUM/json    Retrieve an individual message in a room, encapsulated in JSON
15 DELETE          /ctdl/r/ROOMNAME/MSGNUM         Deletes a message from a room
16
17 PUT             /ctdl/r/ROOMNAME/xxx            DAV operation to insert a new message into a room
18                                                 Accepted parameters:
19                                                 wefw    List of message references
20                                                 subj    Message subject
21                                                 The returned ETag will be the new message number.
22
23 GET             /ctdl/r/ROOMNAME/slrp           Set the "Last Read Pointer" for the room
24                                                 Accepted parameters:
25                                                 last    The number of the most recently seen message
26
27 GET             /ctdl/c/info                    Returns a JSON representation of the output of an INFO server command
28 POST            /ctdl/a/login                   Send it a your credentials and it will log you in
29 GET             /ctdl/a/whoami
30 GET             /ctdl/u/USERNAME/userpic        Returns an image containing the photo/avatar of the specified user
31 GET             /ctdl/s/                        Static content (html, css, js, images...)
32 GET             /.well-known/                   Static content (RFC5785 compliant paths)