Skip to content

Read recent activity

GET
/api/activity
curl --request GET \
--url 'http://127.0.0.1:7799/api/activity?limit=20' \
--cookie cotal_web_session=<cotal_web_session>

Merge the newest chat messages selected by stream sequence with recent direct messages, order by message timestamp and retain the newest limit. partial, missing and reasons identify sources that failed or exceeded the shared 8000 ms deadline. A partial page is still HTTP 200. Failure to obtain the channel list is HTTP 500.

limit
integer
default: 200 <= 9007199254740991

Maximum requested messages. Absent or empty uses 200. Accepts decimal digits naming a safe integer, including 0; negative, fractional, whitespace-padded and unsafe values are refused.

Example

20

The current snapshot or history page.

Media typeapplication/json
object
entries
required
Array
One of:
object
mode
required
string
Allowed value: chat
channel
required
string
msg
required
One of:
object
channel
required

Channel name — multicast (broadcast to everyone on the channel).

string
contextId

Conversation / thread correlation id.

string
from
required
object
id
required
string
name
required
string
role
string
id
required

Unique message id.

string
mentions

Lowercased peer names called out within a channel message — a wake hint that also, on a live channel, routes a durable copy to each mentioned target authorized to read that channel (SPEC §4/§5). It never carries content outside the target’s read ACL and is not a routing substitute for channel/to; the message still multicasts to the whole channel. Omitted when empty.

Array<string>
parts
required
Array
One of:
object
kind
required
string
Allowed value: text
text
required
string
replyTo

Id of the message being replied to.

string
space
required
string
ts
required

Epoch ms.

number
Any of:
partial
required
boolean
read
required
integer
<= 2
of
required
integer
Allowed value: 2
missing
required
Array<string>
Allowed values: chat direct messages
reasons
required
object
key
additional properties
string
deadlineMs
required
integer
Allowed value: 8000

Example

{
"entries": [
{
"mode": "chat",
"msg": {
"parts": [
{
"kind": "text"
}
]
}
}
],
"of": 2,
"missing": [
"chat"
],
"deadlineMs": 8000
}

A valid one-use k query token is exchanged for a dashboard session. The response redirects to the same path without its query. A valid existing cookie takes precedence over k.

Location
string

The requested path without the query string.

Set-Cookie
string

Cotal_web_session=; Path=/; HttpOnly; SameSite=Strict. The default local listener uses HTTP.

The query or percent-encoded channel name is invalid.

Media typeapplication/json
object
error
required
string

Examplegenerated

{
"error": "example"
}

No valid session, an invalid launch token, or a spent launch token. The readiness credential does not authorize these routes.

Media typeapplication/json
object
error
required
string
Allowed values: unauthenticated launch-token-already-used

Example

{
"error": "unauthenticated"
}

Origin is checked before session authentication. An origin outside this listener’s allowed origins is refused.

Media typeapplication/json
object
error
required
string
Allowed value: cross-origin

Example

{
"error": "cross-origin"
}

These read routes accept no request body. An announced body is refused before it is read; the connection is closed.

Media typeapplication/json
object
error
required
string

Examplegenerated

{
"error": "example"
}

The request failed. The body names the failure; a failed read does not terminate the dashboard.

Media typeapplication/json
object
error
required
string

Examplegenerated

{
"error": "example"
}