Glossary

Import a glossary file

Merge a CSV or TBX file into the glossary.

POST
/v1/glossary/import

Merge a CSV or TBX file into the glossary. Send the file as the raw request body; the format is detected from the content (a body containing <?xml or <martif is read as TBX). A CSV needs a source_term column; part_of_speech, case_sensitive, do_not_translate, forbidden and notes are optional, and every other column named by a locale code holds that locale's translation.

Authorization

deployToken
headerAuthorizationBearer <token>

A project deploy token, minted in the console under Settings, Developer, API tokens. Send the whole value, including the numeric prefix before the |. A token carries a set of abilities (push, pull, manage, read, write) and each operation requires one of them. Tokens do not inherit from each other: a manage token cannot read the glossary unless it also has read.

Request Body

body*string

Response Body

What the import did.

application/json
  1. response
imported?integer

created + updated.

created?integer
updated?integer
unchanged?integer
skipped?integer

Rows that could not become a term, for example a row with no source term or a value over its length limit.

wording_removed?integer

Terms whose stored translations were removed because the file marks them forbidden or do not translate.

wording_ignored?integer

Terms the file gives translations for that were not used, because the term is forbidden or do not translate.

no_source_column?boolean

true when a CSV header has no source_term column, so nothing was imported.

curl -X POST 'https://api.transglot.ai/v1/glossary/import'
{  "imported": 0,  "created": 0,  "updated": 0,  "unchanged": 0,  "skipped": 0,  "wording_removed": 0,  "wording_ignored": 0,  "no_source_column": true}