[ { "title": "Permissions", "parameters": {}, "entrypoint": "permissions", "path": "/permissions", "authentication": [], "apis": [ { "name": "effective", "path": "/effective", "method": "GET", "title": "Effective rules for current user", "parameters": { "get": [ { "name": "resource", "type": "string", "required": false, "title": "Show only rules for a specific resource" } ] } } ] }, { "title": "Channels", "description": "A channel is a representation of a sequence of messages. It has meta data like channel subject. Channels may be public, private or group.", "entrypoint": "channel", "path": "/channels", "authentication": [ "Client ID", "Session ID" ], "apis": [ { "name": "list", "method": "GET", "title": "List channels", "path": "/", "parameters": { "GET": [ { "type": "string", "name": "query", "required": false, "title": "Search query" } ] } }, { "name": "create", "method": "POST", "title": "Create new channel", "path": "/", "parameters": { "post": [ { "type": "string", "name": "name", "required": true, "title": "Name of Channel" }, { "type": "string", "name": "topic", "required": false, "title": "Subject of Channel" }, { "type": "string", "name": "type", "required": false, "title": "Channel type" }, { "type": "[]string", "name": "members", "required": false, "title": "Initial members of the channel" } ] } }, { "name": "update", "method": "PUT", "path": "/{channelID}", "title": "Update channel details", "parameters": { "path": [ { "type": "uint64", "name": "channelID", "required": true, "title": "Channel ID" } ], "post": [ { "type": "string", "name": "name", "required": false, "title": "Name of Channel" }, { "type": "string", "name": "topic", "required": false, "title": "Subject of Channel" }, { "type": "string", "name": "type", "required": false, "title": "Channel type" }, { "type": "uint64", "name": "organisationID", "required": false, "title": "Move channel to different organisation" } ] } }, { "name": "state", "method": "PUT", "path": "/{channelID}/state", "title": "Update channel state", "parameters": { "path": [ { "type": "uint64", "name": "channelID", "required": true, "title": "Channel ID" } ], "post": [ { "type": "string", "name": "state", "required": true, "title": "Valid values: delete, undelete, archive, unarchive" } ] } }, { "name": "setFlag", "method": "PUT", "path": "/{channelID}/flag", "title": "Update channel membership flag", "parameters": { "path": [ { "type": "uint64", "name": "channelID", "required": true, "title": "Channel ID" } ], "post": [ { "type": "string", "name": "flag", "required": true, "title": "Valid values: pinned, hidden, ignored" } ] } }, { "name": "removeFlag", "method": "DELETE", "path": "/{channelID}/flag", "title": "Remove channel membership flag", "parameters": { "path": [ { "type": "uint64", "name": "channelID", "required": true, "title": "Channel ID" } ] } }, { "name": "read", "method": "GET", "path": "/{channelID}", "title": "Read channel details", "parameters": { "path": [ { "type": "uint64", "name": "channelID", "required": true, "title": "Channel ID" } ] } }, { "name": "members", "method": "GET", "path": "/{channelID}/members", "title": "List channel members", "parameters": { "path": [ { "name": "channelID", "type": "uint64", "required": true, "title": "Channel ID" } ] } }, { "name": "join", "method": "PUT", "path": "/{channelID}/members/{userID}", "title": "Join channel", "parameters": { "path": [ { "name": "channelID", "type": "uint64", "required": true, "title": "Channel ID" }, { "name": "userID", "type": "uint64", "required": false, "title": "Member ID" } ] } }, { "name": "part", "method": "DELETE", "path": "/{channelID}/members/{userID}", "title": "Remove member from channel", "parameters": { "path": [ { "name": "channelID", "type": "uint64", "required": true, "title": "Channel ID" }, { "name": "userID", "type": "uint64", "required": false, "title": "Member ID" } ] } }, { "name": "invite", "method": "POST", "path": "/{channelID}/invite", "title": "Join channel", "parameters": { "path": [ { "name": "channelID", "type": "uint64", "required": true, "title": "Channel ID" } ], "post": [ { "name": "userID", "type": "[]uint64", "required": false, "title": "User ID" } ] } }, { "name": "attach", "path": "/{channelID}/attach", "method": "POST", "title": "Attach file to channel", "parameters": { "path": [ { "name": "channelID", "type": "uint64", "required": true, "title": "Channel ID" } ], "post": [ { "name": "replyTo", "type": "uint64", "required": false, "title": "Upload as a reply" }, { "name": "upload", "type": "*multipart.FileHeader", "required": true, "title": "File to upload" } ] } } ] }, { "title": "Messages", "path": "/channels/{channelID}/messages", "parameters": { "path": [ { "name": "channelID", "type": "uint64", "required": true, "title": "Channel ID" } ] }, "entrypoint": "message", "authentication": [ "Client ID", "Session ID" ], "apis": [ { "name": "create", "path": "/", "method": "POST", "title": "Post new message to the channel", "parameters": { "post": [ { "type": "string", "name": "message", "required": true, "title": "Message contents (markdown)" } ] } }, { "name": "history", "path": "/", "method": "GET", "title": "All messages (channel history)", "parameters": { "get": [ { "name": "lastMessageID", "type": "uint64", "required": false, "title": "" } ] } }, { "name": "markAsRead", "path": "/mark-as-read", "method": "GET", "title": "Manages read/unread messages in a channel or a thread", "parameters": { "path": [], "post": [ { "type": "uint64", "name": "threadID", "required": false, "title": "ID of thread (messageID) " }, { "type": "uint64", "name": "lastReadMessageID", "required": false, "title": "ID of the last read message" } ] } }, { "name": "edit", "path": "/{messageID}", "method": "PUT", "title": "Edit existing message", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ], "post": [ { "type": "string", "name": "message", "required": true, "title": "Message contents (markdown)" } ] } }, { "name": "delete", "path": "/{messageID}", "method": "DELETE", "title": "Delete existing message", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ] } }, { "name": "replyGet", "path": "/{messageID}/replies", "method": "GET", "title": "Returns all replies to a message", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ] } }, { "name": "replyCreate", "path": "/{messageID}/replies", "method": "POST", "title": "Reply to a message", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ], "post": [ { "type": "string", "name": "message", "required": true, "title": "Message contents (markdown)" } ] } }, { "name": "pinCreate", "path": "/{messageID}/pin", "method": "POST", "title": "Pin message to channel (public bookmark)", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ] } }, { "name": "pinRemove", "path": "/{messageID}/pin", "method": "DELETE", "title": "Pin message to channel (public bookmark)", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ] } }, { "name": "bookmarkCreate", "path": "/{messageID}/bookmark", "method": "POST", "title": "Bookmark a message (private bookmark)", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ] } }, { "name": "bookmarkRemove", "path": "/{messageID}/bookmark", "method": "DELETE", "title": "Remove boomark from message (private bookmark)", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" } ] } }, { "name": "reactionCreate", "path": "/{messageID}/reaction/{reaction}", "method": "POST", "title": "React to a message", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" }, { "name": "reaction", "type": "string", "required": true, "title": "Reaction" } ] } }, { "name": "reactionRemove", "path": "/{messageID}/reaction/{reaction}", "method": "DELETE", "title": "Delete reaction from a message", "parameters": { "path": [ { "name": "messageID", "type": "uint64", "required": true, "title": "Message ID" }, { "name": "reaction", "type": "string", "required": true, "title": "Reaction" } ] } } ] }, { "title": "Attachments", "path": "/attachment/{attachmentID}", "parameters": { "path": [ { "name": "attachmentID", "type": "uint64", "required": true, "title": "Attachment ID" } ] }, "entrypoint": "attachment", "authentication": [ "Client ID", "Session ID" ], "apis": [ { "name": "original", "path": "/original/{name}", "method": "GET", "title": "Serves attached file", "parameters": { "path": [ { "name": "name", "type": "string", "required": true, "title": "File name" } ], "get": [ { "type": "bool", "name": "download", "required": false, "title": "Force file download" } ] } }, { "name": "preview", "path": "/preview.{ext}", "method": "GET", "title": "Serves preview of an attached file", "parameters": { "path": [ { "name": "ext", "type": "string", "required": true, "title": "Preview extension/format" } ] } } ] }, { "name": "search", "entrypoint": "search", "authentication": [ "Client ID", "Session ID" ], "path": "/search", "method": "GET", "title": "Search entry point", "parameters": { "get": [ { "name": "query", "type": "string", "required": false, "title": "Search query" } ] }, "apis": [ { "method": "GET", "name": "messages", "path": "/messages", "title": "Search for messages", "parameters": { "GET": [ { "name": "inChannel", "type": "uint64", "required": false, "title": "Search only in one channel" }, { "name": "fromUser", "type": "uint64", "required": false, "title": "Search only from one user" }, { "name": "firstID", "type": "uint64", "required": false, "title": "Paging; return newer messages only (higher id)" }, { "name": "lastID", "type": "uint64", "required": false, "title": "Paging; return older messages only (lower id)" } ] } } ] } ]