Jobs

Updates a job with the new job properties. To update a specific job, you will need the job id in the url path.

You can update job's name and due date by passing the property and new value in the body.

Example CURL command:

curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "test job",
  "due": "2022-05-05T10:56:44.985Z"
}'
put/v2/jobs/{jobId}

Request

Path parameters

jobIdinteger required

A job id.

Request body

namestring

A name for the Job.

duestring date-time

An ISO string date.

isProcessing'0' | '1' | '-2'

The processing status of the job. Provide one of the following integers to indicate the status.

Ok = 0 Started = 1 ExportError = -2

processingErrorMsgstring

The processing error message.

Example request

{
  "name": "My new Job",
  "due": "2021-10-05T14:48:00.000Z",
  "isProcessing": "ExportError",
  "processingErrorMsg": "Authentication failed. Check your Contentful API Key."
}

Response

A job object.

namestring

A name for the job.

creationStatusstring

Status of job creation process that includes PENDING, COMPLETE, and FAILED.

deliveredAtstring date-time
statusstring

Current status of job that includes archived, delivered, and active.

duestring date-time

An ISO string date.

idinteger

An id for the job.

isProcessinginteger

Values include 1 while in progress, 0 when idle and -2 when processing failed.

Example response

{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": "2021-06-03T13:43:00Z",
  "status": "active",
  "due": "2021-06-03T13:43:00Z",
  "id": 241,
  "stats": {
    "projects": [
      {
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "memoryId": 2134,
        "workflowStatus": "READY_TO_START",
        "workflowName": "Translate > Review > Analyst Review"
      }
    ],
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1,
    "workflowStatus": "READY_TO_START"
  },
  "domains": [
    {
      "id": 12,
      "name": "Marketing"
    }
  ]
}

Changes

    • breaking

      added the new path request parameter jobId

    • info

      api operation id updateJob was added

    • info

      added optional request body

    • info

      added the non-success response with the status

    • info

      added the success response with the status