Requests for additional APIs

As far as I’m aware, Mattermost has no concept of archiving channels. It’s not in the API because it’s not possible to do. You can delete channels, but I think that’s permanent.

The equivalent API calls for the other ones you mentioned are:

  • channels.history - Mattermost splits this into several different API calls. All of them sit under api/v1/channels/<channel ID>/posts.
  • /<offset>/<limit> simply returns the specified number of posts, where <offset> is the how many posts back in time you want to start from (usually 0) and <limit> is the number of posts to get.
  • /<time> returns all mosts made or modified since the given UNIX timestamp.
  • /<post ID>/before/<offset>/<limit> will return the given number of posts before the one specified in <post ID>
  • /<post ID>/after/<offset>/<limit> will return the given number of posts after the one specified
    The only thing that’s really missing from this is the ability to get all posts between 2 times, but its not impossible to do that with the available API calls.
  • channels.invite - In Mattermost, you don’t really invite, you simply add them. Use api/v1/channels/<channel ID>/add with the ID of the user you want to add in the request payload (as a JSON string of course).
  • channels.rename - Use api/v1/channels/update. The request payload for this should contain the entire channel JSON string with the display_name field modified.