Lilt API Binding for Javascript
All URIs are relative to https://lilt.com/2
Method | HTTP request | Description |
---|---|---|
createProject | POST /projects | Create a Project |
deleteProject | DELETE /projects | Delete a Project |
deliverProjectsBulk | POST /projects/bulk-deliver | Deliver multiple projects apart from their jobs. |
getProjectReport | GET /projects/quote | Retrieve Project report |
getProjectRevisionReport | GET /projects/{id}/revision | Retrieve Project revision report |
getProjectStatus | GET /projects/status | Retrieve Project status |
getProjects | GET /projects | Retrieve a Project |
triggerAutoAssignment | POST /autoAssignment | Auto Assignment |
updateProjectsBulk | PUT /projects/bulk-update | Update multiple Projects with a single payload |
Project createProject(body)
Create a Project
Create a Project. A Project is a collection of Documents. A Project is associated with exactly one Memory. Projects appear in the dashboard of the web app.
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let body = new LiltNode.ProjectCreateParameters(); // ProjectCreateParameters |
apiInstance.createProject(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectCreateParameters |
ProjectDeleteResponse deleteProject(opts)
Delete a Project
Delete a Project.
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let opts = {
'id': 56 // Number | A unique Project identifier.
};
apiInstance.deleteProject(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | A unique Project identifier. | [optional] |
deliverProjectsBulk(body, opts)
Deliver multiple projects apart from their jobs.
Deliver mulitple projects apart from their jobs.
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let body = new LiltNode.ProjectsToDeliver(); // ProjectsToDeliver |
let opts = {
'workflowEnabled': true // Boolean | Whether the project has or not workflows enabled. (not used)
};
apiInstance.deliverProjectsBulk(body, opts).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectsToDeliver | ||
workflowEnabled | Boolean | Whether the project has or not workflows enabled. (not used) | [optional] |
null (empty response body)
ProjectQuote getProjectReport(id)
Retrieve Project report
Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let id = 56; // Number | A unique Project identifier.
apiInstance.getProjectReport(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | A unique Project identifier. |
getProjectRevisionReport(id)
Retrieve Project revision report
Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let id = 56; // Number | A unique Project identifier.
apiInstance.getProjectRevisionReport(id).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | A unique Project identifier. |
null (empty response body)
ProjectStatus getProjectStatus(id)
Retrieve Project status
Retrieve the status of a Project.
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let id = 56; // Number | A unique Project identifier.
apiInstance.getProjectStatus(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | A unique Project identifier. |
[Project] getProjects(opts)
Retrieve a Project
Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects. To retrieve a specific project, specify the `id` request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. `?id=1234,5678`. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively.
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let opts = {
'id': 56, // Number | A unique Project identifier. It can be a single id or multiple ids separated by a comma
'srclang': "srclang_example", // String | An ISO 639-1 language code.
'trglang': "trglang_example", // String | An ISO 639-1 language code.
'fromTime': 56, // Number | Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value.
'toTime': 56, // Number | Unix time stamp (epoch, in seconds) of Projects with `created_at` less than the value.
'state': "state_example", // String | A project state (backlog, inProgress, inReview, inQA, done).
'archived': true, // Boolean | A flag that toggles whether to include archived projects in the response (the default is `true`).
'connectorId': 56 // Number | A unique Connector identifier.
};
apiInstance.getProjects(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | A unique Project identifier. It can be a single id or multiple ids separated by a comma | [optional] |
srclang | String | An ISO 639-1 language code. | [optional] |
trglang | String | An ISO 639-1 language code. | [optional] |
fromTime | Number | Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value. | [optional] |
toTime | Number | Unix time stamp (epoch, in seconds) of Projects with `created_at` less than the value. | [optional] |
state | String | A project state (backlog, inProgress, inReview, inQA, done). | [optional] |
archived | Boolean | A flag that toggles whether to include archived projects in the response (the default is `true`). | [optional] |
connectorId | Number | A unique Connector identifier. | [optional] |
[AutoAssignmentResponse] triggerAutoAssignment(projectIds, opts)
Auto Assignment
Trigger automatic assignment of linguists. Requires auto-assignment to be enabled as a setting on the origanization level.
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let projectIds = "projectIds_example"; // String | The comma separated list of project ids to auto-assign. Can be sent in the body as an alternative but if both are specified the query has precedence.
let opts = {
'body': new LiltNode.AutoAssignmentParameters() // AutoAssignmentParameters |
};
apiInstance.triggerAutoAssignment(projectIds, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectIds | String | The comma separated list of project ids to auto-assign. Can be sent in the body as an alternative but if both are specified the query has precedence. | |
body | AutoAssignmentParameters | [optional] |
[Project] updateProjectsBulk(body)
Update multiple Projects with a single payload
Update multiple Projects with a single payload.
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.ProjectsApi();
let body = new LiltNode.ProjectsToUpdate(); // ProjectsToUpdate |
apiInstance.updateProjectsBulk(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectsToUpdate |