Glossary API
Query glossary
POST/v1/glossary/query
Get details of a glossary by ID.
- Complete address
- https://otranslator.com/api/v1/glossary/query
- Authentication
- API Key needs to be passed in the Authorization request header
- Content-Type
- application/json
- Invalid format
- { "error": "Invalid API key." }
Example
curl
1curl -X POST 'https://otranslator.com/api/v1/glossary/query' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "glossaryId": "[string]"
6}'Request Parameters
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| *glossaryId | String | - | Glossary ID | - |
Response
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| glossaryId | String | - | Glossary ID | - |
| name | String | - | Glossary name | - |
| desc | String | - | Glossary description | - |
| targetLang | String | - | Target Language | - |
| keys | String[] | - | Source Terminology List | - |
| translated | JSON | - | JSON mapping from source terms to translations | - |
| createdAt | DateTime | - | Glossary creation time | - |
| updatedAt | DateTime | - | Glossary update time | - |
Common Errors
401 Missing API key.
The Authorization request header is required.
401 Invalid API key.
The API key does not exist, has been deleted, or is no longer valid.
400 Missing required parameter: glossaryId.
Provide the glossaryId returned by the create glossary API.
404 Glossary not found.
The glossary does not exist or does not belong to the current API account.