The glossary entry model
The glossary entry model acts as a container for the terms and definitions for a single entry in a glossary. It also contains a reference to the glossary it belongs to as well as the terms that make up the entry and information about when the entry was created and last updated. Think of an entry as a row in a spreadsheet with multiple columns containing the translated terms.Properties
Unique identifier for the glossary entry.
The ID of the glossary the entry belongs to.
An optional note for the glossary entry.
The terms that make up the glossary entry. See the glossary term model for details.
Timestamp of when the glossary entry was created.
Timestamp of when the glossary entry was last updated.
The glossary term model
A glossary term represents a single translation or variant within a glossary entry. Each entry can have multiple terms in different languages.Properties
Unique identifier for the glossary term.
The ID of the glossary entry the term belongs to.
The term text.
The language code for the term (e.g., ‘en’, ‘de’, ‘fr’).
An optional description or definition of the term.
The type of term. Possible values:
preferred (the recommended term to use) or forbidden (a term that should not be used).An optional alternative form of the term.
List all glossary entries
GET /v1/glossaries/:glossary_id/entries
This endpoint allows you to retrieve a paginated list of all the entries in a glossary. By default, a maximum of 50 entries are shown per page.
Optional query parameters
Maximum number of entries to return. Default: 50.
Number of entries to skip for pagination. Default: 0.
Whether to include the terms for each entry in the response. Default: true.
Response
Create a glossary entry
POST /v1/glossaries/:glossary_id/entries
This endpoint allows you to add a new empty entry to a glossary.
You might want to use the Create glossary entry with terms endpoint instead to add a glossary entry with terms in a single request.
Optional attributes
A note for the glossary entry.
Response
Create a glossary entry with terms
POST /v1/glossaries/:glossary_id/entries/with-terms
This endpoint allows you to add a new entry to a glossary with terms in a single request.
Optional attributes
A note for the glossary entry.
Required attributes
An array of term objects to create. Each term requires
term, lang, and term_type.Term object attributes
The term text.
The language code for the term.
The type of term:
preferred or forbidden.An optional description of the term.
An optional alternative form of the term.
Response
Retrieve a glossary entry
GET /v1/glossaries/:glossary_id/entries/:entry_id
This endpoint allows you to retrieve a glossary entry by providing its id.
Optional query parameters
Whether to include the terms for the entry in the response. Default: true.
Response
Update a glossary entry
PUT /v1/glossaries/:glossary_id/entries/:entry_id
This endpoint allows you to update a glossary entry. You can update the notes and/or the terms.
When updating terms, the lang field is used as the unique identifier within an entry:
- If a term with the given
langexists, it will be updated - If no term with that
langexists, a new term will be created
Optional attributes
Updated notes for the glossary entry.
Array of term objects to update or create. Each term requires
term, lang, and term_type.Response
Delete a glossary entry
DELETE /v1/glossaries/:glossary_id/entries/:entry_id
This endpoint allows you to delete a glossary entry. This will also delete all terms associated with the entry.