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
| Key | Required | Type | Description | Notes |
|---|---|---|---|---|
| term | Y | String | Term | Min 1, max 50 characters. No special characters or spaces allowed |
| code | Y | String | Term identification code | Min 1, max 50 characters. Alphanumeric and underscore only, no digit start |
| category | Y | String | Term usage target category | One of table, field |
| type | - | String | Data type | Required when category is field |
| locale | Y | String | Language | One of ko, en, zh |
| description | N | String | Term description | Max 2,000 characters |
typeis one ofDATE,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"
}