-
Notifications
You must be signed in to change notification settings - Fork 29
Lexonomy API
rambousek edited this page Feb 4, 2021
·
11 revisions
Description of public APIs that can be used by external applications.
For some API calls, API key is needed. You can get your API key in User profile (One-Click Dictionary API key).
For local installations, change server name in URL.
Use this API to create dictionary and import entries. Examples and test at https://www.lexonomy.eu/push.api
- method: POST
- request URI: https://www.lexonomy.eu/push.api
- request data: JSON encoded
{
"email": "your Lexonomy user email",
"apikey": "your Lexonomy API key",
"command": "makeDict",
"dictTitle": "dictionary title",
"dictBlurb": "dictionary information",
"poses": "array of PoS values",
"labels": "array of entry labels"
}
example
{
"email": "[email protected]",
"apikey": "4HNA6VI6C9MROAENNYJQJPLL53HCAJMA",
"command": "makeDict",
"dictTitle": "My New Dictionary",
"dictBlurb": "Yet another dictionary draft.",
"poses": ["n", "v", "adj", "adv"],
"labels": ["colloquial", "formal", "mostly plural", "Irish English", "vulgar"]
}
- response: JSON encoded, in case of failure
{"success": false}
, in case of successful dictionary creation{"success": true, "dictID": "ID of new dictionary"
. You will need dictID for entry import.
- method: POST
- request URI: https://www.lexonomy.eu/push.api
- request data: JSON encoded
{
"email": "your Lexonomy user email",
"apikey": "your Lexonomy API key",
"command": "makeDict",
"format": "teilex0",
"dictTitle": "dictionary title",
"dictBlurb": "dictionary information",
"poses": "array of PoS values",
"labels": "array of entry labels"
}
- response: JSON encoded, in case of failure
{"success": false}
, in case of successful dictionary creation{"success": true, "dictID": "ID of new dictionary"
. You will need dictID for entry import.
- method: POST
- request URI: https://www.lexonomy.eu/push.api
- request data: JSON encoded
{
"email": "your Lexonomy user email",
"apikey": "your Lexonomy API key",
"command": "listDicts",
}
- response: JSON encoded, list of dictionaries accessible for given user
{
"success": true,
"entries": [
{"id": "dictionary ID", "title": "dictionary title"}
]
}