Create Glossary Term

Creates a new glossary term. This operation requires administrator role.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

POST /api/sonar/glossary/terms
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d term="Timestamp" \
     -d code="_time" \
     -d category="field" \
     -d type="DATE" \
     -d locale="en" \
     -d description="Log creation timestamp" \
     -X POST "https://HOSTNAME/api/sonar/glossary/terms"
Request Parameters
KeyRequiredTypeDescriptionNotes
termYStringTermMin 1, max 50 characters. No special characters or spaces allowed
codeYStringTerm identification codeMin 1, max 50 characters. Alphanumeric and underscore only, no digit start
categoryYStringTerm usage target categoryOne of table, field
type-StringData typeRequired when category is field
localeYStringLanguageOne of ko, en, zh
descriptionNStringTerm descriptionMax 2,000 characters
  • type is one of DATE, STRING, IP, PORT, SHORT, INT, LONG, COUNTRY, FLOAT, DOUBLE, BOOL, MD5, SHA1, URL, SHA256, DOMAIN.

Success Response

HTTP status code 200 response

{}

Error Responses

term: required parameter missing

HTTP status code 400 response

{
  "error_code": "null-argument",
  "error_msg": "term should be not null"
}
term: duplicate term

HTTP status code 500 response

{
  "error_code": "illegal-state",
  "error_msg": "duplicated term: Timestamp"
}
code: duplicate code

HTTP status code 500 response

{
  "error_code": "illegal-state",
  "error_msg": "duplicated code: _time"
}
category: invalid value

HTTP status code 400 response

{
  "error_code": "invalid-argument",
  "error_msg": "invalid category: ABC"
}
permission: no glossary term creation permission

HTTP status code 500 response

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