create_glossary_term¶
- CatalogApi.create_glossary_term(glossary_id, role_id, term_create_input, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a glossary term
Creates a term in the glossary. The term name must be unique within the glossary and the definition cannot be empty. Requires editor access or higher.
- Parameters:
glossary_id (str) – Identifier of the glossary to create the term in. (required)
role_id (str) – User role id (required)
term_create_input (TermCreateInput) – (required)
content_type (str) – Must be application/json.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: POST /glossaries/{glossary_id}/terms
Request¶
Term without linked assets
{
"TermName": "ActiveCustomer",
"Definition": "A customer with at least one order in the trailing 90 days."
}
Term linked to dataset columns
{
"TermName": "ActiveCustomer",
"Definition": "A customer with at least one order in the trailing 90 days.",
"DataReferences": [
{
"AssetType": "dataset",
"Assets": [
{
"DatasourceId": "ds-8f2e1a2b",
"AssetId": "asset-4c7a8f2e",
"AssetName": "customers",
"Columns": [
"customer_id",
"status"
]
}
]
}
]
}
Success (HTTP 200)¶
Successful term creation
Request / response example
{
"TermId": "a5c8e2f1-7b34-4d69-8e0a-2f6b9c1d4e73",
"Message": "Glossary term created successfully"
}
Errors¶
Documented error codes: GE-1034, GE-1020.
HTTP 400
Invalid input glossary body
Term name already used in this glossary
{
"Message": "GE-1034 - Term with the same name - ActiveCustomer already exists within the glossary. Please try again with a different name."
}
Definition is blank
{
"Message": "GE-1034 - Definition cannot be empty"
}
DataReferences of the wrong type
{
"Message": "GE-1034 - DataReferences should be of type list"
}
Referenced column is not in the asset schema
{
"Message": "GE-1034 - Column name customer_status not found in asset schema."
}
Caller is not an owner of the referenced asset
{
"Message": "GE-1034 - User does not have owner access to the asset customers"
}
HTTP 500
Something went wrong at backend
Request / response example
{
"Message": "GE-1020 - Unable to update GlossaryTerms table, please retry or contact administrator"
}