{
"id": "social.colibri.beta.channel.listMessages",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "AuthRequired",
"description": "The request has no valid service auth."
},
{
"name": "Forbidden",
"description": "The requesting user may not read this channel."
},
{
"name": "ChannelNotFound",
"description": "No channel matches the given space reference."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"messages"
],
"properties": {
"cursor": {
"type": "string",
"description": "Pagination cursor for the next page."
},
"messages": {
"type": "array",
"items": {
"ref": "social.colibri.beta.channel.defs#messageView",
"type": "ref"
},
"description": "The channel's messages."
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"channel"
],
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1,
"description": "Maximum number of messages to return."
},
"cursor": {
"type": "string",
"description": "Pagination cursor from a previous call."
},
"channel": {
"type": "string",
"format": "space-ref",
"description": "The channel to list messages from."
},
"reverse": {
"type": "boolean",
"default": false,
"description": "Whether to return the oldest messages first instead of the newest."
}
}
},
"description": "Lists messages in a channel, newest first by default. Messages from the repo-backed channel this one was migrated from are included and marked legacy."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}