API Glosariusza
Zapytanie o słownik terminologiczny
POST/v1/glossary/query
Uzyskaj szczegóły glosariusza według ID.
- Pełny adres
- https://otranslator.com/api/v1/glossary/query
- Uwierzytelnienie
- Należy przekazać API Key w nagłówku żądania Authorization
- Content-Type
- application/json
- Nieprawidłowy format
- { "error": "Invalid API key." }
Przykład
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}'Parametry żądania
| Parametry | Typ | Domyślny | Opis | Przykład |
|---|---|---|---|---|
| *glossaryId | String | - | ID glosariusza | - |
Odpowiedź
| Parametry | Typ | Domyślny | Opis | Przykład |
|---|---|---|---|---|
| glossaryId | String | - | ID glosariusza | - |
| name | String | - | Nazwa glosariusza | - |
| desc | String | - | Opis słownika terminologicznego | - |
| targetLang | String | - | Język docelowy | - |
| keys | String[] | - | Lista terminów źródłowych | - |
| translated | JSON | - | Mapowanie JSON terminologii źródłowej na tłumaczenie | - |
| createdAt | DateTime | - | Data utworzenia glosariusza | - |
| updatedAt | DateTime | - | Czas aktualizacji słownika terminologicznego | - |
Typowe błędy
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.