list-alert-slack-channels
dci list-alert-slack-channels [flags]
Lists Slack destinations eligible for Alert notifications for the authenticated customer and caller. Returns canonical identifiers for recipientsSlackChannels and integration status. User credentials include visible private channels; service accounts return public/shared channels only. Results are sorted by stable destination identity. Keep nameContains unchanged when following pageToken.
Flags
| Flag | Type | Default | Example | Description |
|---|---|---|---|---|
--name-contains | string | Case-insensitive substring of the channel display name. | ||
--max-results | integer | 50 | ||
--page-token | string | Page token, returned by a previous call, to request the next page of results |
Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.
Output
Eligible channels and connection status.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
items | array of one of 2 variants | |
rowCount | integer | Total eligible channels after filtering and before pagination. |
pageToken | string | Opaque continuation token. Omitted on the final page. |
workspaceStatus | string | Integration status. Reconnect for inactive; grant private-channel scopes for missing_private_scope. None means no usable workspace was found; a shared channel may still be available. One of: "none", "ok", "inactive", "missing_private_scope". |
isWorkspaceConnected | boolean | |
hasSharedChannel | boolean |
Raw JSON schema
{
"type": "object",
"required": [
"items",
"rowCount",
"workspaceStatus",
"isWorkspaceConnected",
"hasSharedChannel"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"description": "Eligible Slack destination returned by listAlertSlackChannels. Identity is id plus workspace/shared context. customerId defaults to the authenticated customer; an explicit mismatch is rejected. Name and type are canonical display metadata. Existing unavailable destinations may be retained or removed. Service accounts can add public/shared destinations; new private destinations require a user credential with channel visibility.",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"workspace": {
"type": "string",
"description": "Connected workspace name returned by discovery. Required for a non-shared channel."
},
"shared": {
"type": "boolean",
"default": false
},
"customerId": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"description": "Display name, resolved server-side."
},
"type": {
"type": "string",
"description": "Channel visibility, resolved server-side.",
"enum": [
"public",
"private"
]
}
},
"oneOf": [
{
"required": [
"shared"
],
"properties": {
"shared": {
"type": "boolean",
"enum": [
true
]
}
}
},
{
"required": [
"workspace"
],
"properties": {
"shared": {
"type": "boolean",
"enum": [
false
]
},
"workspace": {
"type": "string",
"minLength": 1
}
}
}
]
}
},
"rowCount": {
"type": "integer",
"description": "Total eligible channels after filtering and before pagination."
},
"pageToken": {
"type": "string",
"description": "Opaque continuation token. Omitted on the final page."
},
"workspaceStatus": {
"type": "string",
"enum": [
"none",
"ok",
"inactive",
"missing_private_scope"
],
"description": "Integration status. Reconnect for inactive; grant private-channel scopes for missing_private_scope. None means no usable workspace was found; a shared channel may still be available."
},
"isWorkspaceConnected": {
"type": "boolean"
},
"hasSharedChannel": {
"type": "boolean"
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 503 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- create-alert — Create an alert
- delete-alert — Delete an alert
- get-alert — Retrieve an alert
- list-alerts — List alerts
- update-alert — Update an alert
- API reference: GET /analytics/v1/alerts/slack-channels
Aliases: listalertslackchannels