Forum Discussion

wpigoury's avatar
wpigoury
Mentor
11 years ago

Latest message in REST API call topics streams

Hi,

 

I'm using the streams to build a component and a custom page which display the latest active topics sorted by descending last message's post date.

The call looks like this :

/topics/streams/key/by-latest-post/after?page_size=5&restapi.response_style=view

 

This request is meant to find the latest activity and in my opinion it would be logical to be able to link directly to the latest message and not to the first message of the topic.

But the only way to go directly to the end of the discussion is to make another call for each item using the thread href.

Like this :

/threads/id/xxxxx/messages/latest

 

This information should be included in the response of the streams call don't you think?

1 Reply

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    11 years ago

    Hi wpigoury 

     

    you could submit an idea to suggest this improvement, however I don't think there is a big overhead for the extra call. As you are looking up a single thread by ID the call should be relatively fast. I have actually implemented a very similar custom component and I haven't run into any particular performance problems by using this approach.

     

    Thanks,