용어집 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}'요청 매개변수
| 매개변수 | 유형 | 기본값 | 설명 | 예시 |
|---|---|---|---|---|
| *glossaryId | String | - | 용어집 ID | - |
응답
| 매개변수 | 유형 | 기본값 | 설명 | 예시 |
|---|---|---|---|---|
| glossaryId | String | - | 용어집 ID | - |
| name | String | - | 용어집 이름 | - |
| desc | String | - | 용어집 설명 | - |
| targetLang | String | - | 대상 언어 | - |
| keys | String[] | - | 원본 용어 목록 | - |
| translated | JSON | - | 원본 용어에서 번역으로의 JSON 매핑 | - |
| createdAt | DateTime | - | 용어집 생성 시간 | - |
| updatedAt | DateTime | - | 용어집 업데이트 시간 | - |
일반적인 오류
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.