List¶
POST /api/v1/incidents/list
Overview¶
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| pageSize | integer | Number of items per page Allow empty: False Example: 10 |
|
| pageIndex | integer | Page number Allow empty: False Example: 1 |
|
| timeRange | array | Time range list (millisecond timestamp) Allow empty: False Example: [1765076432000, 1766554821000] |
|
| search | string | Search keyword Allow empty: False Example: test |
|
| filters | array | Filter conditions Allow empty: False Example: [{'op': '=', 'field': 'level', 'value': ['system_level_1', 'system_level_0']}] |
|
| incidentsStatus | array | Incident status filter list Allow empty: False Example: ['open'] |
|
| level | array | Incident level filter list Allow empty: False Example: ['system_level_1', 'system_level_0'] |
|
| assigner | array | Incident assignee filter list, input UUIDs Allow empty: False Example: ['acnt_xxxx32'] |
|
| tags | array | Tag filter list, input tag UUIDs Allow empty: False Example: ['tag_xxxx32'] |
|
| schedule | array | On-call schedule list, input on-call schedule UUIDs Allow empty: False Example: ['incsch_xxxx'] |
Parameter Details¶
filters Details Each query condition in the list filter parameter is a triple:
| Parameter Name | Parameter Type | Description |
|---|---|---|
| filters.field | string | Filter condition field |
| filters.value | array | Filter condition value list |
| filters.op | string | Comparison operator (= equals; != not equals) |
filters.field Currently Supported Fields
| Parameter Name | Description |
|---|---|
| tags | Tags |
| incidentsStatus | Incident status ["open", "working", "resolved", "closed"] |
| level | Incident level corresponding UUID |
| assigner | Assignee corresponding UUID |
| schedule | On-call schedule corresponding UUID |
| host | Host |
| service | Service |
| resource | Resource |
| pod_name | Pod Name |
| app_name | Application Name |
| env | Environment |
| url | URL |
filters Example
Request Example¶
curl 'https://openapi.truewatch.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
Response¶
{
"code": 200,
"content": {
"data": [
{
"workspaceUUID": "wksp_xxxxx",
"name": "Service xxxxx experienced 1 abnormal surge in log count over the past 10 minutes",
"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": "Assignee changed: -> 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"
}