一覧表示¶
POST /api/v1/incidents/list
概要¶
Body リクエストパラメータ¶
| パラメータ名 | 型 | 必須 | 説明 |
|---|---|---|---|
| pageSize | integer | 1ページあたりの返却件数 空を許可: False 例: 10 |
|
| pageIndex | integer | ページ番号 空を許可: False 例: 1 |
|
| timeRange | array | 時間範囲のリスト(ミリ秒単位のタイムスタンプ) 空を許可: False 例: [1765076432000, 1766554821000] |
|
| search | string | 検索キーワード 空を許可: False 例: test |
|
| filters | array | フィルター条件 空を許可: False 例: [{'op': '=', 'field': 'level', 'value': ['system_level_1', 'system_level_0']}] |
|
| incidentsStatus | array | インシデントステータスのフィルターリスト 空を許可: False 例: ['open'] |
|
| level | array | インシデントレベルのフィルターリスト 空を許可: False 例: ['system_level_1', 'system_level_0'] |
|
| assigner | array | インシデント担当者のフィルターリスト(UUID を指定) 空を許可: False 例: ['acnt_xxxx32'] |
|
| tags | array | タグのフィルターリスト(タグ UUID を指定) 空を許可: False 例: ['tag_xxxx32'] |
|
| schedule | array | オンコールスケジュールのリスト(オンコールスケジュール UUID を指定) 空を許可: False 例: ['incsch_xxxx'] |
パラメータ補足説明¶
filters の詳細説明 リストの filter パラメータにおける各クエリ条件は、以下の3つの要素で構成されます:
| パラメータ名 | パラメータ型 | パラメータ説明 |
|---|---|---|
| filters.field | string | フィルター条件のフィールド |
| filters.value | array | フィルター条件の値のリスト |
| filters.op | string | 比較演算子(= 等しい;!= 等しくない) |
filters.field で現在サポートしているフィールド
| パラメータ名 | 説明 |
|---|---|
| tags | タグ |
| incidentsStatus | インシデントステータス ["open", "working", "resolved", "closed"] |
| level | インシデントレベルに対応する UUID |
| assigner | 担当者に対応する UUID |
| schedule | オンコールスケジュールに対応する UUID |
| host | ホスト |
| service | サービス |
| resource | リソース |
| pod_name | Pod 名 |
| app_name | アプリケーション名 |
| env | 環境 |
| url | URL |
filters の例
リクエスト例¶
curl 'https://openapi.guance.com/api/v1/incidents/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"pageSize":10,"pageIndex":1,"filters":[{"op":"=","field":"level","value":["system_level_1","system_level_0"]}]}' \
--compressed
レスポンス¶
{
"code": 200,
"content": {
"data": [
{
"workspaceUUID": "wksp_xxxxx",
"name": "サービス xxxxx の過去10分間におけるログ数に1回の異常急増が発生しました",
"level": "system_level_3",
"description": "xxxxxx",
"source": "internal",
"resourceCategory": "Monitor",
"resourceType": "checker",
"resourceUUID": "",
"resourceUrl": "",
"resourceIdentity": "xxxxxxx",
"assigner": [
"acnt_xxxxxx"
],
"incidentsStatus": "working",
"statusTime": {
"open": 1768926015,
"working": 1768973255
},
"statusChangeTime": 1768973255,
"cumulativeTime": 53474,
"eventCount": 0,
"eventUpdateAt": 1768926015,
"dimensionTag": {
"service": "xxxxxxx"
},
"extend": {},
"dtHost": "",
"dtService": "xxxxxxx",
"dtResource": "",
"dtPodName": "",
"dtAppName": "",
"dtAppId": "",
"dtEnv": "",
"dtUrl": "",
"id": 199,
"uuid": "incident_xxxxxx",
"status": 0,
"creator": "Obsy",
"updator": "acnt_xxxxxx",
"createAt": 1768926000,
"deleteAt": -1,
"updateAt": 1768973256,
"assignerInfo": [
{
"uuid": "acnt_xxxxxx",
"status": 0,
"wsAccountStatus": 0,
"username": "xxxxx",
"name": "xxxx",
"iconUrl": "",
"email": "xxxxx",
"mobile": "",
"acntWsNickname": ""
}
],
"operateRecord": {
"uuid": "incop_xxxx",
"incidentsUUID": "incident_xxxx",
"workspaceUUID": "wksp_xxxx",
"content": "担当者変更: -> xxxx",
"extend": {
"after": [
"acnt_xxxxx"
],
"before": [],
"after_info": [
{
"name": "xxx",
"uuid": "acnt_xxxxx",
"email": "xxxx",
"mobile": "",
"status": 0,
"iconUrl": "",
"username": "xxxx",
"acntWsNickname": "",
"wsAccountStatus": 0
}
],
"before_info": []
},
"operator": "acnt_xxxx",
"operateType": "assigner_update",
"createAt": 1768973255
},
"scheduleInfo": [
{
"workspaceUUID": "wksp_xxxx",
"name": "default",
"timezone": "Asia/Shanghai",
"start": "00:00",
"end": "23:59",
"tagFilter": [],
"dimensionFilter": "",
"notifyTargets": [],
"strategyConfig": [],
"extend": {
"rotationCycle": "day",
"enableRotateNotification": false
},
"isDefault": true,
"rotationUpdateAt": 1768803347,
"id": 6952,
"uuid": "incsch_xxxx",
"status": 0,
"creator": "SYS",
"updator": "acnt_xxxx",
"createAt": 1768803072,
"deleteAt": -1,
"updateAt": 1768803347
}
]
}
],
"pageInfo": {
"pageIndex": 1,
"pageSize": 20,
"count": 1,
"totalCount": 1
}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "xxxxx"
}