API Access: Difference between revisions
Created page with "External programs, legacy systems, programmers using console or API clients can access the full solution functionalities using the generic APIs. The updated description of APIs can be found at the following repositories: * https://corporateapi2.docs.apiary.io/# (text processing), * https://pgfile.docs.apiary.io/# (document processing) and * http://prodb.pangeamt.com:8000/docs (anonymization) * Pecat API (no online repo) Pangeanic’s API is a simple RESTFul imple..." |
No edit summary |
||
Line 18: | Line 18: | ||
As an example, the API definition for the translation of a single sentence would be: | As an example, the API definition for the translation of a single sentence would be: | ||
<code> | <code> <br> | ||
POST to endpoint: https://production_access_server_url:8080/NexRelay/v1/translate | POST to endpoint: https://production_access_server_url:8080/NexRelay/v1/translate | ||
<br> | |||
Headers: Content-Type : application/json | Headers: Content-Type : application/json | ||
Line 34: | Line 35: | ||
] | ] | ||
} | } | ||
<br> | |||
Answer Body: | Answer Body: | ||
[ | [ | ||
Line 42: | Line 44: | ||
} | } | ||
] | ] | ||
<br> | |||
</code> | </code> |
Revision as of 08:34, 7 February 2022
External programs, legacy systems, programmers using console or API clients can access the full solution functionalities using the generic APIs.
The updated description of APIs can be found at the following repositories:
- https://corporateapi2.docs.apiary.io/# (text processing),
- https://pgfile.docs.apiary.io/# (document processing) and
- http://prodb.pangeamt.com:8000/docs (anonymization)
- Pecat API (no online repo)
Pangeanic’s API is a simple RESTFul implementation where typically the requests are sent as POSTs with a json encoded body.
When handling files the content is sent or received in base-64 encoded form.
As an example, the API definition for the translation of a single sentence would be:
POST to endpoint: https://production_access_server_url:8080/NexRelay/v1/translate
Headers: Content-Type : application/json
Request Body:
{
"src":"en",
"tgt":"es",
"apikey":"your_api_key",
"engineid":"your_engine_id",
"text":[
"This is an example."
]
}
Answer Body:
[
[
{
"src": "This is an example.",
"tgt": "Esto es un ejemplo."
}
]