文檔目錄

術語表 API

查詢術語表

POST/v1/glossary/query

透過ID取得術語表詳情。

完整地址
https://otranslator.com/api/v1/glossary/query
認證
需要在 Authorization 請求頭中傳入 API Key
Content-Type
application/json
錯誤格式
{ "error": "Invalid API key." }

範例

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}'

請求參數

參數類型預設描述範例
*glossaryIdString-

術語表 ID

-

響應

參數類型預設描述範例
glossaryIdString-

術語表 ID

-
nameString-

術語表名稱

-
descString-

術語表描述

-
targetLangString-

目標語言

-
keysString[]-

來源術語清單

-
translatedJSON-

源術語到譯文的 JSON 映射

-
createdAtDateTime-

術語表的建立時間

-
updatedAtDateTime-

術語表的更新時間

-

常見錯誤

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.

術語表 API
建立術語表
術語表 API
更新術語表