lwt

LWT REST API Documentation

This documentation provides an overview of the REST API endpoints available for LWT-community. The LWT API allows developers to interact with various features of the application, such as retrieving media paths, getting sentences containing a specific term, managing settings, and more.

Base URL

The base URL for all API endpoints is: http://[base_url]/api/v1, where base_url is your instance URL (e. g. localhost:8080).

Authentication

Currently, the LWT API does not require authentication. However, authentication might be implemented in the future. Ensure that appropriate security measures are implemented on the client-side to protect user data.

Versioning

The REST API should follow semantic versioning. In the API URL, v1 indicates “MAJOR version 1”, and so on for the future versions. A track of all changes is kept in the CHANGELOG.md.

GET API Endpoints

Get Media Files Paths

Retrieves the files paths to the audio and video files in the media folder.

Get Reading Configuration

Retrieves how word should be read for a specific language.

Get Phonetic Reading

Retrieves the phonetic reading for any specified term.

Get Next Word to Review

Retrieves the next word to be reviewed.

Get Tomorrow’s Reviews Number

Retrieves the number of reviews scheduled for tomorrow.

Get Sentences Containing New Term

Retrieves sentences that contain the specified term.

Get Sentences Containing Registred Term

Retrieves sentences that contain the specified term.

Get Terms Similar to Another

Retrieves terms similar to the specified term.

Get Theme Path

Retrieves the path for a file using the user theme.

Get Imported Terms

Retrieves the terms that were imported.

Get Term Translations

Retrieves the translations for a specific term.

Get Texts Statistics

Retrieves statistics for multiple texts.

Get API Version

Retrieves the version of the LWT API.

POST API Endpoints

Save Setting

Saves user settings.

Set Text Annotation

Sets the annotation for a specific text.

Update Audio Position

Updates the audio position for a specific text.

Update Reading Position

Updates the reading position for a specific text.

Decrement Term Status

Decrements the status of a term.

Increment Term Status

Increments the status of a term.

Set Term Status

Sets the status of a term to a new value.

Update Existing Term Translation

Add a translation for an existing term.

Add New Term Translation

Adds a new translation for a term.

Response Format

All API endpoints return responses in JSON format.