User Manual - Glossary API
Introduction
This API allows managing glossaries associated with translation or processing engines. The available endpoints allow: listing glossaries, deleting glossaries, and adding new glossaries. All endpoints are accessible via the HTTP POST method.
Authentication
All endpoints require the apikey parameter to authenticate the user. If not provided, the API will respond with a 400 error.
Endpoint: Obtain Glossaries
URL: /glossaries
Method: POST
Content-Type: application/json; charset=UTF-8
Description: Returns a list of available glossaries for the apikey, optionally filtered by glossaryid.
Example of a request
{ |
Successful Response
[
|
Common Errors
- 400: Malformed JSON or missing apikey -
401: Unexpected error retrieving glossaries
Endpoint: Remove Glossary
URL: /deleteglossary
Method: POST
Content-Type: application/json; charset=UTF-8
Description: Remove a specific glossary.
Example of a request
{ |
Successful Response
{ |
Common Errors
- 400: Missing apikey or glossaryid
- 401: Unexpected error
- 500: Database error
Endpoint: Add Glossary
URL: /addglossary
Method: POST
Content-Type: multipart/form-data
Description: Allows you to upload a glossary file and associate it with a engine.
Form Parameters
Field | Type | Description |
file | file | Glossary file |
name | string | Glossary name |
engineid | int | Associated engine ID |
apikey | string | Authentication key |
Example of a Successful Response
{ |
Common Errors
- 400: Some of the required fields are missing
- 401: Unexpected error
- 500: Database error
Usage examples with curl
Obtain glossaries
curl -X POST http://tuapi.com/glossaries \ |
Remove glossary
curl -X POST http://tuapi.com/deleteglossary \ |
Add glossary
curl -X POST http://tuapi.com/addglossary \
|
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article