プロジェクトの通知テンプレートの作成
post
/api/v2/projects/{id}/notification_templates_success/
次の通知テンプレート・フィールドを指定してこのリソースに対してPOSTリクエストを行って、このプロジェクトに関連付けられた新しい通知テンプレートを作成します。
name: この通知テンプレートの名前。(文字列、必須)description: この通知テンプレートのオプションの説明。(文字列、デフォルト="")organization: (id、必須)notification_type: (選択、必須)email: 電子メールgrafana: Grafanairc: IRCmattermost: Mattermostpagerduty: Pagerdutyrocketchat: Rocket.Chatslack: Slacktwilio: Twiliowebhook: Webフック
notification_configuration: (json、デフォルト={})messages: 通知テンプレートのオプションのカスタム・メッセージ。(json、デフォルト={'started': None, 'success': None, 'error': None, 'workflow_approval': None})
プロジェクトの通知テンプレートの追加:
このプロジェクトに既存の通知テンプレートを関連付けるには、idフィールドのみを指定してこのリソースに対してPOSTリクエストを行います。
このプロジェクトからの通知テンプレートの除去:
idおよびdisassociateフィールドを指定してこのリソースに対してPOSTリクエストを行うと、通知テンプレートは削除されずに、このプロジェクトから通知テンプレートが除去されます。
リクエスト
サポートされているメディア・タイプ
- application/json
パス・パラメータ
ルート・スキーマ : NotificationTemplate
型:
ソースを表示
object- created: string
タイトル:
Created読取り専用:true - description: string
タイトル:
Description - id: integer
タイトル:
ID読取り専用:true - messages: object Messages
タイトル:
Messages通知テンプレートのオプションのカスタム・メッセージ。 - modified: string
タイトル:
Modified読取り専用:true - name(required): string
タイトル:
Name最小長:1最大長:512 - notification_configuration: object Notification configuration
タイトル:
Notification configuration - notification_type(required): string
タイトル:
Notification type指定できる値:[ "email", "grafana", "irc", "mattermost", "pagerduty", "rocketchat", "slack", "twilio", "webhook" ] - organization(required): integer
タイトル:
Organization - related: string
- summary_fields: string
タイトル:
Summary fields読取り専用:true - type: string
タイトル:
Type読取り専用:true - url: string
タイトル:
Url読取り専用:true
ネストされたスキーマ : メッセージ
型:
objectタイトル:
Messages通知テンプレートのオプションのカスタム・メッセージ。
デフォルト値:
{ }ネストされたスキーマ : 通知構成
型:
objectタイトル:
Notification configurationレスポンス
サポートされているメディア・タイプ
- application/json
201レスポンス
ルート・スキーマ : NotificationTemplate
型:
ソースを表示
object- created: string
タイトル:
Created読取り専用:true - description: string
タイトル:
Description - id: integer
タイトル:
ID読取り専用:true - messages: object Messages
タイトル:
Messages通知テンプレートのオプションのカスタム・メッセージ。 - modified: string
タイトル:
Modified読取り専用:true - name(required): string
タイトル:
Name最小長:1最大長:512 - notification_configuration: object Notification configuration
タイトル:
Notification configuration - notification_type(required): string
タイトル:
Notification type指定できる値:[ "email", "grafana", "irc", "mattermost", "pagerduty", "rocketchat", "slack", "twilio", "webhook" ] - organization(required): integer
タイトル:
Organization - related: string
- summary_fields: string
タイトル:
Summary fields読取り専用:true - type: string
タイトル:
Type読取り専用:true - url: string
タイトル:
Url読取り専用:true
ネストされたスキーマ : メッセージ
型:
objectタイトル:
Messages通知テンプレートのオプションのカスタム・メッセージ。
デフォルト値:
{ }ネストされたスキーマ : 通知構成
型:
objectタイトル:
Notification configuration