A caller can fetch all unseen messages by passing the timestamp of the last message seen as the since parameter and the number of messages with the same timestamp value already seen as the skip parameter. This means that every message will be seen exactly once even in the case that an additional message is processed with the same timestamp as the last message returned by the previous call, and the case where there are more than maxMessages with the same timestamp value.
This method is intended for historic queries and is generally reliable but if guaranteed delivery of every message in real time is required then the equivilent firehose method should be called.
Path parameters
sidstringRequired
Stream ID
Query parameters
sinceinteger · int64Required
Timestamp of first required message.
This is a long integer value representing milliseconds since
Jan 1 1970
skipintegerOptional
No. of messages to skip.
limitintegerOptional
Max No. of messages to return. If no value is provided, 50 is the default. The maximum supported value is 500.
Header parameters
sessionTokenstringRequired
Session authentication token.
keyManagerTokenstringOptional
Key Manager authentication token.
Responses
200
OK
application/json
204
No Messages.
400
Client error, see response body for further details.
application/json
401
Unauthorized: Session tokens invalid.
application/json
403
Forbidden: Caller lacks necessary entitlement.
application/json
500
Server error, see response body for further details.
application/json
get
/v4/stream/{sid}/message
📘 Optional attributes returned
Note that some attributes are returned in the payload only under specific conditions:
sharedMessage only when the message represented by this class is a wall post sharing another message;
initialMessageId, initialTimestamp, and replacing only when the corresponding message is sent as an update to another message thanks to Update Message endpoint. Note that the first two attributes relate to the original (and therefore first) message sent, whereas the replacing attribute relates to the message that has been updated by this message;
replacedBy only when this message has been updated by a new message. It contains the id of the replacing message.
parentMessageId only when this message is a reply or a forward of another message which id is returned in this attribute.
Pagination usage
• The skip parameter is supposed to be used to skip messages that have the same timestamp as the one specified on since.
• Pagination is supposed to use the since parameter instead of skip and limit.
Examples:
If you want to get two messages at a time skipping the ones you have already seen, the calls should be the following:
First call
https://acme.symphony.com/agent/v4/stream/sid/message?since=0&limit=2
Second call
Let's assume here that the timestamp from the message returned on the first call was 1551052800000 and there was no other message with that same timestamp returned.
It returns the two messages received after or on the timestamp 1551052800000, skipping one message from that same timestamp (which is the one you have already seen).
Note that you can keep doing this process with subsequent calls.
📘 Supported stream types
In addition to conversation streams such as IM, Chat rooms and Wall posts, Symphony also supports other types of streams, some of them reserved for internal use. These other stream types (ACTION, POST, PRIVATE_CHANNEL, MEETING, SUPPRESS_JUSTIFICATION) are not supported by the Get Messages endpoint.