GET api/Village/{village}/Conversation/{conversationId}?MessageSequence={MessageSequence}&Take={Take}&Direction={Direction}&RequireFullPage={RequireFullPage}&UpdateLastRead={UpdateLastRead}
Gets messages in the specified conversation. If MessageId is NOT provided (or is the same as the user's last-read message) AND SortDirection = Asc, the user's last-read indicator will be updated to match the last message in the result set If the result set is empty, there are (currently) no more records in the direction being retrieved. If SortDirection = Desc and there are no more records, you've reached the beginning of the conversation
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
conversationId |
The ID of the conversation to retrieve |
globally unique identifier |
Required |
MessageSequence |
If provided, the sequence of the message to use as the basis for paging. If not provided, will use the user's "Last Read" message as the basis for paging. When Direction = Asc, result will be messages >= MessageSequence; When Direction = Desc, result will be messages <= MessageSequence; |
integer |
None. |
Take |
Number of messages to retrieve; defaults to 20 |
integer |
None. |
Direction |
Which direction to retrieve: Asc (or 0) = newer messages; Desc (or 1) = older messages. If MessageSequence is null, Direction will always be Asc. |
SortDirection |
None. |
RequireFullPage |
If true, the server will always return a full page (Take) records if available. Use this for loading the initial conversation |
boolean |
None. |
UpdateLastRead |
If true, the server will update the Last Read indicator for the user. Defaults to True |
boolean |
None. |
village | string |
None. |
Body Parameters
None.
Response Information
Resource Description
Collection of ConversationMessageModelName | Description | Type | Additional information |
---|---|---|---|
MessageId |
The unique ID of the message |
globally unique identifier |
None. |
ConversationId |
The unique ID of the conversation |
globally unique identifier |
None. |
IsAction |
If true, this is an "Action" message (something happened, vs. something was said) |
boolean |
None. |
Message |
The text of the message |
string |
None. |
Sent |
Date/Time the message was sent (as perceived by the server) |
date |
None. |
SentBy |
The name of the user who sent the message |
string |
None. |
SentById |
The ID of the user who sent the message |
globally unique identifier |
None. |
Sequence |
The messages sequence number |
integer |
None. |
Response Formats
application/json, text/json
[ { "MessageId": "6b670fd6-4956-4039-881a-a447e5cb5dae", "ConversationId": "dbf9a3e6-8568-43cc-b72c-2dd3b752347b", "IsAction": true, "Message": "sample string 4", "Sent": "2025-06-03T05:47:46.218+00:00", "SentBy": "sample string 6", "SentById": "2d571e9a-31a3-483a-af67-d1b81ae4ac69", "Sequence": 8 }, { "MessageId": "6b670fd6-4956-4039-881a-a447e5cb5dae", "ConversationId": "dbf9a3e6-8568-43cc-b72c-2dd3b752347b", "IsAction": true, "Message": "sample string 4", "Sent": "2025-06-03T05:47:46.218+00:00", "SentBy": "sample string 6", "SentById": "2d571e9a-31a3-483a-af67-d1b81ae4ac69", "Sequence": 8 } ]
application/xml, text/xml
<ArrayOfConversationMessageModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models"> <ConversationMessageModel> <ConversationId>dbf9a3e6-8568-43cc-b72c-2dd3b752347b</ConversationId> <IsAction>true</IsAction> <Message>sample string 4</Message> <MessageId>6b670fd6-4956-4039-881a-a447e5cb5dae</MessageId> <Sent>2025-06-03T05:47:46.2188363+00:00</Sent> <SentBy>sample string 6</SentBy> <SentById>2d571e9a-31a3-483a-af67-d1b81ae4ac69</SentById> <Sequence>8</Sequence> </ConversationMessageModel> <ConversationMessageModel> <ConversationId>dbf9a3e6-8568-43cc-b72c-2dd3b752347b</ConversationId> <IsAction>true</IsAction> <Message>sample string 4</Message> <MessageId>6b670fd6-4956-4039-881a-a447e5cb5dae</MessageId> <Sent>2025-06-03T05:47:46.2188363+00:00</Sent> <SentBy>sample string 6</SentBy> <SentById>2d571e9a-31a3-483a-af67-d1b81ae4ac69</SentById> <Sequence>8</Sequence> </ConversationMessageModel> </ArrayOfConversationMessageModel>