Learn more about Localazy translation glossary before reading this article.

List all glossary terms #️⃣

[GET] /projects/{projectId}/glossary
Description Value
Accessible with project token true
Accessible with organization token true
Need write permission false
Available from role translator
API level normal

Returns all glossary terms for the given project.

Params

Sample Request #️⃣

curl --request GET \
  --url https://api.localazy.com/projects/{projectId}/glossary \
  --header 'Authorization: Bearer {{token}}'

Sample Response #️⃣

[
  "glossaries": {
          "id": "_a56467123854641134",
          "description": "Item description",
          "translateTerm": true,
          "caseSensitive": true,
          "exactMatch": true,
          "term": [
            {
              "lang": "en_US",
              "term": "Hello"
            },
            {
              "lang": "cs",
              "term": "Ahoj"
            }
          ]
    }
]

Response Object

Name Description
id Id of the glossary term.
description Description of the glossary term.
translateTerm Whether the term should be translated or left as is.
caseSensitive Wheter the term is case sensitive or not.
term Contains an array of the term and it’s translations. See “Term Object” below.

Term Object

Name Description
lang Language code in which the term is used. Use source language if not translatable.
term The value of the glossary term.

Get glossary term #️⃣

[GET] /projects/{projectId}/glossary/{id}
Description Value
Accessible with project token true
Accessible with organization token true
Need write permission false
Available from role translator
API level normal

Retrieve a single glossary term for the given project specified by {id}.

Sample Request #️⃣

curl --request GET \
  --url https://api.localazy.com/projects/{projectId}/glossary/{id} \
  --header 'Authorization: Bearer {{token}}'

Sample Response #️⃣

{
  "id": "_a56467123854641134",
  "description": "Item description",
  "translateTerm": true,
  "caseSensitive": true,
  "exactMatch": true,
  "term": [
    {
      "lang": "en_US",
      "term": "Hello"
    },
    {
      "lang": "cs",
      "term": "Ahoj"
    }
  ]
}

Response Object

Name Description
id Id of the glossary term.
description Description of the glossary term.
translateTerm Whether the term should be translated or left as is.
caseSensitive Wheter the term is case sensitive or not.
term Contains an array of the term and it’s translations. See “Term Object” below.

Term Object

Name Description
lang Language code in which the term is used.
term The value of the glossary term.

Delete glossary term #️⃣

[DELETE] /projects/{projectId}/glossary/{id}
Description Value
Accessible with project token true
Accessible with organization token true
Need write permission true
Available from role reviewer
API level normal

Delete a glossary term specified by {id}.

Sample Request #️⃣

curl --request DELETE \
  --url https://api.localazy.com/projects/{projectId}/glossary/{id} \
  --header 'Authorization: Bearer {{token}}'

Sample Response #️⃣

{
  "result": true
}

Create new glossary term #️⃣

[POST] /projects/{projectId}/glossary
Description Value
Accessible with project token true
Accessible with organization token true
Need write permission true
Available from role reviewer
API level normal

Adds a new term to glossary. There is a limit of 1000 glossary term per project.

Sample Request #️⃣

curl --request POST \
  --url https://api.localazy.com/projects/{projectId}/glossary \
  --header 'Authorization: Bearer {{token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Item description",
  "translateTerm": true,
  "caseSensitive": true,
  "exactMatch": true,
  "term": [
    {
      "lang": "en_US",
      "term": "Hello"
    },
    {
      "lang": "cs",
      "term": "Ahoj"
    }
  ]
}'

Request Object

Name Description
id Id of the glossary term.
description Description of the glossary term.
translateTerm Whether the term should be translated or left as is.
caseSensitive Wheter the term is case sensitive or not.
term Contains an array of the term and it’s translations. See “Term Object” below.

Term Object

Name Description
lang Language code in which the term is used. Make sure to include source language.
term The value of the glossary term.

Sample Response #️⃣

{
  "result": "_a56467123854641134"
}

Response Object

Name Description
result Id of the created item

Update glossary term #️⃣

[PUT] /projects/{projectId}/glossary/{id}
Description Value
Accessible with project token true
Accessible with organization token true
Need write permission true
Available from role reviewer
API level normal

Update a glossary term specified by {id}.

Sample Request #️⃣

curl --request PUT \
  --url https://api.localazy.com/projects/{projectId}/glossary \
  --header 'Authorization: Bearer {{token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Item description",
  "translateTerm": true,
  "caseSensitive": true,
  "exactMatch": true,
  "term": [
    {
      "lang": "en_US",
      "term": "Hello"
    },
    {
      "lang": "cs",
      "term": "Ahoj"
    }
  ]
}'

Request Object

Name Description
id Id of the glossary term.
description Description of the glossary term.
translateTerm Whether the term should be translated or left as is.
caseSensitive Wheter the term is case sensitive or not.
term Contains an array of the term and it’s translations. See “Term Object” below.

Term Object

Name Description
lang Language code in which the term is used. Make sure to include source language.
term The value of the glossary term.

Sample Response #️⃣

{
  "result": true
}