> ## Documentation Index > Fetch the complete documentation index at: https://documents.trocco.io/llms.txt > Use this file to discover all available pages before exploring further. # 通知先の更新 > 指定した通知先の情報を更新します。
## OpenAPI ````json PATCH /api/notification_destinations/{type}/{notification_destination_id} { "openapi": "3.0.3", "info": { "title": "trocco APIリファレンス", "description": "trocco APIリファレンス", "version": "0.0.1" }, "servers": [ { "url": "https://trocco.io" } ], "security": [ { "ApiKeyAuth": [] } ], "tags": [ { "name": "users", "description": "ユーザー", "externalDocs": { "url": "https://documents.trocco.io/docs/about-account-user" } }, { "name": "teams", "description": "チーム", "externalDocs": { "url": "https://documents.trocco.io/docs/team" } }, { "name": "connections", "description": "接続情報", "externalDocs": { "url": "https://documents.trocco.io/docs/connection-configurations" } }, { "name": "custom_connectors", "description": "カスタムコネクタ定義" }, { "name": "datamart_definitions", "description": "データマート定義", "externalDocs": { "url": "https://documents.trocco.io/docs/data-mart" } }, { "name": "environment_groups", "description": "環境グループ" }, { "name": "environments", "description": "環境" }, { "name": "jobs", "description": "転送ジョブ", "externalDocs": { "url": "https://documents.trocco.io/docs/etl-configuration" } }, { "name": "pipeline_jobs", "description": "ワークフロージョブ", "externalDocs": { "url": "https://documents.trocco.io/docs/about-workflow" } }, { "name": "resource_groups", "description": "リソースグループ", "externalDocs": { "url": "https://documents.trocco.io/docs/resource-group" } }, { "name": "dbt_git_repositories", "description": "dbt Gitリポジトリ" }, { "name": "dbt_job_definitions", "description": "dbtジョブ設定", "externalDocs": { "url": "https://documents.trocco.io/docs/dbt-job-configuration" } }, { "name": "dbt_jobs", "description": "dbtジョブ", "externalDocs": { "url": "https://documents.trocco.io/docs/dbt-job-configuration" } }, { "name": "notification_destinations", "description": "通知先", "externalDocs": { "url": "https://documents.trocco.io/docs/trocco-tutorial-additional-settings" } } ], "externalDocs": { "description": "trocco APIについて", "url": "https://documents.trocco.io/docs/trocco-api" }, "paths": { "/api/notification_destinations/{type}/{notification_destination_id}": { "patch": { "summary": "通知先の更新", "description": "指定した通知先の情報を更新します。
\n", "operationId": "updateNotificationDestination", "tags": [ "notification_destinations" ], "parameters": [ { "name": "type", "description": "通知先種別(email、slack_channel または http)", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "email", "slack_channel", "http" ] }, "example": "email" }, { "name": "notification_destination_id", "in": "path", "required": true, "description": "通知先(email、slack_channel または http)のIDです。", "schema": { "type": "integer", "format": "int64" }, "example": 1 } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "properties": { "email_config": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "description": "更新するメールアドレス。", "example": "update@example.com" } } } }, "required": [ "email_config" ] }, { "type": "object", "properties": { "slack_channel_config": { "type": "object", "required": [ "channel", "webhook_url" ], "properties": { "channel": { "type": "string", "description": "更新するslack_channelチャンネル名。", "example": "#updated" }, "webhook_url": { "type": "string", "description": "更新するslack_channelのWebhook URL。", "example": "https://hooks.slack.com/services/XXXX/XXXX/XXXX" } } } }, "required": [ "slack_channel_config" ] }, { "type": "object", "properties": { "http_config": { "type": "object", "required": [ "name", "url" ], "description": "HTTP通知先の更新設定です。
\nheaders / query_params を省略した場合は既存の値が維持されます。
\nheaders / query_params を指定した場合は洗い替え(送信されていない既存要素は削除)されます。
\n既存要素を更新する場合は id を指定してください。
\nmasking=true かつ value が空文字の場合、既存の value が保持されます。\n", "properties": { "name": { "type": "string", "description": "更新する通知先の名前。", "example": "My Webhook" }, "url": { "type": "string", "description": "更新するリクエスト先のURL。TROCCOのドメインは指定できません。", "example": "https://example.com/webhook" }, "description": { "type": "string", "description": "更新する通知先の説明。", "example": "Slack Incoming Webhook" }, "headers": { "type": "array", "description": "更新するリクエストヘッダーの一覧。", "items": { "type": "object", "required": [ "key", "value", "masking" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "既存ヘッダーを更新する場合に指定するIDです。", "example": 1 }, "key": { "type": "string", "example": "Authorization" }, "value": { "type": "string", "description": "masking=true かつ空文字の場合は既存値が保持されます。", "example": "Bearer xxxx" }, "masking": { "type": "boolean", "description": "value をレスポンスでマスキングするかどうか。", "example": true } } } }, "query_params": { "type": "array", "description": "更新するクエリパラメータの一覧。", "items": { "type": "object", "required": [ "key", "value", "masking" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "既存クエリパラメータを更新する場合に指定するIDです。", "example": 1 }, "key": { "type": "string", "example": "token" }, "value": { "type": "string", "description": "masking=true かつ空文字の場合は既存値が保持されます。", "example": "xxxx" }, "masking": { "type": "boolean", "description": "value をレスポンスでマスキングするかどうか。", "example": true } } } } } } }, "required": [ "http_config" ] } ] } } } }, "responses": { "200": { "description": "更新後の通知先情報を返します。", "content": { "application/json": { "schema": { "title": "NotificationDestination", "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "通知先のIDです。" }, "type": { "type": "string", "enum": [ "email", "slack_channel", "http" ], "example": "email", "description": "通知先の種類です。" }, "email": { "type": "string", "description": "type=email の場合に設定されるメールアドレスです。", "example": "test@example.com" }, "channel": { "type": "string", "nullable": true, "description": "type=slack_channel の場合に設定されるチャンネル名です。", "example": "#general" }, "name": { "type": "string", "description": "type=http の場合に設定される通知先の名前です。", "example": "My Webhook" }, "url": { "type": "string", "description": "type=http の場合に設定されるリクエスト先のURLです。", "example": "https://example.com/webhook" }, "description": { "type": "string", "nullable": true, "description": "type=http の場合に設定される通知先の説明です。", "example": "Slack Incoming Webhook" }, "headers": { "type": "array", "description": "type=http の場合に設定されるリクエストヘッダーの一覧です(id 昇順)。
\nmasking=true のヘッダーの value は空文字で返却されます。\n", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "ヘッダーのIDです。" }, "key": { "type": "string", "description": "ヘッダー名です。", "example": "Authorization" }, "value": { "type": "string", "description": "ヘッダーの値です。masking=true の場合は空文字が返却されます。", "example": "Bearer xxxx" }, "masking": { "type": "boolean", "description": "value をレスポンスでマスキングするかどうかです。", "example": true } } } }, "query_params": { "type": "array", "description": "type=http の場合に設定されるクエリパラメータの一覧です(id 昇順)。
\nmasking=true のクエリパラメータの value は空文字で返却されます。\n", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "クエリパラメータのIDです。" }, "key": { "type": "string", "description": "クエリパラメータ名です。", "example": "token" }, "value": { "type": "string", "description": "クエリパラメータの値です。masking=true の場合は空文字が返却されます。", "example": "xxxx" }, "masking": { "type": "boolean", "description": "value をレスポンスでマスキングするかどうかです。", "example": true } } } } }, "required": [ "id", "type" ], "example": { "id": 1, "type": "email", "email": "test@example.com" } } } } }, "400": { "description": "不正なリクエストです。" }, "401": { "description": "認証エラーです。API KEYをご確認ください。" }, "404": { "description": "指定した通知先が存在しません。" } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "認証キーとなるAPI KEYをAuthorization: Token {{API KEY}}の形式でヘッダーにセットします。
\nAPI KEYがabc123の場合は、Authorization: Token abc123とします。
\nAPI KEYの作成方法は、TROCCO API KEYの作成を参照ください。\n" } } } } ````