Glossar-API
Terminologie-Glossar abfragen
POST/v1/glossary/query
Details eines Glossars nach ID abrufen.
- Vollständige Adresse
- https://otranslator.com/api/v1/glossary/query
- Authentifizierung
- Der API Key muss im Authorization-Anfrage-Header übermittelt werden
- Content-Type
- application/json
- Falsches Format
- { "error": "Invalid API key." }
Beispiel
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}'Anfrageparameter
| Parameter | Typ | Standard | Beschreibung | Beispiel |
|---|---|---|---|---|
| *glossaryId | String | - | Glossar-ID | - |
Antwort
| Parameter | Typ | Standard | Beschreibung | Beispiel |
|---|---|---|---|---|
| glossaryId | String | - | Glossar-ID | - |
| name | String | - | Glossarname | - |
| desc | String | - | Glossarbeschreibung | - |
| targetLang | String | - | Zielsprache | - |
| keys | String[] | - | Quellbegriffsliste | - |
| translated | JSON | - | JSON-Zuordnung von Quellterminologie zu Übersetzung | - |
| createdAt | DateTime | - | Erstellungszeit der Terminologie | - |
| updatedAt | DateTime | - | Aktualisierungszeit des Glossars | - |
Häufige Fehler
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.