Get all top-level messages of the specified conversation.
get
/social/api/v1/conversations/{conversationID}/messages
Request
Supported Media Types
- application/json
Path Parameters
-
conversationID: integer(int64)
The conversation ID. The object's unique identifier from a long integer representation.
Specify a filter to query.
Root Schema : XV1MessageFilterInfo
Type:
object
V1 Message Filter Information.
Show Source
-
excludeMembershipMessages(optional):
boolean
Exclude system messages that indicate a change in conversation membership.
-
flattenReplies(optional):
boolean
If true, flatten the results so that top-level messages and replies are both returned as top-level results. If false, then only top-level messages will be returned as top-level results (but replies will still be returned in the XV1MessageInfo.comments field).
-
limitToMessagesSince(optional):
string(date)
Limit to messages created since a given date.
-
moderationStateFilter(optional):
array moderationStateFilter
Limit to the following Moderation states.
Nested Schema : moderationStateFilter
Type:
array
Limit to the following Moderation states.
Show Source
Nested Schema : XV1MessageModerationFilterState
Type:
Show Source
object
-
field(optional):
string
Allowed Values:
[ "APPROVED", "DRAFT", "REJECTED" ]
V1 Message Moderation Filter States.
Response
Supported Media Types
- application/json
200 Response
Successful operation.
Root Schema : XV1MessageListInfo
Type:
object
V1 Message List Information DTO.
Show Source
-
hasMore(optional):
boolean
If true, there are more items to be returned.
-
items(optional):
array items
The messages being returned. Note that messages are returned starting from the tail of the conversation (newest first).
-
nextURL(optional):
string(url)
Next page URL for the list. Null if this is the last page.
-
previousURL(optional):
string(url)
Previous page URL for the list. Null if this is the first page.
-
total(optional):
integer(int32)
If specified, this is the total number of available items. Null if the total is unknown.
Nested Schema : items
Type:
array
The messages being returned. Note that messages are returned starting from the tail of the conversation (newest first).
Show Source
-
Array of:
object XV1MessageInfo
V1 Message Information DTO.
Nested Schema : XV1MessageInfo
Type:
object
V1 Message Information DTO.
Show Source
-
altitude(optional):
number(double)
The object's altitude.
-
collectionURL(optional):
string(url)
A URL to this object's containing collection.
-
comments(optional):
array comments
The comments on this message.
-
conversationURL(optional):
string(url)
A URL to this object's containing conversation.
-
createdByID(optional):
An object's unique identifier from a long integer representation.
-
createdByURL(optional):
string(url)
A URL to the user that created this object.
-
createdByUserDisplayName(optional):
string
The display name of the user that created this object.
-
createdByUserName(optional):
string
The name of the user that created this object.
-
createdDate(optional):
string(date)
The date this object was created.
-
createdDateInISO8601Format(optional):
string
The date this object was created, in ISO 8601 format.
-
displayName(optional):
string
The display name of this object.
-
documentURL(optional):
string(url)
A URL to any associated document for this message.
-
externalID(optional):
string
The external ID for this message.
-
folderURL(optional):
string(url)
A URL to any associated folder for this message.
-
followupsURL(optional):
string(url)
A URL to followups on this message. Can be null.
-
formattedLocale(optional):
string
The locale, if this chat message was dynamically formatted to the specified locale.
-
id(optional):
An object's unique identifier from a long integer representation.
-
isRemoved(optional):
boolean
True if this message has been removed.
-
isSystem(optional):
boolean
True when the message text was generated by the system.
-
latitude(optional):
number(double)
The object's latitude.
-
likesURL(optional):
string(url)
A URL to likes on this message. Can be null.
-
longitude(optional):
number(double)
The object's longitude.
-
moderationState(optional):
object XV1MessageModerationState
-
modifiedByID(optional):
An object's unique identifier from a long integer representation.
-
modifiedByURL(optional):
string(url)
A URL to the user that last modified this object.
-
modifiedByUserDisplayName(optional):
string
The display name of the user that last modified this object.
-
modifiedByUserName(optional):
string
The name of the user that last modified this object.
-
modifiedDate(optional):
string(date)
The date this object was last modified.
-
modifiedDateInISO8601Format(optional):
string
The date this object was last modified, in ISO 8601 format.
-
name(optional):
string
The name of this object.
-
nComments(optional):
integer(int32)
The number of comments or replies to this message.
-
objectType(optional):
string
The type of this object.
-
ordinal(optional):
integer(int32)
The ordinal for this message. Message ordinals are numbers for messages that are unique within a conversation and can be used with read and unread ranges.
-
parentID(optional):
An object's unique identifier from a long integer representation.
-
parentURL(optional):
string(url)
A URL to the parent corresponding to {@code parentID}. Can be null.
-
plainText(optional):
string
The plain-text version of this message.
-
removedByID(optional):
An object's unique identifier from a long integer representation.
-
removedByURL(optional):
string(url)
A URL to the user that last removed this object.
-
removedByUserDisplayName(optional):
string
The display name of the user that last removed this object.
-
removedByUserName(optional):
string
The name of the user that last removed this object.
-
removedDate(optional):
string(date)
The date this object was removed.
-
removedDateInISO8601Format(optional):
string
The date this object was removed, in ISO 8601 format.
-
richText(optional):
string
The rich-text version of this message.
-
socialObjectURL(optional):
string(url)
A URL to this object's containing collaboration object.
-
starsURL(optional):
string(url)
A URL to stars on this message. Can be null.
-
type(optional):
object XV1MessageType
-
url(optional):
string(url)
A URL to this object.
-
version(optional):
integer(int32)
The version number of this message.
Nested Schema : comments
Type:
array
The comments on this message.
Show Source
-
Array of:
object XV1MessageInfo
V1 Message Information DTO.
Nested Schema : XV1MessageModerationState
Type:
Show Source
object
-
field(optional):
string
Allowed Values:
[ "APPROVED", "DRAFT", "REJECTED", "REPLACED" ]
V1 Moderation state of messages in a conversation.
Nested Schema : XV1MessageType
Type:
Show Source
object
-
field(optional):
string
Allowed Values:
[ "SYSTEM_ANNOTATION_CLOSED", "SYSTEM_ANNOTATION_OPENED", "SYSTEM_ARTIFACT_COPIED", "SYSTEM_ARTIFACT_CREATED", "SYSTEM_ARTIFACT_NAME_CHANGED", "SYSTEM_ARTIFACT_STATE_CHANGED", "SYSTEM_CONVERSATION_ATTRIBUTES_CHANGED", "SYSTEM_CONVERSATION_DISCOVERABLE_CHANGED", "SYSTEM_CONVERSATION_FORKED_NEXT", "SYSTEM_CONVERSATION_FORKED_PREVIOUS", "SYSTEM_CONVERSATION_MEMBERSHIP_CHANGED", "SYSTEM_CONVERSATION_NAME_CHANGED", "SYSTEM_CONVERSATION_STATE_CLOSED_CHAINED", "SYSTEM_CONVERSATION_STATE_CLOSED_DISABLED", "SYSTEM_CONVERSATION_STATE_CLOSED_DROPPED", "SYSTEM_CONVERSATION_STATE_CLOSED_RESOLVED", "SYSTEM_CONVERSATION_STATE_OPEN_ACTIVE", "SYSTEM_CONVERSATION_TYPE_FIELDS_CHANGED", "SYSTEM_GENERIC", "SYSTEM_RTC_CONFERENCE", "SYSTEM_RTC_CONFERENCE_RECORDING_AVAILABLE", "SYSTEM_UPLOAD_GROUP", "SYSTEM_VERSION_ADDED", "SYSTEM_WIDGET", "SYSTEM_WIDGET_CREATED", "SYSTEM_WIDGET_REMOVED", "USER_ANNOTATION", "USER_ANNOTATION_GROUP", "USER_CHAT", "WEBHOOK_CHAT" ]
V1 Message Types.
Examples
The following example shows how to get all top-level messages of the specified conversation by submitting a GET request on the REST resource using cURL.
curl -X GET -c mycookies.jar -b mycookies.jar -H 'X-Waggle-RandomID:b97554e5a31e50a734899ee4f79218bd' -H 'Content-Type: application/json' 'https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/conversations/2206/messages'
The following example includes a query filter.
curl -X GET -c mycookies.jar -b mycookies.jar -H 'X-Waggle-RandomID:b97554e5a31e50a734899ee4f79218bd' -H 'Content-Type: application/json' 'https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/conversations/2206/messages?filter={"excludeMembershipMessages":true}'
Example of Response Body
The following shows an example of the response JSON document.
{ "hasMore" : false, "items" : [ { "id" : "24011", "objectType" : "waggle/chat", "createdByID" : "11001", "createdByUserName" : "jeff.pringle@example.com", "createdByUserDisplayName" : "jeff.pringle@example.com", "createdByURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/people/11001", "createdDate" : 1455326386743, "modifiedByID" : "11001", "modifiedByUserName" : "jeff.pringle@example.com", "modifiedByUserDisplayName" : "jeff.pringle@example.com", "modifiedByURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/people/11001", "modifiedDate" : 1455326386743, "isRemoved" : false, "url" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/messages/24011", "conversationURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/conversations/22006", "ordinal" : 1, "type" : "SYSTEM_CONVERSATION_STATE_OPEN_ACTIVE", "richText" : "The Conversation state changed to 'Open Active'.", "plainText" : "The Conversation state changed to 'Open Active'.", "version" : 1, "isSystem" : true, "nComments" : 0 }, { "id" : "24009", "objectType" : "waggle/chat", "createdByID" : "11001", "createdByUserName" : "jeff.pringle@example.com", "createdByUserDisplayName" : "jeff.pringle@example.com", "createdByURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/people/11001", "createdDate" : 1455326330859, "modifiedByID" : "11001", "modifiedByUserName" : "jeff.pringle@example.com", "modifiedByUserDisplayName" : "jeff.pringle@example.com", "modifiedByURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/people/11001", "modifiedDate" : 1455326330859, "isRemoved" : false, "url" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/messages/24009", "conversationURL" : "https://socialnetwork06065-ustraveler15926.socialnetwork.dc1.c9dev1.example.com/osn/social/api/v1/conversations/22006", "ordinal" : 0, "type" : "SYSTEM_CONVERSATION_STATE_CLOSED_RESOLVED", "richText" : "The Conversation state changed to 'Closed Resolved'.", "plainText" : "The Conversation state changed to 'Closed Resolved'.", "version" : 1, "isSystem" : true, "nComments" : 0 } ]