通知先作成
- Print
- PDF
通知先作成
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback!
Post
/api/notification_destinations/{type}
通知先(email または slack_channel)を作成します。
type=email
の場合は email_config.email
を、
type=slack_channel
の場合は slack_channel_config.channel
および slack_channel_config.webhook_url
を指定してください。
Security
API Key
Header parameter nameAuthorization
認証キーとなるAPI KEYをAuthorization: Token {{API KEY}}
の形式でヘッダーにセットします。
API KEYがabc123
の場合は、Authorization: Token abc123
とします。
API KEYの作成方法は、trocco APIについてを参照ください。
Path parameters
type
stringRequired
通知先種別(email または slack_channel)
Valid values[ "email", "slack_channel" ]
Exampleemail
Body parameters
OneOf
object
object
email_config
object Required
email
string Required
Exampletest@example.com
object
object
slack_channel_config
object Required
channel
string Required
Example#general
webhook_url
string Required
Examplehttps://hooks.slack_channel.com/services/XXXX/XXXX/XXXX
Responses
201
作成した通知先の詳細を返します。
object
Example{ "id": 1, "type": "email", "email": "test@example.com" }
id
integer (int64)
通知先のIDです。
type
string
通知先の種類です。
Valid values[ "email", "slack_channel" ]
Exampleemail
email
string
type=email の場合に設定されるメールアドレスです。
Exampletest@example.com
channel
string | null
type=slack_channel の場合に設定されるチャンネル名です。
Example#general
400
不正なリクエストです。
401
API KEYが不正です。
404
指定した通知先が存在しません。
Was this article helpful?