News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Query for messages based on datetime
Tags: rest api
Oct 30, 2015 at 12:41pm   •   1 replies  •  0 likes
lowerym

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


'https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store?messageType=Fax&readStatus=Read&direction=Inbound'


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?


'https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store?messageType=Fax&readStatus=Read&direction=Inbound&creationTime>2015-10-20T00:00:00.000Z'




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?








1 Answer
answered on Oct 30, 2015 at 1:04pm  
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).

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us