API Glosar
Interogați glosarul de termeni
POST/v1/glossary/query
Obține detaliile unui glosar după ID.
- Adresă completă
- https://otranslator.com/api/v1/glossary/query
- Autentificare
- Este necesar să transmiteți API Key în headerul de cerere Authorization
- Content-Type
- application/json
- Format greșit
- { "error": "Invalid API key." }
Exemplu
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}'Parametrii de Cerere
| Parametri | Tip | Implicit | Descriere | Exemplu |
|---|---|---|---|---|
| *glossaryId | String | - | ID glosar | - |
Răspuns
| Parametri | Tip | Implicit | Descriere | Exemplu |
|---|---|---|---|---|
| glossaryId | String | - | ID glosar | - |
| name | String | - | Numele glosarului de termeni | - |
| desc | String | - | Descrierea glosarului | - |
| targetLang | String | - | Limba țintă | - |
| keys | String[] | - | Lista termenilor sursă | - |
| translated | JSON | - | Mapare JSON de la termeni sursă la traducere | - |
| createdAt | DateTime | - | Data creării glosarului de termeni | - |
| updatedAt | DateTime | - | Timpul de actualizare al glosarului | - |
Erori frecvente
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.