監視ツールとの連携 API リファレンス
REST API を使って、外部の監視ツールとの連携をプログラムから作成できます。
連携を作成する
エンドポイント:
POST /v3/integrations
ボディのパラメーター
| フィールド | 型 | 説明 |
|---|---|---|
pageId | string | ステータスページの ID |
integrationType | string | 連携の種類。例: PINGDOM、NEWRELIC |
components | string[] | 紐づけるコンポーネントの ID |
リクエストの例
{"pageId": "page123","integrationType": "PINGDOM","components": ["component1", "component2"]}
レスポンスの例
{"integration": {"id": "int_abc","monitoringTool": "PINGDOM"},"message": "Integration created successfully."}
このエンドポイントは、MonitoringTool の enum に定義されているすべての監視ツールを受け付けます。
連携を更新する
エンドポイント:
PUT /v3/integrations/:integration_id
作成用エンドポイントのフィールドを任意に送信するか、新しいテンプレートのデータを指定して、インシデントの作成と解決をカスタマイズできます。
リクエストの例
{"label": "Pingdom Primary","createTemplate": { "name": "New incident" },"resolveTemplate": { "name": "Incident resolved" }}
レスポンスの例
{"integration": {"id": "int_abc","label": "Pingdom Primary"}}
連携を削除する
エンドポイント:
DELETE /v3/integrations/:integration_id
レスポンスの例
{}