생성¶
POST /api/v1/tag/create
개요¶
태그 생성
Body 요청 파라미터¶
| 파라미터명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| name | string | Y | 태그 이름 빈 값 허용: False 최대 길이: 50 |
| description | string | 태그 설명 빈 값 허용: False 최대 길이: 100 |
|
| colour | string | 태그 색상 빈 값 허용: False 최대 길이: 50 |
파라미터 추가 설명¶
데이터 설명
- 요청 파라미터 설명
| 파라미터명 | type | 설명 |
|---|---|---|
| name | string | 태그 이름 |
| description | string | 필드 설명 정보 |
| color | string | 프론트엔드와 백엔드 간에 약속된 색상 유형, default, style_key1, style_key2 ~~ |
- 색상 color 필드 유형별 색상 대조:
{ "default": {"background": "#CCE6FF", "color": "rgba(0,0,0,0.8)"}, "style_key1": {"background": "#3333FE", "color": "#FFFFFF"}, "style_key2": {"background": "#428BCA", "color": "#FFFFFF"}, "style_key3": {"background": "#364450", "color": "#FFFFFF"}, "style_key4": {"background": "#E0E1FF", "color": "rgba(0,0,0,0.8)"}, "style_key5": {"background": "#9400D3", "color": "#FFFFFF"}, "style_key6": {"background": "#EDDBFF", "color": "rgba(0,0,0,0.8)"}, "style_key7": {"background": "#CC328B", "color": "#FFF"}, "style_key8": {"background": "#FCDEF0", "color": "rgba(0,0,0,0.8)"}, "style_key9": {"background": "#DC143D", "color": "#FFFFFF"}, "style_key10": {"background": "#FCBABA", "color": "rgba(0,0,0,0.8)"}, "style_key11": {"background": "#BD0B48", "color": "#FFFFFF"}, "style_key12": {"background": "#FDECD2", "color": "rgba(0,0,0,0.8)"}, "style_key13": {"background": "#FFC29C", "color": "rgba(0,0,0,0.8)"}, "style_key14": {"background": "#ED9120", "color": "#FFFFFF"}, "style_key15": {"background": "#CD5B44", "color": "#FFFFFF"}, "style_key16": {"background": "#FAF570", "color": "rgba(0,0,0,0.8)"}, "style_key17": {"background": "#C29953", "color": "#FFFFFF"}, "style_key18": {"background": "#02B140", "color": "#FFFFFF"}, "style_key19": {"background": "#D5F4D5", "color": "rgba(0,0,0,0.8)"}, "style_key20": {"background": "#009966", "color": "#FFFFFF"}, "style_key21": {"background": "#023220", "color": "#FFFFFF"}, "style_key22": {"background": "#E7E7E7", "color": "rgba(0,0,0,0.8)"}, "style_key23": {"background": "#808080", "color": "#FFFFFF"} }
요청 예시¶
curl 'https://openapi.guance.com/api/v1/tag/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: zh' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"test_1","description":"temp_test","colour":"style_key3"}' \
--compressed
응답¶
{
"code": 200,
"content": {
"colour": "style_key3",
"createAt": 1698754975,
"creator": "xxxx",
"deleteAt": -1,
"description": "temp_test",
"id": 358,
"name": "test_1",
"status": 0,
"updateAt": 1698754975,
"updator": "xxx",
"uuid": "tag_xxxx32",
"workspaceUUID": "wksp_xxxx32"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-DEC68DA3-9AFB-4B56-A57D-530A2B67AFED"
}