Read the newest journal entry
const url = 'https://chat.work.optidata.cloud/api/chats/36/wal/latest';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://chat.work.optidata.cloud/api/chats/36/wal/latest \ --header 'Authorization: Bearer <token>'The most recent entry of the conversation’s journal — your starting point
when you begin following it. Keep its id and pass it to since/{id}.
A conversation whose journal is still empty answers 200 with an empty
object; start from 0 in that case.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the conversation.
Responses
Section titled “ Responses ”The newest journal entry, or an empty object when the journal is empty.
object
Monotonic position in the journal. Pass it to since/{id}.
The message the entry is about.
The client session that caused the change. Compare it with your own to skip the echo of your own writes.
The kind of change this entry records.
The payload of the change.
Examples
Empty journal
{}Missing, malformed or expired authentication key.
Authentication failures — and a few permission denials — use an error
key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not a participant of the conversation, or lacks the role the operation requires.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "This action is unauthorized."}The resource does not exist, or does not belong to the given conversation.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Chat\\Chat] 99999999"}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}