Returns every alert channel -- an email (via Database Mail or SMTP) or a webhook (Slack, Teams, or a generic URL) that an alert rule can notify. One flat response shape covers every kind; fields that don't apply to a channel's kind are simply null. A webhook URL is never included here -- channels are write-only for secrets, same as credentials; see Test an Alert Channel for the one place a channel's own webhook URL can be read back.

There's also a small catalog endpoint for populating a channel-editor UI with the known webhook app types and SMTP provider presets, rather than hardcoding them in your own tool.

Having trouble reaching the API, or logging in from another machine? See Network Access & Authentication Security -- by default the Api only answers localhost, and PowerShell needs an extra flag once it does answer elsewhere.

Order of Operations

  1. Authenticate to the API.
  2. Request the list (and, if building a picker, the catalog).

The calls

GET /api/alert-channels
GET /api/alert-channels/catalog

No route parameters, no query parameters, no request body for either.

Permission needed: Credential.View for both.

C# example

var jsonOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web);

// Step 1: Authenticate to the API.
using var handler = new HttpClientHandler { UseDefaultCredentials = true };
using var client = new HttpClient(handler) { BaseAddress = new Uri("http://your-minion-agent-server:5443") };
client.DefaultRequestHeaders.Add("X-App-Name", "MyIntegration");

// Step 2: Request the list.
var channels = await client.GetFromJsonAsync<AlertChannelSummary[]>("/api/alert-channels", jsonOptions);
foreach (var ch in channels!)
    Console.WriteLine($"{ch.AlertChannelId}: {ch.ChannelName} ({ch.AlertChannelKindName}), active = {ch.IsActive}");

// Optional: the picker catalog (webhook app types, SMTP provider presets).
var catalog = await client.GetFromJsonAsync<AlertChannelCatalogResponse>("/api/alert-channels/catalog", jsonOptions);
foreach (var app in catalog!.WebhookApps)
    Console.WriteLine($"webhook app {app.WebhookAppCode}: {app.WebhookAppName}");

record AlertChannelSummary(int AlertChannelId, string ChannelName, byte AlertChannelKindCode, string AlertChannelKindName, bool IsActive,
    byte? WebhookAppCode, string? WebhookAppName, string? ToAddresses, string? DbMailProfileName,
    byte? SmtpProviderCode, string? SmtpProviderName, string? SmtpHost, int? SmtpPort, bool? SmtpUseStartTls,
    string? SmtpFromAddress, string? SmtpFromDisplayName, int? SmtpCredentialId, string? SmtpCredentialName);
record WebhookAppOption(byte WebhookAppCode, string WebhookAppName, string? UrlPlaceholder, string? HelpText);
record SmtpProviderOption(byte SmtpProviderCode, string SmtpProviderName, string? DefaultHost, int? DefaultPort, bool? DefaultUseStartTls, string? Notes);
record AlertChannelCatalogResponse(WebhookAppOption[] WebhookApps, SmtpProviderOption[] SmtpProviders);

Not on a domain machine? Swap in the app-account login from Calling the API From Your Own Code.

PowerShell example

# Step 1: Authenticate to the API.
$headers = @{ "X-App-Name" = "MyIntegration" }

# Step 2: Request the list. (-AllowUnencryptedAuthentication: PowerShell requires this for Windows auth over plain http to anything but localhost -- see "Network Access & Authentication Security".)
$channels = Invoke-RestMethod -Uri "http://your-minion-agent-server:5443/api/alert-channels" -UseDefaultCredentials -AllowUnencryptedAuthentication -Headers $headers
$channels | ForEach-Object { "$($_.alertChannelId): $($_.channelName) ($($_.alertChannelKindName)), active = $($_.isActive)" }

# Optional: the picker catalog.
$catalog = Invoke-RestMethod -Uri "http://your-minion-agent-server:5443/api/alert-channels/catalog" -UseDefaultCredentials -AllowUnencryptedAuthentication -Headers $headers
$catalog.webhookApps | ForEach-Object { "webhook app $($_.webhookAppCode): $($_.webhookAppName)" }

What you get back

GET /api/alert-channels -- 200 OK, an array:

[
    { "alertChannelId": 2, "channelName": "DBA Team Email", "alertChannelKindCode": 1, "alertChannelKindName": "EmailSmtp", "isActive": true,
      "webhookAppCode": null, "webhookAppName": null, "toAddresses": "dba-team@example.com", "dbMailProfileName": null,
      "smtpProviderCode": 1, "smtpProviderName": "Office 365", "smtpHost": "smtp.office365.com", "smtpPort": 587, "smtpUseStartTls": true,
      "smtpFromAddress": "alerts@example.com", "smtpFromDisplayName": "Minion Agent", "smtpCredentialId": 9, "smtpCredentialName": "SMTP Relay Account" }
]

alertChannelKindName is one of Webhook, EmailDbMail, or EmailSmtp.

GET /api/alert-channels/catalog -- 200 OK:

{
    "webhookApps": [ { "webhookAppCode": 1, "webhookAppName": "Slack", "urlPlaceholder": "https://hooks.slack.com/services/...", "helpText": "Create an Incoming Webhook in Slack and paste its URL here." } ],
    "smtpProviders": [ { "smtpProviderCode": 1, "smtpProviderName": "Office 365", "defaultHost": "smtp.office365.com", "defaultPort": 587, "defaultUseStartTls": true, "notes": null } ]
}

Codes this call can return

See API Response Codes for what each one means in general. For these calls:

  • 200 -- the list or catalog, even if empty.
  • 403 -- you don't have Credential.View.

Neither call is audited (both are reads).

See also: Create an Alert Channel, Delete / Reassign an Alert Channel, Test an Alert Channel, Manage Alert Rules.