Timeline API

The call that reads back the events of one conversation, and the messages only that call uses.

This page is made from the API contract, contract/schema/namjai/v1/timeline.proto, so it always says what the server really accepts. How to reach the server and what a failure looks like are on Server API.

TimelineService

TimelineService reads back what landed. Version 1 serves the end-to-end test with the demo sender: it lists the events of one conversation.

Full name: namjai.v1.TimelineService.

ListConversationEvents

Path: POST /namjai.v1.TimelineService/ListConversationEvents

Request: ListConversationEventsRequest. Response: ListConversationEventsResponse.

ListConversationEvents returns the events of one conversation in the order they happened: by occurred_at_unix_ms, then source_sequence, then event_id, so the order is the same on every call (ING-8). It reads only.

Messages

Each message is a JSON object, or protobuf. A field's JSON name is the name to use in JSON; the server also accepts the field name. A field left out reads as empty, zero or false.

ListConversationEventsRequest

ListConversationEventsRequest names one conversation and a page of it.

NumberFieldJSON nameTypeKindWhat it is
1channelchannelChannelsingleThe conversation's channel.
2accountaccountstringsingleThe agent's own handle, as in Event.account.
3conversation_idconversationIdstringsingleThe source's ID for the conversation, as in Event.conversation_id.
4page_sizepageSizeint32singleThe most events to return. 0 means the server's default of 100; the server caps it at 1,000.
5page_tokenpageTokenstringsingleEmpty for the first page; otherwise next_page_token from the previous response, unchanged.

ListConversationEventsResponse

ListConversationEventsResponse is one page of a conversation.

NumberFieldJSON nameTypeKindWhat it is
1eventseventsStoredEventrepeatedThe events on this page, in the order they happened.
2next_page_tokennextPageTokenstringsingleThe token for the next page, or empty when this is the last page.

StoredEvent

StoredEvent is an event as the server holds it.

NumberFieldJSON nameTypeKindWhat it is
1eventeventEventsingleThe event as it was sent.
2received_at_unix_msreceivedAtUnixMsint64singleWhen the server first stored it, in UTC milliseconds.
3media_sha256mediaSha256stringrepeatedThe SHA-256 of every media file attached to it, in the order they were registered.