Hi @zaziz,
Thanks for your patience so far!
So, just to clarify if I understand your requirement here correctly - are you trying to list out only those room/s where you've unread messages received by yesterday or, today or,
it doesn't matter those rooms have unread messages or, not, just list out the rooms where messages are/were posted on today or, yesterday?
I think my 2nd statement is your actual requirement here. But please correct me if my understanding is wrong.
However, I believe it's going to be hard to achieve the result with the filtration available on the Webex /messages REST API.
Because /list-rooms API would anyway list all the room IDs and their respective details, you can't stop it from doing that since there is no filter the roomIds or, room details based on when last message came to that room.
So, basically you need to collect the room IDs from the /list-rooms API and store it in a list with comma separated.
Now, you take those roomIds one-by-one from that list and check it through /list-messages API.
But this /list-messages API can be filtered based on "before" request parameter, but I think in your case you need the request parameter "after".
And the value of this "after" request parameter had to be passed as [today's date - 2].
Then if there is any valid response, then you could have consider those room IDs as your final preferred list of Rooms.
If there is no response from the /list-messages API with the filtration of "after" request parameter with the value as [today's date - 2], then that roomId used in the /list-messages API request would be rejected.
But since as of now you've only the "before" request parameter available, hence I don't think such filtration would be possible and I don't think this requirement can be fulfilled.
And there is no other way to find a room's activity as of now either.
Please let us know in case you've any further queries going ahead.
Regards!
Sandip