Timeline
GET /conversations/:conversation/timeline
A conversation contains a time-ordered list of Messages and Events that have occurred. The Timeline is a collection of these, in descending time order.
Examples
Getting the conversation’s timeline
Request
GET /conversations/Pvwqm5G/timeline
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /conversations/Pvwqm5G/timeline
Response
Status
200
Response Type
Example Body
{
"@type": "Timeline",
"id": "/conversations/Pvwqm5G/timeline",
"@context": "/contexts/Timeline.jsonld",
"latestPosition": "2020-05-21T20:07:20.862Z",
"totalItems": 3,
"members": [
{
"@type": "Message",
"id": "/messages/06oyogE",
"@context": "/contexts/Message.jsonld",
"direction": "in",
"body": "He once made a weeping willow laugh",
"formattedBody": "<div>He once made a weeping willow laugh</div>",
"deliveryState": "received",
"displayTimestamp": "2018-07-24T20:59:32.156Z",
"timelinePosition": "2018-07-24T20:59:32.156Z",
"conversation": "/conversations/JYnJBY",
"sender": null,
"attachments": {
"@context": "/contexts/hydra:Collection.jsonld",
"@type": "hydra:Collection",
"id": "/messages/joZqVWd/attachments",
"members": [],
"totalItems": 0
},
"friendlyStateDescription": "Inbound Message Received",
"retryAllowed": false,
"retry": null,
"latestEventAt": "2018-07-24T20:59:32.156Z",
"flags": [],
"source": "textus"
},
{
"@type": "Message",
"id": "/messages/QNDkpL",
"@context": "/contexts/Message.jsonld",
"direction": "out",
"body": "Chuck Norris doesn't use web standards as the web will conform to him.",
"formattedBody": "<div>Chuck Norris doesn't use web standards as the web will conform to him.</div>",
"displayTimestamp": "2018-07-24T20:59:32.156Z",
"timelinePosition": "2018-07-24T20:59:32.156Z",
"deliveryState": "delivered",
"conversation": "/conversations/kY1QwY",
"sender": "/users/hikvlD",
"attachments": {
"@context": "/contexts/hydra:Collection.jsonld",
"@type": "hydra:Collection",
"id": "/messages/joZqVWd/attachments",
"members": [],
"totalItems": 0
},
"friendlyStateDescription": "Message Delivered",
"retryAllowed": false,
"retry": null,
"latestEventAt": "2018-07-24T20:59:32.156Z",
"flags": [],
"source": "textus"
},
{
"@type": "ConversationEvent",
"id": "/conversation_events/Pvwqm5G",
"@context": "/contexts/ConversationEvent.jsonld",
"type": "open",
"displayTimestamp": "2018-10-30T21:01:43.498Z",
"timelinePosition": "2018-10-30T21:01:43.498Z",
"conversation": "/conversations/Pvwqm5G",
"user": null,
"assignee": null
}
],
"view": {
"@context": "/contexts/hydra:PartialCollectionView.jsonld",
"@type": "hydra:PartialCollectionView",
"id": "/conversations/Pvwqm5G/timeline",
"first": "/conversations/Pvwqm5G/timeline",
"next": null,
"previous": null
}
}