Files

Retrieve a File

Changed on

Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step.

To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter.

Example CURL command:

 curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274
get/v2/files

Request

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

Query parameters

idinteger

A unique File identifier.

labelsstring[]

One or more labels. This will return the files which contain all of the given labels.

Response

A list of files.

idinteger

A unique number identifying the SourceFile.

namestring

The file name.

file_hashstring

A unique hash value associated with the file. An MD5 hash of the file content will be used by default.

detected_langstring

Language associated with the file.

detected_lang_confidencenumber

Confidence score for the language associated with the file.

categorystring

The category of the file. The options are REFERENCE, or API. The default is API. Files with the REFERENCE category will be displayed as reference material.

labelsstring[]

The list of labels associated with the file.

created_atstring date-time

Time at which the object was created.

updated_atstring date-time

Time at which the object was created.

Example response

[
  {
    "id": 46530,
    "name": "en_US.json",
    "file_hash": "3858f62230ac3c915f300c664312c63f",
    "detected_lang": "de",
    "detected_lang_confidence": 0.7,
    "category": "REFERENCE",
    "labels": [],
    "created_at": "2019-10-16T22:12:34Z",
    "updated_at": "2019-10-16T22:12:34Z"
  }
]

Changes

    • info

      api operation id getFiles was added

    • info

      added the new optional query request parameter id

    • info

      added the new optional query request parameter labels

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the success response with the status