Query for messages based on datetime

  • 1
  • Question
  • Updated 4 years ago
While working with RC through the API we currently do an update availability to 'Deleted'  (with this call RestClient.put faxi["uri"],{:readStatus => 'Read', :availability => 'Deleted'}.to_json,{:Authorization => bearer,:content_type => :json, :accept => :json})

This cause messages to follow the 5 day purge life cycle.

After being Deleted for a certain time (by default, 5 days) the system erases message data (attachments) and automatically switches its availability to Purged. Purged messages cannot be restored but their metadata is stored in the system for some time (by default, 5 days). After that all information about such messages is physically removed from the system.

 so that we can keep messages in RC for any trouble shooting that may need to take place.

which would be great other then the fact that there seems to be a 200 message limitation on inboxes.  when we have 200 faxes in an inbox we get partial pages sometimes on new inbound messages.

given that some of our users do excess this 200 messages inbound before old messages can be cleaned up from the 5 day life cycle and that RC does not offer a way to increase the 200 limit or change the default from 5 days (which why would you call it a default if its not something that can be changed?)  we need to write our own cron to clean up messages more frequently to prevent receiving partial faxes

Currently i can do something similar to this to get inbound messages


What i am wondering is how can i go about finding all messages that meet the following cirtieral and exceed a selected age (ex 1,2,3 dates)  is it possible to do something like this?


Also is there anything on the road map for users to be able to change the purge default on their profile?   

or a fix for the partial page inbound when inbox message count = 200?
Photo of lowerym


  • 152 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,662 Points 5k badge 2x thumb
You can use dateTo and dateFrom parameters while requesting message list to obtain a list of messages which are based on a beginning and ending time range. You can see the full Message API options here: http://ringcentral.github.io/api-explorer/#!/Messaging/v1_0_account__accountId__extension__extension...

Our current plans do not include adding the ability for users to modify the purge default on their profile or to increase the inbox message count beyond 200.

It isn't prudent to use RingCentral's inboxes as your database of record, instead you should be pulling that data into your own message stores and keeping your inbox clean (that's why the 200 message limit is in place).