Glossar-API
Terminologie-Glossar aktualisieren
Glossar-Details oder Begriffe aktualisieren.
- Vollständige Adresse
- https://otranslator.com/api/v1/glossary/update
- Authentifizierung
- Der API Key muss im Authorization-Anfrage-Header übermittelt werden
- Content-Type
- application/json
- Falsches Format
- { "error": "Invalid API key." }
Hinweise
Nicht übergebene Felder behalten ihren ursprünglichen Wert bei.
Wenn keys aktualisiert werden, wird empfohlen, translated ebenfalls zu aktualisieren, um sicherzustellen, dass jeder Quellbegriff eine entsprechende Übersetzung hat.
Beispiel
1curl -X POST 'https://otranslator.com/api/v1/glossary/update' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "glossaryId": "[string]",
6 "name": "0twXbd",
7 "keys": [
8 "储蓄分流"
9 ],
10 "translated": {
11 "储蓄分流": "Diversion of household deposits"
12 }
13}'Anfrageparameter
| Parameter | Typ | Standard | Beschreibung | Beispiel |
|---|---|---|---|---|
| *glossaryId | String | - | Terminologie-ID | - |
| name | String | - | Name | Finanzterminologie2 |
| desc | String | - | Beschreibung | - |
| targetLang | String | - |
| - |
| keys | String[] | - | Array aller Begriffe | ["储蓄分流"] |
| translated | JSON | - | Zuordnung der terminologieentsprechenden Übersetzungen | {"储蓄分流":"Diversion of household deposits"} |
Antwort
| Parameter | Typ | Standard | Beschreibung | Beispiel |
|---|---|---|---|---|
| glossaryId | String | - | Terminologie-ID | - |
| name | String | - | Name | - |
| desc | String | - | Beschreibung | - |
| targetLang | String | - | Zielsprache | - |
| keys | String[] | - | Array aller Begriffe | - |
| translated | JSON | - | Zuordnung der terminologieentsprechenden Übersetzungen | - |
| 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.