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

{
  "guid": "a07e6bd4-5ca2-11f0-ad90-acde48001122"
}
  • guid (String): GUID of the created term

Error Responses

Required argument is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "term should be not null"
}
term value is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'term' must be 1 to 50 characters and must not contain special characters or spaces."
}
term is duplicated

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated-term [term: term, locale: locale]"
}
code value is invalid

HTTP status code 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"
}
code is duplicated

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated-code [code: code, locale: locale]"
}
category value is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "invalid-category: invalid-category"
}
type value is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "type should be one of IP, SHA256, BOOL, DATE, INT, URL, STRING, DOUBLE, COUNTRY, SHORT, LONG, FLOAT, MD5, PORT, DOMAIN, SHA1"
}
locale value is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "unsupported-locale: ru"
}
description is too long

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'description' must be shorter than or equal to 2000 characters."
}
Permission denied

HTTP status code 500

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