Forum Discussion
Hi bdelaune,
I'm not sure I fully understand what you're looking for. Are you just wanting to page through the results of the "/restapi/thread/[id]/messages/linear" call? If so, that call should accept the "page" and "page_size" parameters. So for example if you wanted to get 50 messages at a time:
/restapi/thread/[id]/messages/linear?page_size=50&page=1
/restapi/thread/[id]/messages/linear?page_size=50&page=2
/restapi/thread/[id]/messages/linear?page_size=50&page=3
...
If you were looking for something different, could you please try to explain more?
- bdelaune_hp11 years agoContributor
Thanks for your help, but let me clarify what I am asking.
We are utilizing the Community/Search/Messages api to get back a list of search results. When someone searches on the website and click on a link, it not only takes them to a linear version of the thread, but it also directs them to the correct page of the thread in order to view the message that matched their search results.
We are attempting to replicate this functionality within a tool on an internal system. Ideally, when a user clicks on one of the search results, they are directed to a page that renders a linear view of the thread and brings them directly to the page they need to be on to view the message that matched their search. As far as I can tell, there is no programmatic way to determine which number a message is in the linear view of a thread. That is what we need.
- nathan11 years agoExecutive
If you include the parameter restapi.response_style=view in the REST API URL, the results will include the URL for each message returned in the results.
For example, if you search Lithosphere:
http://lithosphere.lithium.com/restapi/vc/search/messages?q=test&restapi.response_style=view
The first message tag looks like this:
<message type="message" href="/messages/id/129079" view_href="http://lithosphere.lithium.com/t5/developers-discussion/Test-messages/m-p/129079#M4947">
The view_href URL should take you straight to the message, whichever page it is on.
- bdelaune_hp11 years agoContributor
Thanks, Nathan, and we are aware of this functionality, but we need the ability to show the thread within our tool without linking out to the website. The case we are using it in will not allow the users to actually go to the website (it is blocked on their machines). We need to replicate the same functionality as that view_href link within our own tool.
Does that make sense?
Related Content
- 10 months ago
- 5 years ago
- 11 months ago
- 2 years ago