{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Webhook統合の使用","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhook統合の使用","__idx":0},"children":["Webhook統合の使用"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AI Agent Foundryのエージェントを呼び出すには、システムからWebhook APIエンドポイントを呼び出す必要があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"webhook統合のセットアップ","__idx":1},"children":["Webhook統合のセットアップ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/ai-agent-foundry/integration/creating-an-integration#webhook"},"children":["Webhook統合の作成"]},"に従ってWebhook統合をセットアップします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhook統合を使用するには、認証トークンとURLを取得する必要があります。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IntegrationタブのWebhookパネルに移動します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/webhook-step1.7e03d27d29c808378af6ad151e5f1568ac33c560d200faf2b1050f42efce0c35.91c26685.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「eye」アイコンをクリックして認証トークンを表示し、「Basic」で始まるテキストをコピーします。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/webhook-step2.0dd069bf00adfc64f9caad3ad6fb8c01b489c5fb3a08b5575ea9d8b0a6cb328a.91c26685.png","alt":""},"children":[]}," ","3. 「Text Generation URL」の「copy clipboard」アイコンをクリックしてURLをコピーします。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Text Generation URLは、Webhook統合でセットアップされた各ユーザープロンプトに対して発行されます"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"webhook-urlの呼び出し","__idx":2},"children":["Webhook URLの呼び出し"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クライアントアプリケーションは、ユーザープロンプトで定義したパラメータを使用してPOSTでURLを呼び出す必要があります。「application/json」コンテンツタイプを指定すると、結果オブジェクトを取得できます。以下のコードは、CURLで呼び出す例です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"sample.sh","header":{"title":"sample.sh","controls":{"copy":{}}},"source":"curl -X POST {Text Generation URL} \\\n-H \"Authorization: {Authentication Token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\"text\": \"Please calc the percentage of the total number of users who purchased with in recent 2 weeks\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この例では、ユーザープロンプトの「User side prompt text」フィールドにパラメータとして「text」が含まれていることを前提としています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/webhook-step3.fa558e5fe814cce00eb4f0c9b952ee682670d74a31b40e92d146acf3f4459fbc.91c26685.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"chatの継続","__idx":3},"children":["Chatの継続"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クライアントアプリケーションは、チャット初期化時の戻り値として受け取ったchat idを利用して、当該chat idの会話を継続することができます。chat idはレスポンスヘッダに ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-chat-id"]}," として返却されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"sample.sh","header":{"title":"sample.sh","controls":{"copy":{}}},"source":"curl -X POST POST {Text Generation URL} \\\n-H \"Authorization: {Authentication Token}\" \\\n-H \"Content-Type: application/json\" \\\n-H \"X-CONTINUE-CHAT-ID: {x-chat-id}\" \\\n-d '{\"text\": \"Please calc the ratio of customers....\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クライアントアプリケーションは複数回チャットを継続することができます。"]}]},"headings":[{"value":"Webhook統合の使用","id":"webhook統合の使用","depth":1},{"value":"Webhook統合のセットアップ","id":"webhook統合のセットアップ","depth":2},{"value":"Webhook URLの呼び出し","id":"webhook-urlの呼び出し","depth":2},{"value":"Chatの継続","id":"chatの継続","depth":2}],"frontmatter":{"seo":{"title":"Webhook統合の使用"}},"lastModified":"2026-01-20T12:58:52.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/ai-agent-foundry/integration/using-a-webhook-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}