openapi: 3.0.3
info:
title: LILT Create Jobs API
description: "LILT API Support: https://lilt.atlassian.net/servicedesk/customer/portals\n\nThe LILT API enables programmatic access to the full-range of LILT backend services including:\n * Training of and translating with interactive, adaptive machine translation\n * Large-scale translation memory\n * The Lexicon (a large-scale termbase)\n * Programmatic control of the LILT CAT environment\n * Translation memory synchronization\n\n\nRequests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests.\n\nThe base url for this REST API is `https://api.lilt.com/`.\n\n## Authentication\n\nRequests are authenticated via API key, which requires the Business plan.\n\nRequests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your API key as both the `username` and `password`.\n\nFor development, you may also pass the API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use.\n\n## Quotas\n\nOur 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.\n"
version: v3.0.3
license:
name: LILT Platform Terms and Conditions
url: https://lilt.com/lilt-platform-terms-and-conditions
servers:
- url: https://api.lilt.com
security:
- BasicAuth: []
- ApiKeyAuth: []
tags:
- name: Jobs
paths:
/v2/jobs:
get:
tags:
- Jobs
summary: Retrieve all Jobs
description: 'Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API.
Example CURL command:
```bash
curl -X GET ''https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false''
```'
operationId: retrieveAllJobs
parameters:
- name: isArchived
in: query
description: Retrieves all jobs that are archived.
schema:
type: boolean
- name: isDelivered
in: query
description: Retrieves all jobs that are delivered.
schema:
type: boolean
- name: offset
in: query
description: Return jobs starting at the offset row. If not given the default offset will be 0.
schema:
minimum: 0
type: integer
- name: limit
in: query
description: The maximum number of jobs to be returned. If not given the default limit will be 25.
schema:
maximum: 50
type: integer
responses:
'200':
description: A list of Job objects.
content:
application/json:
schema:
title: JobsResponse
type: array
items:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
tags:
- Jobs
summary: Create a Job
description: "Create a Job. A Job is a collection of Projects.\nA Job will contain multiple projects, based on the language pair.\nA Project is associated with exactly one Memory.\n\nJobs appear in the Jobs dashboard of the web app.\n\nExample CURL command:\n\n```bash\ncurl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"test job\",\n \"fileIds\": [5009, 5010, 5011],\n \"due\": \"2022-05-05T10:56:44.985Z\",\n \"srcLang\": \"en\",\n \"srcLocale\": \"US\",\n \"languagePairs\": [\n { \"memoryId\": 3121, \"trgLang\": \"de\" },\n { \"memoryId\": 2508, \"trgLang\": \"fr\" },\n { \"memoryId\": 3037, \"trgLang\": \"zh\" }\n ]\n}'\n```\n\n"
operationId: createJob
requestBody:
description: The Job resource to create.
content:
application/json:
schema:
title: JobCreateParameters
required:
- fileIds
- languagePairs
- name
- srcLang
- srcLocale
type: object
properties:
name:
type: string
description: A name for the Job.
example: My new Job
languagePairs:
type: array
description: Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId.
items:
$ref: '#/components/schemas/LanguagePair'
fileIds:
type: array
description: A list of file ids to upload to job creation.
example:
- 298
- 299
items:
type: integer
due:
type: string
description: An ISO string date representing job due date.
example: '2021-10-05T14:48:00.000Z'
srcLang:
type: string
description: 2-letter ISO source language code
example: en
srcLocale:
type: string
description: 2-letter source language code
example: US
isPlural:
type: boolean
description: A boolean value representing if the files have plurals.
example: true
workflowTemplateId:
type: integer
description: ID of the workflow template to be used. Use the [workflows templates endpoint](#tag/Workflows/operation/getWorkflowTemplates) to get the list of available workflows.
domainId:
type: integer
description: ID of the domain to be used. Use the [domains endpoint](#tag/Domains/operation/getDomains) to get the list of available domains.
example: 1
required: true
responses:
'200':
description: A Job object.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codegen-request-body-name: body
/v2/jobs/{jobId}:
get:
tags:
- Jobs
summary: Retrieve a Job
description: 'Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path.
Example CURL command:
```bash
curl -X GET ''https://api.lilt.com/v2/jobs/{id}?key=API_KEY''
```'
operationId: getJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: A job object.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- Jobs
summary: Update a Job
description: "Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path.\n\nYou can update job's name and due date by passing the property and new value in the body.\n\nExample CURL command:\n\n```bash\ncurl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"test job\",\n \"due\": \"2022-05-05T10:56:44.985Z\"\n}'\n```"
operationId: updateJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
requestBody:
description: The Job resource to update.
content:
application/json:
schema:
title: JobUpdateParameters
type: object
properties:
name:
type: string
description: A name for the Job.
example: My new Job
due:
type: string
format: date-time
description: An ISO string date.
example: '2021-10-05T14:48:00.000Z'
isProcessing:
type: string
description: 'The processing status of the job. Provide one of the following
integers to indicate the status.
Ok = 0
Started = 1
ExportError = -2
'
example: ExportError
enum:
- '0'
- '1'
- '-2'
processingErrorMsg:
type: string
description: The processing error message.
example: Authentication failed. Check your Contentful API Key.
required: false
responses:
'200':
description: A job object.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codegen-request-body-name: body
delete:
tags:
- Jobs
summary: Delete a Job
description: 'Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job''s translation memories.
Example CURL command:
```bash
curl -X DELETE ''https://api.lilt.com/v2/jobs/{id}?key=API_KEY''
```'
operationId: deleteJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: A status object.
content:
application/json:
schema:
title: JobDeleteResponse
type: object
properties:
id:
type: integer
description: A unique Project identifier.
example: 241
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/jobs/{jobId}/stats:
get:
tags:
- Jobs
summary: Retrieve Job Leverage Stats
description: 'Get the TM leverage stats for the job (new/exact/fuzzy matches).
Example CURL command:
```bash
curl -X GET ''https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY''
```'
operationId: getJobLeverageStats
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: A job leverage stats object.
content:
application/json:
schema:
$ref: '#/components/schemas/JobLeverageStats'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/jobs/{jobId}/archive:
post:
tags:
- Jobs
summary: Archive a Job
description: 'Set job to archived, unassign all linguists and archive all projects and documents inside the job.
It will return the archived job.
Example CURL command:
```bash
curl -X POST ''https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY''
```'
operationId: archiveJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: A job object.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/jobs/{jobId}/unarchive:
post:
tags:
- Jobs
summary: Unarchive a Job
description: 'Set job to unarchived, the job will move to active status.
Example CURL command:
```bash
curl -X POST ''https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY''
```'
operationId: unarchiveJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: A job object.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/jobs/{jobId}/deliver:
post:
tags:
- Jobs
summary: Deliver a Job
description: 'Set the job state to delivered and set all the projects in the job to done
It will return the delivered job.
Example CURL command:
```bash
curl -X POST ''https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY''
```'
operationId: deliverJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: A job object.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/jobs/{jobId}/reactivate:
post:
tags:
- Jobs
summary: Reactivate a Job
description: 'Set the job state to active. Does not change the state of projects associated with the given job.
It will return the reactivated job.
Example CURL command:
```bash
curl -X POST ''https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY''
```'
operationId: reactivateJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: A job object.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/jobs/{jobId}/export:
get:
tags:
- Jobs
summary: Export a Job
description: 'Prepare job files for download.
To export translated documents from the job use the query parameter `type=files`:
Example CURL command:
```bash
curl -X GET ''https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files''
```
To export job memories use the query parameter `type=memory`.
The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress,
`0` when idle and `-2` when the export failed.'
operationId: exportJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
- name: type
in: query
description: category for files and memory.
required: true
schema:
type: string
responses:
'200':
description: 200 status.
content: {}
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/jobs/{jobId}/download:
get:
tags:
- Jobs
summary: Download a Job
description: 'Make sure you have exported a job with the same id before using this api.
Downloading files requires the exported job `id` in the param.
Example CURL command:
```bash
curl -X GET ''https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY''
```'
operationId: downloadJob
parameters:
- name: jobId
in: path
description: A job id.
required: true
schema:
type: integer
responses:
'200':
description: zipped file
content:
application/octet-stream:
schema:
type: string
format: byte
'401':
$ref: '#/components/responses/UnauthorizedError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
LanguagePair:
required:
- memoryId
- trgLang
type: object
properties:
trgLang:
type: string
description: Target language, an ISO 639-1 language identifier.
example: de
trgLocale:
type: string
description: A locale identifier, supported for target language.
example: DE
dueDate:
type: string
description: An ISO date.
example: '2021-10-03T13:43:00.000Z'
memoryId:
type: integer
description: A unique number identifying the associated Memory.
example: 1241
externalModelId:
type: integer
description: An optional parameter to specify a third-party model ID to use for translation. This allows you to use external MT providers instead of Lilt's built-in MT system.
example: 44
pretranslate:
type: boolean
description: Attribute translation authorship of exact matches to the creator of the document being pretranslated.
autoAccept:
type: boolean
description: Accept and lock exact matches.
example: true
caseSensitive:
type: boolean
description: Use case sensitive translation memory matching.
takeMatchAttribution:
type: boolean
description: Use MT for unmatched segments.
example: true
configId:
type: integer
description: Configuration id
example: 2332
workflowTemplateId:
type: integer
description: Workflow Template id, to assign a specific Workflow to the project created out of this Language Pair. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the Job level workflowTemplateId will be used.
example: 14
workflowTemplateName:
type: integer
description: Workflow Template Name, when passed with TeamId it allows for an on the fly look up of the correct WorkflowTemplate to use. If workflowTemplateId is passed the workflowTemplateId supercedes other lookups.
workflowStageAssignments:
type: array
items:
$ref: '#/components/schemas/WorkflowStageAssignment'
description: 'A language pair couples the source and target language along with memory and pre-translations settings associated to a project.
'
WorkflowStageAssignment:
required:
- workflowStageTemplateId
type: object
properties:
workflowStageTemplateId:
type: integer
example: 12345
userId:
type: integer
example: 123
email:
type: string
example: username@domain.com
description: An assignment object that associates a user to a workflow stage template.
Error:
type: object
properties:
message:
type: string
description: A human-readable message describing the error.
description: 'Response in the event of an unexpected error.
'
example:
message: Internal server error.
JobStats:
type: object
properties:
exactWords:
type: integer
description: Total number of exact words.
example: 0
fuzzyWords:
type: integer
description: Total number of fuzzy words.
example: 0
newWords:
type: integer
description: Total number of fuzzy words.
example: 0
numDeliveredProjects:
type: integer
description: Total number of delivered projects.
example: 0
numLanguagePairs:
type: integer
description: Total number of delivered projects.
example: 0
numProjects:
type: integer
description: Total number of projects.
example: 0
percentReviewed:
type: integer
description: Overall percentage of documents reviewed.
example: 0
percentTranslated:
type: integer
description: Overall percentage of documents translated.
example: 0
projects:
type: array
items:
$ref: '#/components/schemas/JobProject'
sourceWords:
type: integer
description: Total number of source words.
example: 0
uniqueLanguagePairs:
type: integer
description: Number of unique language pairs.
example: 1
uniqueLinguists:
type: integer
description: Number of unique linguists.
example: 1
workflowStatus:
type: string
description: The status of the Workflow for the current job.
example: READY_TO_START
enum:
- READY_TO_START
- IN_PROGRESS
- DONE
description: 'A job stats shows an overview of job''s statistical data including total number of exact words, fuzzy words, language pairs, projects, etc.
'
Job:
type: object
properties:
name:
type: string
description: A name for the job.
example: My New Job
creationStatus:
type: string
description: Status of job creation process that includes PENDING, COMPLETE, and FAILED.
example: COMPLETE
deliveredAt:
type: string
format: date-time
example: '2021-06-03T13:43:00Z'
status:
type: string
description: Current status of job that includes archived, delivered, and active.
example: active
due:
type: string
description: An ISO string date.
format: date-time
example: '2021-06-03T13:43:00Z'
id:
type: integer
description: An id for the job.
example: 241
isProcessing:
type: integer
description: Values include `1` while in progress, `0` when idle and `-2` when processing failed.
example: 0
stats:
$ref: '#/components/schemas/JobStats'
domains:
type: array
description: Domains associated with this Job. Returned on the `GET /v2/jobs/{jobId}` response so callers can drive domain-specific behaviour (e.g. quality thresholds) without falling back to BigQuery.
items:
$ref: '#/components/schemas/JobDomain'
description: 'A Job is a collection of multiple Projects. Each project is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created.
'
JobLeverageStats:
type: object
properties:
sourceWords:
type: integer
description: Total number of source words.
example: 0
exactWords:
type: integer
description: Total number of exact words.
example: 0
fuzzyWords:
type: integer
description: Total number of fuzzy words.
example: 0
newWords:
type: integer
description: Total number of new words.
example: 0
projects:
type: array
items:
$ref: '#/components/schemas/ProjectStats'
description: 'A job leverage stats object shows an overview of job''s statistical data
including total number of exact words, fuzzy words, and exact words for
the job in total and for each project.
'
ProjectStats:
required:
- exactWords
- fuzzyWords
- id
- newWords
- sourceWords
type: object
properties:
id:
type: integer
example: 1
sourceWords:
type: integer
example: 1000
exactWords:
type: integer
example: 800
fuzzyWords:
type: integer
example: 150
newWords:
type: integer
example: 50
JobDomain:
type: object
description: A domain assigned to a Job.
properties:
id:
type: integer
description: A unique number identifying the Domain.
example: 12
name:
type: string
description: The Domain name.
example: Marketing
required:
- id
- name
JobProject:
type: object
properties:
id:
type: integer
description: An id for the project.
srcLang:
type: string
description: Source language, an ISO 639-1 language identifier.
example: en
srcLocale:
type: string
description: A locale identifier, supported for source language.
example: US
trgLang:
type: string
description: Target language, an ISO 639-1 language identifier.
example: fr
trgLocale:
type: string
description: A locale identifier, supported for target language.
example: CA
name:
type: string
description: A name for the project.
example: My new project
due:
type: string
description: An ISO date.
example: '2021-10-03T13:43:00.000Z'
isComplete:
type: boolean
description: A state that checks project was completed.
example: false
isArchived:
type: boolean
description: The archived state of the project.
example: false
state:
type: string
description: Current state of the project. Example, backlog, inProgress, inReview, done.
example: inProgress
numSourceTokens:
type: integer
description: Total number of source tokens.
example: 2134
createdAt:
type: string
description: Time at which the object was created.
example: '2021-04-01T13:43:00.000Z'
updatedAt:
type: string
description: Time at which the object was updated.
example: '2021-06-03T13:43:00.000Z'
isDeleted:
type: boolean
description: A state that checks project was deleted.
example: false
memoryId:
type: integer
description: A unique number identifying the associated Memory.
example: 2134
workflowStatus:
type: string
description: The status of the Workflow for the current project.
example: READY_TO_START
enum:
- READY_TO_START
- IN_PROGRESS
- DONE
workflowName:
type: string
description: Human readable name of the workflow associated with the current project.
example: Translate > Review > Analyst Review
description: 'A job project contains project statistical data that belongs to a specific job.
'
responses:
UnauthorizedError:
description: Unauthorized
content:
application/octet-stream:
schema:
type: string
text/plain:
schema:
type: string
securitySchemes:
BasicAuth:
type: http
scheme: basic
ApiKeyAuth:
type: apiKey
name: key
in: query