メインコンテンツへスキップ

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

FlagTypeDefaultExampleDescription
--name-containsstringCase-insensitive substring of the channel display name.
--max-resultsinteger50
--page-tokenstringPage 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.

FieldTypeDescription
itemsarray of one of 2 variants
rowCountintegerTotal eligible channels after filtering and before pagination.
pageTokenstringOpaque continuation token. Omitted on the final page.
workspaceStatusstringIntegration 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".
isWorkspaceConnectedboolean
hasSharedChannelboolean
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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
50340API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: listalertslackchannels