생성¶
POST /api/v1/incidents/add
개요¶
Body 요청 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| name | string | Y | 인시던트 이름 예시: name 허용 공백: False 최대 길이: 256 |
| description | string | 인시던트 설명 허용 공백: True 예시: description |
|
| level | string | Y | 인시던트 등급에 해당하는 uuid 허용 공백: False 예시: system_level_0 |
| resourceURL | string | 리소스 URL 허용 공백: False 예시: http://xxxxxx |
|
| tags | array | 태그 이름 목록 허용 공백: False 예시: ['aaa', 'bbb'] |
|
| dimensionTag | json | 차원 태그 허용 공백: False 예시: {'host': '127.0.0.1'} |
|
| attachmentUUIDs | array | 첨부 파일 uuid 목록 허용 공백: False 예시: ['attachment_xxxx'] |
|
| extend | json | 추가 확장 정보 허용 공백: False 예시: {} |
매개변수 추가 설명¶
기본 매개변수 설명
| 매개변수명 | 매개변수 유형 | 필수 여부 | 매개변수 설명 |
|---|---|---|---|
| name | string | Y | 인시던트 이름 |
| description | string | N | 인시던트 설명 |
| level | string | Y | 인시던트 등급에 해당하는 uuid |
| resourceURL | string | N | 출처 URL, 상세 정보 표시 시 해당 URL로 이동 가능 |
| tags | array | N | 태그 이름 목록 |
| dimensionTag | json | N | 사용자 정의 차원 태그, 기본값은 {} |
| attachmentUUIDs | array | N | 첨부 파일 uuid 목록 |
| extend | json | N | 추가 확장 정보 |
확장 필드 extend 설명
| 매개변수명 | 매개변수 유형 | 필수 여부 | 매개변수 설명 |
|---|---|---|---|
| linkList | array | N | 링크 추가 |
extend 필드 예시:
요청 예시¶
curl 'https://openapi.guance.com/api/v1/incidents/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"test3","description":"설명","level":"system_level_0","tags":["test"]}'\
--compressed
응답¶
{
"code": 200,
"content": {
"assigner": [],
"createAt": 1768981791,
"creator": "acnt_xxxx",
"cumulativeTime": 0,
"deleteAt": -1,
"description": "설명",
"dimensionTag": {},
"dtAppId": "",
"dtAppName": "",
"dtEnv": "",
"dtHost": "",
"dtPodName": "",
"dtResource": "",
"dtService": "",
"dtUrl": "",
"eventCount": 0,
"eventUpdateAt": 0,
"extend": {},
"id": null,
"incidentsStatus": "open",
"level": "system_level_0",
"name": "test3",
"resourceCategory": "",
"resourceContent": {},
"resourceIdentity": "",
"resourceType": "",
"resourceUUID": "",
"resourceUrl": "",
"source": "external",
"status": 0,
"statusChangeTime": 1768981791,
"statusTime": {
"open": 1768981791
},
"tagInfo": [
{
"id": "tag_xxx",
"name": "test",
"uuid": "tag_xxxx"
}
],
"updateAt": -1,
"updator": "",
"uuid": "incident_xxxx",
"workspaceUUID": "wksp_xxx"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "xxxxx"
}