Create a new glossary term with definition, synonyms, related terms, references, and governance metadata within a glossary hierarchy using the Collate REST API.
POST
/
v1
/
glossaryTerms
POST /v1/glossaryTerms
Copy
from metadata.sdk import configurefrom metadata.sdk.entities import GlossaryTermsfrom metadata.generated.schema.api.data.createGlossaryTerm import CreateGlossaryTermRequestconfigure( host="https://your-company.getcollate.io/api", jwt_token="your-jwt-token")request = CreateGlossaryTermRequest( name="Revenue", glossary="BusinessGlossary", displayName="Revenue", description="Total income generated from business operations", synonyms=["Income", "Earnings", "Sales"])term = GlossaryTerms.create(request)print(f"Created: {term.fullyQualifiedName}")
Use PUT /v1/glossaryTerms instead of POST to perform an upsert. If a glossary term with the same fullyQualifiedName already exists, it will be updated; otherwise, a new glossary term is created. The request body is the same as POST.
Copy
curl -X PUT "{base_url}/api/v1/glossaryTerms" \ -H "Authorization: Bearer {access_token}" \ -H "Content-Type: application/json" \ -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.