The Lilt REST API enables programmatic access to the full-range of Lilt backend services including:
- Training of and translating with interactive, adaptive machine translation
- Large-scale translation memory
- The Lexicon (a large-scale termbase)
- Programmatic control of the Lilt CAT environment
- Translation memory synchronization
Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests.
Requests are authenticated via REST API key, which requires the Business plan.
Requests are authenticated using HTTP Basic Auth. Add your REST API key as both the username
and password
.
For development, you may also pass the REST API key via the key
query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use.
Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: v2.0
- Package version: 0.6.5
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://lilt.com/docs/api
Python 2.7 and 3.4+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/lilt/lilt-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/lilt/lilt-python.git
)
Then import the package:
import lilt
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import lilt
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import lilt
from lilt.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://lilt.com/2
# See configuration.py for a list of all supported configuration parameters.
configuration = lilt.Configuration(
host = "https://lilt.com/2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration = lilt.Configuration(
host = "https://lilt.com/2",
api_key = {
'key': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = lilt.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Enter a context with an instance of the API client
with lilt.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lilt.CommentsApi(api_client)
document_id = 56 # int | A unique document identifier.
segment_id = 56 # int | A unique segment identifier.
body = lilt.CommentBody() # CommentBody | The comment being created
try:
# Create a new comment
api_response = api_instance.create_comment(document_id, segment_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommentsApi->create_comment: %s\n" % e)
All URIs are relative to https://lilt.com/2
Class | Method | HTTP request | Description |
---|---|---|---|
CommentsApi | create_comment | POST /comments | Create a new comment |
CommentsApi | delete_comment | DELETE /comments | Delete a Comment |
CommentsApi | get_document_comments | GET /comments | Retrieve a document's comments by segment |
CommentsApi | update_comment | PUT /comments | Update an existing comment |
ConnectorsApi | create_connector | POST /connectors | Upload a Connector |
ConnectorsApi | delete_connector | DELETE /connectors | Delete a Connector |
ConnectorsApi | export_connector_job | POST /connectors/jobs/deliver | Deliver a Connector Job |
ConnectorsApi | get_connector_jobs | GET /connectors/jobs | Retrieve a Connector Job |
ConnectorsApi | get_connectors | GET /connectors | Retrieve a Connector |
ConnectorsApi | sync_connector | POST /connectors/sync | Sync a Connector |
ConnectorsApi | update_connector | PUT /connectors | Upload a Connector |
ConverterConfigApi | add_converter_config | PUT /configs/converter | Add Converter Config |
ConverterConfigApi | delete_converter_config | DELETE /configs/converter/{configId} | Delete Converter Config |
ConverterConfigApi | delete_filter_mapping | DELETE /configs/converter/{configId}/{fileExtension} | Delete Filter Mapping |
ConverterConfigApi | edit_filter_mapping | PUT /configs/converter/{configId}/{fileExtension} | Add Filter Mapping |
ConverterConfigApi | get_converter_config_by_id | GET /configs/converter/{configId} | Fetch Converter Config by Id |
ConverterConfigApi | get_converter_configs | GET /configs/converter | List Converter Configs |
DocumentsApi | assign_document | PUT /documents/share | Assign a Document |
DocumentsApi | create_document | POST /documents | Create a Document |
DocumentsApi | delete_document | DELETE /documents | Delete a Document |
DocumentsApi | download_document | GET /documents/files | Download a Document |
DocumentsApi | get_document | GET /documents | Retrieve a Document |
DocumentsApi | mark_review_done | POST /documents/done/review | Mark review done |
DocumentsApi | mark_translation_done | POST /documents/done/translation | Mark translation done |
DocumentsApi | pretranslate_documents | POST /documents/pretranslate | Pretranslate a Document |
DocumentsApi | unlock_documents | POST /documents/done/unlock | Unlock documents |
DocumentsApi | upload_document | POST /documents/files | Upload a File |
FilesApi | add_label | POST /files/labels | Add Label to File |
FilesApi | delete_file | DELETE /files | Delete a File |
FilesApi | download | GET /files/download | Download file |
FilesApi | get_files | GET /files | Retrieve a File |
FilesApi | remove_label | DELETE /files/labels | Remove Label from File |
FilesApi | upload_file | POST /files | Upload a File |
JobsApi | archive_job | POST /jobs/{jobId}/archive | Archive a Job |
JobsApi | create_job | POST /jobs | Create a Job |
JobsApi | delete_job | DELETE /jobs/{jobId} | Delete a Job |
JobsApi | deliver_job | POST /jobs/{jobId}/deliver | Deliver a Job |
JobsApi | download_job | GET /jobs/{jobId}/downlod | Download a Job |
JobsApi | export_job | GET /jobs/{jobId}/export | Export a Job |
JobsApi | get_job | GET /jobs/{jobId} | Retrieve a Job |
JobsApi | get_job_leverage_stats | POST /jobs/{jobId}/stats | Retrieve Job Leverage Stats |
JobsApi | reactivate_job | POST /jobs/{jobId}/reactivate | Reactivate a Job |
JobsApi | retrieve_all_jobs | GET /jobs | Retrieve all Jobs |
JobsApi | unarchive_job | POST /jobs/{jobId}/unarchive | Unarchive a Job |
JobsApi | update_job | PUT /jobs/{jobId} | Update a Job |
LanguagesApi | get_languages | GET /languages | Retrieve supported languages |
LexiconApi | query_lexicon | GET /lexicon | Query a Lexicon |
LexiconApi | update_lexicon | POST /lexicon | Update a Lexicon |
MemoriesApi | create_memory | POST /memories | Create a Memory |
MemoriesApi | delete_memory | DELETE /memories | Delete a Memory |
MemoriesApi | get_memory | GET /memories | Retrieve a Memory |
MemoriesApi | import_memory_file | POST /memories/import | File import for a Memory |
MemoriesApi | query_memory | GET /memories/query | Query a Memory |
MemoriesApi | sync_delete_memory | DELETE /memories/sync | Delete-sync for a Memory |
MemoriesApi | sync_down_memory | GET /memories/sync | Get-sync for a Memory |
MemoriesApi | sync_insert_memory | POST /memories/sync | Insert-sync for a Memory |
MemoriesApi | sync_update_memory | PUT /memories/sync | Update-sync for a Memory |
MemoriesApi | update_memory | PUT /memories | Update the name of a Memory |
ProjectsApi | create_project | POST /projects | Create a Project |
ProjectsApi | delete_project | DELETE /projects | Delete a Project |
ProjectsApi | deliver_projects_bulk | POST /projects/bulk-deliver | Deliver multiple projects apart from their jobs. |
ProjectsApi | get_project_report | GET /projects/quote | Retrieve Project report |
ProjectsApi | get_project_revision_report | GET /projects/{id}/revision | Retrieve Project revision report |
ProjectsApi | get_project_status | GET /projects/status | Retrieve Project status |
ProjectsApi | get_projects | GET /projects | Retrieve a Project |
ProjectsApi | trigger_auto_assignment | POST /autoAssignment | Auto Assignment |
ProjectsApi | update_projects_bulk | PUT /projects/bulk-update | Update multiple Projects with a single payload |
QAApi | qa_check | GET /qa | Perform QA check |
RootApi | root | GET / | Retrieve the REST API root |
SegmentsApi | create_segment | POST /segments | Create a Segment |
SegmentsApi | delete_segment | DELETE /segments | Delete a Segment |
SegmentsApi | get_segment | GET /segments | Retrieve a Segment |
SegmentsApi | tag_segment | GET /segments/tag | Tag a Segment |
SegmentsApi | unlock_segments | POST /segments/review/unlock | Unaccept and unlock segments |
SegmentsApi | update_segment | PUT /segments | Update a Segment |
SettingsApi | get_organization_settings | GET /settings/organization | Get organization-level settings |
SettingsApi | get_project_settings | GET /settings/project/{projectId} | Get settings for a project |
SettingsApi | get_user_settings | GET /settings/user | Get settings for the authenticated user |
SettingsApi | upsert_setting | POST /settings | Update or create a setting |
TranslateApi | batch_translate_file | POST /translate/file | Translate a File |
TranslateApi | download_file | GET /translate/files | Download translated file |
TranslateApi | monitor_file_translation | GET /translate/file | Monitor file translation |
TranslateApi | register_segment | GET /translate/register | Register a segment |
TranslateApi | translate_segment | GET /translate | Translate a segment |
TranslateApi | translate_segment_post | POST /translate | Translate a segment |
WorkflowsApi | advance_workflow_stage | POST /document/{documentId}/task/{taskId}/advance | Advance workflow to the next stage |
WorkflowsApi | get_document_workflow | GET /workflows/document/{documentId} | Retrieve document Workflow metadata |
WorkflowsApi | get_workflow_templates | GET /workflows/templates | Retrieve workflow templates |
WorkflowsApi | reject_workflow_stage | POST /document/{documentId}/task/{taskId}/reject | Move workflow to the previous stage |
WorkflowsApi | set_document_stage | PUT /workflows/{documentId}/stage | Set Workflow stage for a document |
- AddFileLabelRequest
- Annotation
- ApiRoot
- AssignmentDetails
- AssignmentError
- AutoAssignmentParameters
- AutoAssignmentResponse
- BadRequest
- Comment
- CommentBody
- CommentDeleteResponse
- Connector
- ConnectorArguments
- ConnectorDeleteResponse
- ConnectorJob
- ConverterConfigUpdateResponse
- CreateConverterConfigParameters
- DocumentAssignmentParameters
- DocumentAssignmentResponse
- DocumentComments
- DocumentDeleteResponse
- DocumentDoneUpdateParameters
- DocumentDoneUpdateParameters1
- DocumentDoneUpdateParameters2
- DocumentParameters
- DocumentPretranslateParameters
- DocumentPretranslateResponse
- DocumentPretranslating
- DocumentPretranslatingStatus
- DocumentQuote
- DocumentWithSegments
- DocumentWithoutSegments
- DocumentWithoutSegmentsStatus
- DocumentWorkflow
- EditFilterMappingParameters
- Error
- FileDeleteResponse
- Job
- JobCreateParameters
- JobDeleteResponse
- JobLeverageStats
- JobProject
- JobStats
- JobUpdateParameters
- LanguagePair
- LanguagesResponse
- LexiconEntry
- LexiconEntryExamples
- LexiconEntrySourceSpan
- LexiconEntryTargetSpan
- LexiconEntryTranslations
- LexiconUpdateParameters
- LexiconUpdateResponse
- MatchBand
- Memory
- MemoryCreateParameters
- MemoryDeleteResponse
- MemoryImportResponse
- MemoryInsertResponse
- MemoryUpdateParameters
- MemoryUpdateResponse
- NextWorkflowTask
- Project
- ProjectCreateParameters
- ProjectDeleteResponse
- ProjectQuote
- ProjectStats
- ProjectStatus
- ProjectUpdateResponse
- ProjectsToDeliver
- ProjectsToUpdate
- QARuleMatches
- QARuleMatchesContext
- QARuleMatchesCustomRules
- QARuleMatchesMatches
- QARuleMatchesReplacements
- QARuleMatchesRule
- QARuleMatchesRuleCategory
- QARuleMatchesRuleUrls
- ResourceStatus
- ReviewCompletionTypeError
- Segment
- SegmentCreateParameters
- SegmentDeleteResponse
- SegmentDoneResponse
- SegmentUpdateParameters
- SegmentWithComments
- SetDocumentStageRequest
- Setting
- SettingUpsertBody
- SettingUpsertResponse
- SourceFile
- TaggedSegment
- TranslateCompletionTypeError
- TranslateRegisterResponse
- TranslateSegmentBody
- TranslateSegmentBody1
- Translation
- TranslationInfo
- TranslationList
- TranslationMemoryEntry
- WorkflowStage
- WorkflowStageAssignment
- WorkflowStageTemplate
- WorkflowTask
- WorkflowTemplate
- Type: API key
- API key parameter name: key
- Location: URL query string
- Type: HTTP basic authentication