Skip to content

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.

Push data

Use this API to create dictionary and import entries. Examples and test at https://www.lexonomy.eu/push.api

Create new dictionary, with Lexonomy "One-Click Dictionary" template

{
  "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.

Create new dictionary, with TEI-Lex0 template

{
  "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.

Linking

OntoLex