ReferenceHTTP APIAgents

Search the channels the agent's Slack bot can see

GET
/v1/agents/{id}/slack/channels

Channels whose name starts with q (any case, a leading # ignored), by name, limit per page (default 20, at most 50): every public channel of the install and the private ones the bot is already in. is_member says whether the bot is in the channel. The server reads the app's whole list from Slack (conversations.list with the bot token) and keeps it for 60 seconds per app, up to 10,000 channels (truncated: true past that); a binding change in the same API process drops it sooner. Pass next_cursor back as cursor with the same q for the next page; once the list it pages through has been replaced the cursor answers 400 CURSOR_EXPIRED, and the search starts over. When Slack rate limits, the last list read is returned with stale: true, or 503 with Slack's Retry-After when there is none; Slack is not asked again before then. The agent needs an installed Slack app with a bot token (409 SLACK_NOT_INSTALLED). Owners, admins and the agent's admins.

Auth: cookie session only; no scope.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The agent's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Query Parameters

q?string

A prefix of the channel name, any case; a leading # is ignored. Empty matches every channel.

Lengthlength <= 80
Default""
cursor?string

The next_cursor of the page before; omit it for the first page.

Length1 <= length <= 512
limit?integer

How many items a page holds at most.

Range1 <= value <= 50
Default20

Response Body

One page of matching channels.

application/json
  1. response
items*array<>
Itemsitems <= 50
next_cursor*|null
truncated*boolean
stale*boolean
Example Request
curl -X GET 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/slack/channels'
Example Response
{  "items": [    {      "id": "C0DEPLOY1",      "name": "deploy",      "is_private": false,      "is_member": true    },    {      "id": "G0DESIGN1",      "name": "design",      "is_private": true,      "is_member": true    }  ],  "next_cursor": "eyJzIjoiYWJjIiwibyI6MiwicSI6ImRlIn0",  "truncated": false,  "stale": false}