Home

Yammer REST call how to order by creation date?

Highlighted
Jesper Würtz
Occasional Contributor

Hi,

 

I want to always have the newest yammer post in a specific group to be showen at the top. But when using the REST call as it is, it will always show the one that has had the latest activity.

 

My call look like this.

https://api.yammer.com/api/v1/messages/in_group/4225300.json?threaded=true&limit=3

 

I would like either to orderby the created_at date or by the id of the message. 

 

How can this be done?

2 Replies
No body has any idear?

It looks like that API doesn't have an order_by parameter, and the built-in undocumented APIs are all going to return latest thread added to, like you describe, because that's how the overall tool functions.

 

Personally I would call the export API and then programmatically parse through the messages return (which is structured XML or JSON), and call out the rows ordered by created_at date.  Export is the only way I know of to get at the structured data, so go get it, then write your own code to do the ordering.

 

What is the use case?