文档目录

术语表 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
更新术语表