# lexiQA API

lexiQA exposes its data via an Application Programming Interface (API), so developers can interact in a programmatic way with the lexiQA application. The API calls are REST-compliant and make use of the most common HTTP methods. Below you can find a sample of these API calls. In order to have access to the entire API documentation and test our API with your own data, please contact us at info (at) lexiqa.net

# Info

# Supported locales

GET /supportedLocales

Returns an array with the supported locales for this lexiQA instance. Amongst these, a bilingual file with any combination of source/target locales can be used in lexiQA.

# Tooltip warnings

GET /tooltipwarnings

Get the descriptions for the error classes supported for the running version of the lexiQA server. \"s\" entries contain the warning message for the source text. \"t\" entries contain the warning message for the target text.

# Project

# Create project (JSON data)

POST /project/v1/createWithData

Creates a new project with the data included in the request. Uses Basic Authentication. Please use your user and lexiqa_key as username/pass. This is a non-blocking call. After a 201 return code, one must check for the project completion status (see Project Status). The "data" field should contain an array of objects, with a required source text field (st) and a target text (tt). If there is no translation, the tt field should be an empty string. The ID of each segment should be unique for this project. The "spellcheck" field enables/disables spellcheck (Hunspell-based).

# Add segments (non-blocking)

POST /project/v1/addSegments

Add segments included in the request. Uses Basic Authentication. Please use your user and lexiqa_key as username/pass. This is a non-blocking call. After a 201 return code, one must check for the project completion status (see Project Status). The "data" field should contain an array of objects, with a required source text field (st) and a target text (tt). If there is no translation, the tt field should be an empty string. The ID of each segment should be unique for this project. If a segment with a provided ID already exists in the project, the original source/target text will be kept.

# Add segments (blocking)

POST /project/v1/addSegments

Add segments included in the request. Uses Basic Authentication. Please use your user and lexiqa_key as username/pass. This is a blocking call. The "data" field should contain an array of objects, with a required source text field (st) and a target text (tt). If there is no translation, the tt field should be an empty string. The ID of each segment should be unique for this project. If a segment with a provided ID already exists in the project, the original source/target text will be kept.

# Create project (XLIFF/TMX file)

POST /project/v1/create

Creates a new project with the attached tmx/xliff file. Uses Basic Authentication. Please use your user and lexiqa_key as username/pass. This is a non-blocking call. After a 201 return code, one must check for the project completion status (see Project Status).

# Check project status

GET /project/v1/status?id={projectid}

Checks the project status, if QA has finished and the project is ready to use (get warnings/perform QA on changed segments, etc.). Requires Basic Authentication.

# Retrieve project parameters

GET /project/v1/params?id={projectid}

Retrieves project settings. Requires Basic Authentication.

# Update project parameters

POST /project/v1/update

Updates a list of projects with the data included in the request. Uses Basic Authentication. Please use your user and lexiqa_key as username/pass. This is a blocking call. The "spellcheck" field enables/disables spellcheck (Hunspell-based).

# Retrieve project statistics

POST /project/v1/statistics

Retrieves the statistics for one or more projects contained in the request. Requires Basic Authentication.

# Get segments with warnings

GET /project/v1/warnings?id={projectid}

Retrieves the segments with warnings (along with the warning data) for the id in the request. Requires Basic Authentication.

# Glossary

# Create glossary

POST /glossary/v1/createWithFile

Creates a monolingual brandnames or blacklist glossary with an xls/xlsx/txt file. Creates a new termbase with an xls/xlsx/csv/tab-separated txt file.

# Segment

# Perform QA on segment

POST /segment/v1/qa

Requires Basic Authentication.

# Warnings

# Ignore error

POST /warnings/v1/ignore

Requires Basic Authentication.

# Undo "Ignore error"

POST /warnings/v1/undoIgnore

Requires Basic Authentication.

# Get spelling suggestions

GET /warnings/v1/spellingSuggestions?word={word}&locale={locale}

Requires Basic Authentication.