REST API for favoriting room


#1

There is no REST API for adding/removing room to/from favorites.

Realtime api is available:
https://rocket.chat/docs/developer-guides/realtime-api/method-calls/favoriting-rooms/


#2

@marcos.defendi Do you think that’s possible to implement? Could be something like this:

POST api/v1/chat/favorite/:roomId:
POST api/v1/chat/unfavorite/:roomId:


#3

Let’s please refrain from going this style on v1. As that’s changing the style mid v1, I thought we had decided to stay with the same style on the same versions and change it with new versions.


#4

Oh, right! What should be the style for v1 in this case?


#5

room.favorite?room/roomId which could be a toggle or go with room.unfavorite


#6

I hope we can do something like this instead for v2 :blush:

PATCH api/v2/rooms/:rid:

{ 
  favorite: true
}

and

PATCH api/v2/rooms/:rid:

{ 
  favorite: false
}

#7

Issue created, I guess we can archive this topic now: https://github.com/RocketChat/Rocket.Chat/issues/10317.


#8