Skip to content
Pre-release. HostCraft is in testing and not yet for sale. These docs describe the current build and may change. Join the waitlist to hear when it launches.

Notification API

Source: daemon/proto/hostcraft/v1/notification.proto

NotificationService is the in-panel notification centre and the admin alert channels. REST: /api/v1/notifications.

Method REST route Permission Streaming
ListNotifications GET /api/v1/notifications NotificationRead unary
MarkNotificationRead POST /api/v1/notifications/read NotificationUpdate unary
GetNotificationSettings GET /api/v1/notifications/settings SystemAdmin unary
UpdateNotificationSettings PATCH /api/v1/notifications/settings SystemAdmin unary
SendTestNotification POST /api/v1/notifications/test SystemAdmin unary
GetSMTPSettings GET /api/v1/notifications/smtp SystemAdmin unary
UpdateSMTPSettings PUT /api/v1/notifications/smtp SystemAdmin unary
ClearSMTPSettings DELETE /api/v1/notifications/smtp SystemAdmin unary
SendTestEmail POST /api/v1/notifications/smtp/test SystemAdmin unary

/hostcraft.v1.NotificationService/ListNotifications

MarkNotificationRead marks one notification read, or all of them when id is empty.

/hostcraft.v1.NotificationService/MarkNotificationRead

/hostcraft.v1.NotificationService/GetNotificationSettings

/hostcraft.v1.NotificationService/UpdateNotificationSettings

/hostcraft.v1.NotificationService/SendTestNotification

Outbound email transport: the panel saved SMTP relay overrides the notify.smtp_* values in config.yaml; with neither, mail goes through the local postfix sendmail. The password is never returned.

/hostcraft.v1.NotificationService/GetSMTPSettings

/hostcraft.v1.NotificationService/UpdateSMTPSettings

/hostcraft.v1.NotificationService/ClearSMTPSettings

Sends a test email synchronously, through the active transport or an unsaved draft relay, and returns the delivery error.

/hostcraft.v1.NotificationService/SendTestEmail

No fields.

Empty is returned by RPCs whose REST route answers with an empty object or 204 No Content.

No fields.

No fields.

No fields.

Field Type Number Description
limit int64 1 -
unread bool 2 -
Field Type Number Description
notifications repeated Notification 1 -
unread int64 2 -
Field Type Number Description
id string 1 -
Field Type Number Description
id string 1 -
account_id string 2 -
severity string 3 -
category string 4 -
subject string 5 -
body string 6 -
link string 7 -
created_at google.protobuf.Timestamp 8 -
read bool 9 -
Field Type Number Description
alert_email string 1 -
email_account_owners bool 2 -
webhook_url string 3 -
webhook_secret string 4 -
smtp_configured bool 5 -

SMTPStatus describes the active outbound email transport. source is panel, config, sendmail or none.

Field Type Number Description
source string 1 -
host string 2 -
port int64 3 -
username string 4 -
from string 5 -
use_tls bool 6 -
password_set bool 7 -
sendmail_available bool 8 -
config_smtp bool 9 -

SMTPUpdate is a relay to save or test. An empty password with keep_password reuses the stored one for the same host.

Field Type Number Description
host string 1 -
port int64 2 -
username string 3 -
password string 4 -
from string 5 -
use_tls bool 6 -
keep_password bool 7 -
Field Type Number Description
to string 1 -
draft SMTPUpdate 2 -

No fields.

Field Type Number Description
alert_email optional string 1 -
email_account_owners optional bool 2 -
webhook_url optional string 3 -
rotate_webhook_secret bool 4 -