取得¶
GET /api/v1/issue/notification_policy/{issue_notification_policy_uuid}/get
概要¶
1 件の通知ポリシーと、それに関連するスケジュール、チャンネル、作成者/更新者情報を取得します。
呼び出し前の準備と使用手順¶
通知ポリシー一覧 からポリシー UUID をコピーしてパスに指定し、extend 内の各通知タイプとエスカレーション設定を読み取ります。変更前に、name、notificationScheduleUUIDs、および extend の対象となる完全な値を保存してください。スケジュール UUID は relNotificationScheduleInfos[].uuid から取得します。詳細のスケジュールは元のエンティティ設定であり、一覧にある effectiveTimeInfos は付加されません。ポリシーはコンソールで対象チャンネルに関連付け、有効な通知スケジュールを関連付ける必要があります。実際の受信者は、スケジュールのタイムゾーン、当日の時間帯、有効期間、ローテーション、通知先によって決まります。ポリシーの保存自体では、テスト通知はすぐに送信されません。
パスパラメータ¶
| パラメータ名 | 型 | 必須 | 説明 |
|---|---|---|---|
| issue_notification_policy_uuid | string | Y | このワークスペースの通知ポリシー UUID です。スケジュール UUID ではありません。 例: inpy_example取得または入力方法: 通知ポリシー一覧 の content.data[].uuid、または作成レスポンスの content.uuid から取得します。 |
リクエストヘッダー¶
| パラメータ名 | 型 | 必須 | 説明 |
|---|---|---|---|
| DF-API-KEY | string | Y | ワークスペースの OpenAPI 認証情報です。 例: <DF-API-KEY>取得または入力方法: 対象ワークスペースの API Key 管理から、この操作権限を持つ OpenAPI Key を取得します。 |
パラメータ補足¶
エスカレーションルールがトリガーされるかどうかは、Issue の作成時刻、現在のステータス、担当者、関連イベント数、定期タスク、およびスケジュールの有効な通知先にも依存します。保存された JSON だけに基づいてメッセージが送信済みと判断することはできません。
リクエスト例¶
curl --get 'https://openapi.guance.com/api/v1/issue/notification_policy/inpy_example/get' \
-H 'DF-API-KEY: <DF-API-KEY>'
レスポンス¶
HTTP 200、application/json。以下の例は、直接読み取れる主要フィールドを示しています。
| フィールド | 型 | 説明 |
|---|---|---|
| content.id | integer | 保存済みポリシーのレコード番号。操作には UUID を使用します。 |
| content.uuid | string | 通知ポリシー UUID。inpy_ で始まります。 |
| content.workspaceUUID | string | 所属ワークスペース UUID。 |
| content.name | string | ポリシー名。 |
| content.status | integer | レコードステータス。0 は有効、2 は無効、3 は削除。一覧には未削除の有効および無効ポリシーが含まれます。 |
| content.creator | string | 作成した呼び出し元。 |
| content.updator | string | 最終更新者。未更新の場合は空文字列。 |
| content.createAt | integer | 作成時刻(Unix 秒)。 |
| content.updateAt | integer | 更新時刻(Unix 秒)。未更新の場合は -1。 |
| content.deleteAt | integer | 削除時刻(Unix 秒)。未削除の場合は -1。 |
| content.extend | object | 保存された通知範囲とエスカレーションルール。{} の場合があります。 |
| content.extend.notifyTypes | array<string> |
有効なアクションタイプ。 |
| content.extend.notifyTypes[] | string | 単一のアクションタイプ。具体的な動作はパラメータ表を参照してください。 |
| content.extend.upgradeCfg | object | トリガータイプ別に保存されたルール。 |
| content.extend.upgradeCfg.noManager | object | Issue 作成時に有効な担当者がおらず、担当者なし候補に入り、ステータスが Open/Working/Pending の場合、Issue 作成時から待機します。既存 Issue では担当者を削除しただけでは候補に再登録される保証はありません。60 の倍数の正の整数秒を入力してください。有効なタイプは issueUpgrade.noManager です。未設定の場合は省略されます。 |
| content.extend.upgradeCfg.noManager.duration | integer | 初回待機秒数。 |
| content.extend.upgradeCfg.noManager.notifyType | string | once または cycle。この値が保存されていない場合は once として扱います。 |
| content.extend.upgradeCfg.noManager.cycleDuration | integer | ループ間隔(秒)。cycle モードで使用します。 |
| content.extend.upgradeCfg.noManager.cycleTimes | integer | ループトリガーの総回数上限。1~30(初回を含む)。 |
| content.extend.upgradeCfg.processTimeout | object | Issue が Open/Working の継続未完了時間。初回は作成時から計時します。Pending/Resolved/Closed から処理中ステータスに再び入った場合は、再進入後のステータス記録から計時します。有効なタイプは issueUpgrade.processTimeout です。未設定の場合は省略されます。 |
| content.extend.upgradeCfg.processTimeout.duration | integer | 初回待機秒数。 |
| content.extend.upgradeCfg.processTimeout.notifyType | string | once または cycle。この値が保存されていない場合は once として扱います。 |
| content.extend.upgradeCfg.processTimeout.cycleDuration | integer | ループ間隔(秒)。cycle モードで使用します。 |
| content.extend.upgradeCfg.processTimeout.cycleTimes | integer | ループトリガーの総回数上限。1~30(初回を含む)。 |
| content.extend.upgradeCfg.openProcessTimeout | object | Issue が Open のままの場合のみ有効です。最後のステータス変更時刻から計時します。ステータス記録がない場合は作成時刻から計時します。有効なタイプは issueUpgrade.processTimeout です。未設定の場合は省略されます。 |
| content.extend.upgradeCfg.openProcessTimeout.duration | integer | 初回待機秒数。 |
| content.extend.upgradeCfg.openProcessTimeout.notifyType | string | once または cycle。この値が保存されていない場合は once として扱います。 |
| content.extend.upgradeCfg.openProcessTimeout.cycleDuration | integer | ループ間隔(秒)。cycle モードで使用します。 |
| content.extend.upgradeCfg.openProcessTimeout.cycleTimes | integer | ループトリガーの総回数上限。1~30(初回を含む)。 |
| content.extend.upgradeCfg.eventStorm | object | Issue に記録された eventCount が exceedTimes を厳密に超えた後にトリガーされます。Open/Working ステータスに限定されず、完了済みの Issue も数量条件を満たす場合があります。有効なタイプは issueUpgrade.eventStorm です。未設定の場合は省略されます。 |
| content.extend.upgradeCfg.eventStorm.exceedTimes | integer | 数量しきい値。eventCount が厳密に超過した場合にのみトリガーされます。 |
| content.extend.upgradeCfg.eventStorm.notifyType | string | once または cycle。この値が保存されていない場合は once として扱います。 |
| content.extend.upgradeCfg.eventStorm.cycleDuration | integer | ループ間隔(秒)。cycle モードで使用します。 |
| content.extend.upgradeCfg.eventStorm.cycleTimes | integer | ループトリガーの総回数上限。1~30(初回を含む)。 |
| content.extend.その他のフィールド | JSON | 保存元のその他の拡張フィールド。すべてが通知動作を制御できるわけではありません。 |
| content.relNotificationScheduleInfos | array<object> |
関連付けられた有効なスケジュールオブジェクト。一覧には書式設定された有効期間も含まれますが、詳細は元のスケジュール設定のみです。 |
| content.relNotificationScheduleInfos[].id | integer | データベースレコード番号。スケジュールの操作には UUID を使用します。 |
| content.relNotificationScheduleInfos[].uuid | string | スケジュール UUID。照会、変更、削除、および通知ポリシーからの参照に使用します。 |
| content.relNotificationScheduleInfos[].workspaceUUID | string | 所属ワークスペース UUID。 |
| content.relNotificationScheduleInfos[].name | string | スケジュール名。 |
| content.relNotificationScheduleInfos[].timezone | string | このスケジュールが当日の時間帯と有効日を解釈するために使用する IANA タイムゾーン。 |
| content.relNotificationScheduleInfos[].start | string | 当日の開始時刻 HH:MM。 |
| content.relNotificationScheduleInfos[].end | string | 当日の終了時刻 HH:MM。終了分の最後の秒まで有効です。 |
| content.relNotificationScheduleInfos[].notifyTargets | array<string> |
順序どおりに保存されたメンバー、通知先 UUID、またはメールアドレス。 |
| content.relNotificationScheduleInfos[].notifyTargets[] | string | acnt_ アカウント、notify_ 通知先、またはメールアドレス文字列。 |
| content.relNotificationScheduleInfos[].extend | object | 拡張設定。未設定の場合は {} になります。 |
| content.relNotificationScheduleInfos[].extend.enableRotateNotification | boolean | ローテーションを有効にするかどうか。省略時は false として扱います。 |
| content.relNotificationScheduleInfos[].extend.rotationCycle | string | ローテーション有効時の周期。day は日次、week は月曜日基準、month は暦月、workDay は平日のみ日次、weekend は週末のみ日次です。祝日は認識しません。未設定の場合は省略できます。 |
| content.relNotificationScheduleInfos[].extend.effectiveTime | object | 全体の有効期間。未設定の場合は省略できます。 |
| content.relNotificationScheduleInfos[].extend.effectiveTime.start | integer | 有効期間の開始 Unix 秒。0 または省略時は制限なし。 |
| content.relNotificationScheduleInfos[].extend.effectiveTime.end | integer | 有効期間の終了 Unix 秒。0 または省略時は制限なし。 |
| content.relNotificationScheduleInfos[].rotationUpdateAt | integer | ローテーション計算の開始時刻(Unix 秒)。ローテーション関連設定の変更時にリセットされます。 |
| content.relNotificationScheduleInfos[].status | integer | レコードステータス。アクティブなレコードは 0 です。 |
| content.relNotificationScheduleInfos[].creator | string | 作成した呼び出し元。 |
| content.relNotificationScheduleInfos[].updator | string | 最終更新者。未更新の場合は空文字列。 |
| content.relNotificationScheduleInfos[].createAt | integer | 作成時刻(Unix 秒)。 |
| content.relNotificationScheduleInfos[].updateAt | integer | 更新時刻(Unix 秒)。未更新の場合は -1。 |
| content.relNotificationScheduleInfos[].deleteAt | integer | 削除時刻(Unix 秒)。未削除の場合は -1。 |
| content.relChannelInfos | array<object> |
このポリシーを参照するチャンネルオブジェクト。 |
| content.relChannelInfos[].id | integer | チャンネルレコード番号。 |
| content.relChannelInfos[].uuid | string | チャンネル UUID。変更、削除、または購読に使用します。 |
| content.relChannelInfos[].workspaceUUID | string | チャンネルが属するワークスペース。 |
| content.relChannelInfos[].name | string | チャンネル名。default はデフォルトチャンネルを表します。 |
| content.relChannelInfos[].description | string | チャンネルの説明。 |
| content.relChannelInfos[].notifyTarget | array<string> |
このチャンネルに直接設定された通知先 UUID。 |
| content.relChannelInfos[].notifyTarget[] | string | 単一の通知先 UUID。 |
| content.relChannelInfos[].notifyUpgradeCfg | object | エスカレーション通知設定。未設定の場合は空オブジェクト。 |
| content.relChannelInfos[].notifyUpgradeCfg.triggerTime | integer | エスカレーション通知をトリガーする待機時間(秒)。 |
| content.relChannelInfos[].notifyUpgradeCfg.notifyTarget | array<string> |
エスカレーション通知先 UUID のリスト。 |
| content.relChannelInfos[].notifyUpgradeCfg.notifyTarget[] | string | エスカレーション通知先 UUID。 |
| content.relChannelInfos[].status | integer | レコードステータス。正常な場合は 0。 |
| content.relChannelInfos[].creator | string | 作成した呼び出し元。 |
| content.relChannelInfos[].updator | string | 最終更新者。未更新の場合は空文字列になることがあります。 |
| content.relChannelInfos[].createAt | integer | 作成時刻(Unix 秒)。 |
| content.relChannelInfos[].updateAt | integer | 更新時刻(Unix 秒)。未更新の場合は -1。 |
| content.relChannelInfos[].deleteAt | integer | 削除時刻(Unix 秒)。未削除の場合は -1。 |
| content.creatorInfo | object | 作成者/更新者の解決可能なアカウント情報。API Key は自然人メンバーではないため、一覧では null が返される場合があり、詳細では空オブジェクトになる場合があります。以下のフィールドは主体に応じて任意です。 |
| content.creatorInfo.uuid | string | アカウント UUID。 |
| content.creatorInfo.status | integer | アカウントのレコードステータス。 |
| content.creatorInfo.wsAccountStatus | integer | ワークスペース内でのアカウントステータス。 |
| content.creatorInfo.username | string | ログイン名。 |
| content.creatorInfo.name | string | 表示名。 |
| content.creatorInfo.iconUrl | string | アバター URL。省略可能。 |
| content.creatorInfo.email | string | メールアドレス、または API Key の識別子。 |
| content.creatorInfo.mobile | string | 携帯電話番号。空の場合があります。 |
| content.creatorInfo.countryCode | string | 国/地域コード。省略可能。 |
| content.creatorInfo.acntWsNickname | string | ワークスペースでのニックネーム。省略可能。 |
| content.updatorInfo | object | 作成者/更新者の解決可能なアカウント情報。API Key は自然人メンバーではないため、一覧では null が返される場合があり、詳細では空オブジェクトになる場合があります。以下のフィールドは主体に応じて任意です。 |
| content.updatorInfo.uuid | string | アカウント UUID。 |
| content.updatorInfo.status | integer | アカウントのレコードステータス。 |
| content.updatorInfo.wsAccountStatus | integer | ワークスペース内でのアカウントステータス。 |
| content.updatorInfo.username | string | ログイン名。 |
| content.updatorInfo.name | string | 表示名。 |
| content.updatorInfo.iconUrl | string | アバター URL。省略可能。 |
| content.updatorInfo.email | string | メールアドレス、または API Key の識別子。 |
| content.updatorInfo.mobile | string | 携帯電話番号。空の場合があります。 |
| content.updatorInfo.countryCode | string | 国/地域コード。省略可能。 |
| content.updatorInfo.acntWsNickname | string | ワークスペースでのニックネーム。省略可能。 |
| content.declaration | object または null | ワークスペースのパブリック宣言。 |
{
"code": 200,
"content": {
"id": 42,
"uuid": "inpy_example",
"workspaceUUID": "wksp_example",
"name": "生产异常通知",
"extend": {
"notifyTypes": [
"issue.add",
"issue.modify",
"issueReply.add",
"issueUpgrade.noManager",
"issueUpgrade.processTimeout",
"issueUpgrade.eventStorm"
],
"upgradeCfg": {
"noManager": {
"duration": 600,
"notifyType": "once"
},
"processTimeout": {
"duration": 1800,
"notifyType": "cycle",
"cycleDuration": 600,
"cycleTimes": 3
},
"openProcessTimeout": {
"duration": 900,
"notifyType": "once"
},
"eventStorm": {
"exceedTimes": 60,
"notifyType": "once"
}
}
},
"status": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785430800,
"updateAt": -1,
"deleteAt": -1,
"relNotificationScheduleInfos": [],
"relChannelInfos": [],
"creatorInfo": {},
"updatorInfo": {},
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
エラーレスポンス¶
認証、レート制限、および共通リクエストエラーについては、共通エラー定義 を参照してください。
| HTTP ステータス | errorCode | トリガー条件 | メッセージまたはレスポンスの説明 | 対処方法 |
|---|---|---|---|---|
| 404 | ft.ObjectNotExists | ポリシーが存在しない、削除済み、または現在の API Key のワークスペースに属していない | 指定されたオブジェクトが存在しません | 通知ポリシー一覧 からこのワークスペースの UUID を再取得します。 |
| 500 | ft.InternalServerError | ポリシーまたは関連情報の読み取りに失敗 | 内部エラー | 後で再試行してください。失敗が続く場合は traceId を提供してください。 |