mirror of
https://github.com/coder/coder.git
synced 2026-06-03 21:18:24 +00:00
eec6c8c120
## Description Adds support for sending an ad‑hoc custom notification to the authenticated user via API and CLI. This is useful for surfacing the result of scripts or long‑running tasks. Notifications are delivered through the configured method and the dashboard Inbox, respecting existing preferences and delivery settings. ## Changes * New notification template: “Custom Notification” with a label for a custom title and a custom message. * New API endpoint: `POST /api/v2/notifications/custom` to send a custom notification to the requesting user. * New API endpoint: `GET /notifications/templates/custom` to get custom notification template. * New CLI subcommand: `coder notifications custom <title> <message>` to send a custom notification to the requesting user. * Documentation updates: Add a “Custom notifications” section under Administration > Monitoring > Notifications, including instructions on sending custom notifications and examples of when to use them. Closes: https://github.com/coder/coder/issues/19611
49 lines
1.4 KiB
Markdown
Generated
49 lines
1.4 KiB
Markdown
Generated
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
|
# notifications
|
|
|
|
Manage Coder notifications
|
|
|
|
Aliases:
|
|
|
|
* notification
|
|
|
|
## Usage
|
|
|
|
```console
|
|
coder notifications
|
|
```
|
|
|
|
## Description
|
|
|
|
```console
|
|
Administrators can use these commands to change notification settings.
|
|
- Pause Coder notifications. Administrators can temporarily stop notifiers from
|
|
dispatching messages in case of the target outage (for example: unavailable SMTP
|
|
server or Webhook not responding):
|
|
|
|
$ coder notifications pause
|
|
|
|
- Resume Coder notifications:
|
|
|
|
$ coder notifications resume
|
|
|
|
- Send a test notification. Administrators can use this to verify the notification
|
|
target settings:
|
|
|
|
$ coder notifications test
|
|
|
|
- Send a custom notification to the requesting user. Sending notifications
|
|
targeting other users or groups is currently not supported:
|
|
|
|
$ coder notifications custom "Custom Title" "Custom Message"
|
|
```
|
|
|
|
## Subcommands
|
|
|
|
| Name | Purpose |
|
|
|--------------------------------------------------|----------------------------|
|
|
| [<code>pause</code>](./notifications_pause.md) | Pause notifications |
|
|
| [<code>resume</code>](./notifications_resume.md) | Resume notifications |
|
|
| [<code>test</code>](./notifications_test.md) | Send a test notification |
|
|
| [<code>custom</code>](./notifications_custom.md) | Send a custom notification |
|