Skip to content

Read channel membership

GET
/api/membership
curl --request GET \
--url http://127.0.0.1:7799/api/membership \
--cookie cotal_web_session=<cotal_web_session>

Return broker-sourced live and durable channel membership. asOf is absent when no membership heartbeat has been written. Use this for display, not authorization.

The current snapshot or history page.

Media typeapplication/json
object
asOf
number
members
required
Array<object>
object
id
required
string
live
required
Array<string>
durable
required
Array<string>
observedAt
required
number

Examplegenerated

{
"asOf": 1,
"members": [
{
"id": "example",
"live": [
"example"
],
"durable": [
"example"
],
"observedAt": 1
}
]
}

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.

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"
}

The membership snapshot could not be read. A missing snapshot is not an empty successful one.

Media typeapplication/json
object
error
required
string
Allowed value: membership-read-failed
reason
required
string

Example

{
"error": "membership-read-failed"
}