콘텐츠로 이동

생성



POST /api/v1/issue/add

개요

Issue를 생성합니다.

Body 요청 매개변수

매개변수명 유형 필수 설명
name string Y 제목
예시: name
빈 값 허용: False
최대 길이: 256
level string Y 등급, 등급 설정의 uuid
예시: level
빈 값 허용: False
빈 문자열 허용: True
description string Y 설명
예시: description
빈 값 허용: False
attachmentUuids array 첨부 파일 업로드 목록 uuid
예시: []
빈 값 허용: True
extend json Y 추가 확장 정보
예시: {}
빈 값 허용: True
resourceType string 출처 유형, 사용 사례가 없으면 전송 불필요
예시: resourceType
빈 값 허용: False
可选值: ['event', 'dashboard', 'viewer']
resourceUUID string 해당 출처의 uuid (각각 docid, dashboardUUID, dashboardUUID)
예시: resourceUuid
빈 값 허용: False
빈 문자열 허용: True
resource string 해당 출처에서 가져온 출처 이름
예시: resource
빈 값 허용: False
빈 문자열 허용: True
channelUUIDs array Issue 전달 추적 채널 uuids
예시: []
빈 값 허용: True

매개변수 추가 설명

기본 매개변수 설명

매개변수명 매개변수 유형 필수 여부 매개변수 설명
name string N Issue 제목
level string N Issue 등급, 설정된 등급 uuid
statusType integer N Issue 상태, 10: Open, 15: Working, 20: Resolved, 25: Closed, 30: Pending
decription string N Issue 설명
attachmentUuids array N 첨부 파일 업로드 목록 uuid, 먼저 /api/v1/attachment/upload API를 통해 업로드 필요
extend json N 확장 필드, 기본값 {}
resourceType string N event: 이벤트, dashboard: 대시보드, viewer: 탐색기 (checker: 모니터, 이 유형은 자동 생성)
resourceUUID string N 리소스와 연결된 uuid
resource string N 해당 리소스 이름
channelUUIDs array N Issue를 전달할 리소스 목록, 기본값은 기본 워크스페이스 기본 채널

level 등급 필드 설명 level은 시스템 등급/사용자 정의 등급으로 구분됩니다 (설정 관리에서 구성 가능)

level value 매개변수 설명
P0 system_level_0 level 매개변수: system_level_0, 시스템 등급 P0 의미
P1 system_level_1 level 매개변수: system_level_1, 시스템 등급 P1 의미
P2 system_level_2 level 매개변수: system_level_2, 시스템 등급 P2 의미
P3 system_level_3 level 매개변수: system_level_3, 시스템 등급 P3 의미
xxx issl_yyyyy level 매개변수: issl_yyyyy, 사용자 정의 등급 xxx 의미

Issue 채널 설명, 모든 Issue는 자동으로 기본 채널(전체)에 분류됨 Issue와 연결된 채널: 기본 채널(전체), channels 및 channelUUIDs

확장 필드 extend 설명

매개변수명 매개변수 유형 필수 여부 매개변수 설명
channels array N 설명 내용의 #: Issue를 전달할 리소스 목록
linkList array N Issue 링크 추가
members array N 설명 내용의 @: Issue 알림을 받을 알림 대상 멤버
manager array N 담당자 정보 (사용자 계정 uuid, 이메일, 팀 uuid)
extra json N Issue 생성자/담당자 이름 등의 정보, 프론트엔드 표시용

extend 필드 예시:

{
    "members": [
        {
            "type": "@",
            "uuid": "acnt_xxxx32",
            "exists": true
        }
    ],
    "channels": [
        {
            "type": "#",
            "uuid": "chan_xxxx32",
            "exists": true
        }
    ],
    "manager": [
        "acnt_xxxx32",
        "xxx@guance.com",
        "group_xxx"
    ],
    "linkList": [
        {
            "name": "해결",
            "link": "https://sd.com",
        }
    ],
    "extra": {
            "creator": {
                "name": "xxx",
                "email": "xxx@guance.com",
            },
            "managerInfos": {
                "xxx@guance.com": {"name": "111"},
                "xxx@guance.com": {"name": "222"}

            }
            }
}

요청 예시

curl 'https://openapi.guance.com/api/v1/issue/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"dcacscsc","level":"system_level_2","description":"<span>cdscascas</span>","extend":{"channels":[{"type":"#","uuid":"chan_xxxx32"}],"view_isuue_url":"/exceptions/exceptionsTracking?leftActiveKey=ExceptionsTracking&activeName=ExceptionsTracking&w=wksp_xxxx32&classic=exceptions_tracing&issueName=SYS&activeChannel=%7BdefaultChannelUUID%7D&sourceType=exceptions_tracing&__docid=%7BissueUUID%7D"},"attachmentUuids":[]}'\
--compressed

응답

{
    "code": 200,
    "content": {
        "createAt": 1686398344,
        "creator": "acnt_xxxx32",
        "creatorInfo": {
            "acntWsNickname": "",
            "email": "xxx@guance.com",
            "iconUrl": "",
            "name": "wanglei-testing",
            "username": "xxx@guance.com"
        },
        "deleteAt": -1,
        "description": "",
        "extend": {
            "channels": [
                {
                    "exists": true,
                    "type": "#",
                    "uuid": "chan_xxxx32"
                }
            ],
            "view_isuue_url": ""
        },
        "id": 47402,
        "level": "system_level_2",
        "name": "dcacscsc",
        "resource": "",
        "resourceType": "",
        "resourceUUID": "",
        "status": 0,
        "statusType": 20,
        "subIdentify": "",
        "updateAt": 1686400483,
        "updator": "acnt_xxxx32",
        "updatorInfo": {
            "acntWsNickname": "",
            "email": "xxx@guance.com",
            "iconUrl": "",
            "name": "wanglei-testing",
            "username": "xxx@guance.com"
        },
        "uuid": "issue_xxxx32",
        "workspaceUUID": "wksp_xxxx32"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "1744405827768254151"
} 

문서 평가

이 페이지가 도움이 되었나요?