Memories

File import for a Memory

Changed on

Imports common translation memory or termbase file formats to a specific LILT memory. Currently supported file formats are *.tmx, *.sdltm, *.sdlxliff(With custom Filters), '*.xliff', and *.tmq for TM data; *.csv and *.tbx for termbase data. Request parameters should be passed as JSON object with the header field LILT-API.

Example CURL command to upload a translation memory file named my_memory.sdltm in the current working directory:

  curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \
    --header "LILT-API: {\"name\": \"my_memory.sdltm\",\"memory_id\": 42}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @my_memory.sdltm

Example CURL command to upload a translation memory file named my_memory.sdlxliff in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments.

  curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \
    --header "LILT-API: {\"name\": \"my_memory.sdlxliff\",\"memory_id\": 12,\"sdlxliff_filters\":[{\"conf_name\": \"Translated\", \"percentage\": 100, \"allow_unlocked\": false}]"}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @my_memory.sdlxliff
post/v2/memories/import

Request

  • Base URL
    https://api.lilt.com
  • URL
    https://api.lilt.com/v2/memories/import
  • Auth
    HTTP basic

Headers

memory_idinteger required

A unique Memory identifier.

namestring required

Name of the TM or termbase file.

confName'Translated' | 'Draft' | 'ApprovedTranslation' | 'Locked' | 'SignedOff' required

the current state of the SDLXLIFF Trans Unit.

allowablePercentageinteger

This represents for the current conf_name what percentage the filter applies to. If you pass -1 it will take any value for this field and won't ignore blank values. If you pass 50, Lilt will only import Segments that have a 50 percent match or better.

allowUnlockedSegmentsboolean

Boolean that tells Lilt whether we should allow unlocked Segments for this conf_name.

Contains Filter information Unique to SDLXLIFF

has_header_rowboolean

A flag indicating whether an imported Termbase CSV has a header row or not (the default value is false).

skip_duplicatesboolean

A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is false).

Request body application/octet-stream

string binary required

Response

A status object.

idinteger

A unique Memory identifier.

isProcessinginteger

The current state of the import.

Example response

{
  "id": 123,
  "isProcessing": 1
}

Changes

    • breaking

      added the new required header request parameter memory_id

    • breaking

      added the new required header request parameter name

    • breaking

      added required request body

    • info

      api operation id importMemoryFile was added

    • info

      added the new optional header request parameter has_header_row

    • info

      added the new optional header request parameter sdlxliff_filters

    • info

      added the new optional header request parameter skip_duplicates

    • info

      added the non-success response with the status

    • info

      added the success response with the status