용어 수정

기존 용어를 수정합니다. 새 용어는 용어 생성 API로 등록할 수 있습니다.

필요 권한

관리자 이상의 계정으로 이용할 수 있습니다.

HTTP 요청

PUT /api/sonar/glossary/terms/:guid
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
     -d locale=ko \
     -d category=field \
     -d term=시각 \
     -d type=DATE \
     -d code=_time \
     -d description=로그 생성 시각 \
     -X PUT \
     https://HOSTNAME/api/sonar/glossary/terms/a07e6bd4-5ca2-11f0-ad90-acde48001122
요청 매개변수
경로 매개변수
타입설명비고
guid문자열용어 GUID36자 GUID
요청 본문 매개변수
필수타입설명비고
localeO문자열언어ko(한국어), en(영어), zh(중국어) 중 하나
categoryO문자열용어 사용 대상 분류table, field 중 하나
termO문자열용어최소 1자, 최대 50자. 특수문자·공백 불허
codeO문자열용어 식별 코드최소 1자, 최대 50자. 영숫자·언더스코어만 허용, 숫자로 시작 불가
typeX문자열데이터 유형categoryfield일 때 필수
descriptionX문자열용어 설명최대 2,000자

typeDATE, STRING, IP, PORT, SHORT, INT, LONG, COUNTRY, FLOAT, DOUBLE, BOOL, MD5, SHA1, URL, SHA256, DOMAIN 중 하나입니다. categoryfield가 아니면 지정한 값은 무시되고 null로 저장됩니다.

정상 응답

{}

오류 응답

필수 매개변수가 누락된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "null-argument",
  "error_msg": "term should be not null"
}
guid가 GUID 형식이 아닌 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
term 값이 잘못된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'term' must be 1 to 50 characters and must not contain special characters or spaces."
}
code 값이 잘못된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'code' must be 1 to 50 characters, alphanumeric or underscore characters only, and must not start with a number"
}
category 값이 유효하지 않은 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "invalid-category: ABC"
}
type 값이 유효하지 않은 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "type should be one of DATE, STRING, IP, PORT, SHORT, INT, LONG, COUNTRY, FLOAT, DOUBLE, BOOL, MD5, SHA1, URL, SHA256, DOMAIN"
}
description 값이 최대 길이를 초과한 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'description' must be shorter than or equal to 2000 characters."
}
locale 값이 지원되지 않는 경우

HTTP 상태 코드 500 응답

{
  "error_code": "unsupported-locale: ru",
  "error_msg": null
}
지정한 guid의 용어가 없는 경우

HTTP 상태 코드 500 응답

{
  "error_code": "term-not-found [guid: a07e6bd4-5ca2-11f0-ad90-acde48001122]",
  "error_msg": null
}
term이 중복된 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "duplicated-term [term: 시각, locale: ko category: field]"
}
code가 중복된 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "duplicated-code [code: _time, locale: ko category: field]"
}
권한이 없는 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}