API Glosarium
Kueri glosarium
POST/v1/glossary/query
Dapatkan detail glosarium berdasarkan ID.
- Alamat lengkap
- https://otranslator.com/api/v1/glossary/query
- Autentikasi
- Perlu menyertakan API Key di header permintaan Authorization
- Content-Type
- application/json
- Format error
- { "error": "Invalid API key." }
Contoh
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}'Parameter Permintaan
| Parameter | Jenis | Bawaan | Deskripsi | Contoh |
|---|---|---|---|---|
| *glossaryId | String | - | ID Glosarium | - |
Respons
| Parameter | Jenis | Bawaan | Deskripsi | Contoh |
|---|---|---|---|---|
| glossaryId | String | - | ID Glosarium | - |
| name | String | - | Nama glosarium | - |
| desc | String | - | Deskripsi glosarium | - |
| targetLang | String | - | Bahasa target | - |
| keys | String[] | - | Daftar istilah sumber | - |
| translated | JSON | - | Pemetaan JSON dari istilah sumber ke terjemahan | - |
| createdAt | DateTime | - | Waktu pembuatan glosarium | - |
| updatedAt | DateTime | - | Waktu pembaruan glosarium | - |
Kesalahan Umum
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.