curl --request GET \
--url https://api.lilt.com/v2/files \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/files"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lilt.com/v2/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lilt.com/v2/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lilt.com/v2/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lilt.com/v2/files")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"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"
}
]"<string>"This response has no body data.This response has no body data.{
"message": "Internal server error."
}Retrieve a File
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 id request parameter. To retrieve all files, omit the id request parameter.
Example CURL command:
curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274
curl --request GET \
--url https://api.lilt.com/v2/files \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/files"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lilt.com/v2/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lilt.com/v2/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lilt.com/v2/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lilt.com/v2/files")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"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"
}
]"<string>"This response has no body data.This response has no body data.{
"message": "Internal server error."
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Query Parameters
A unique File identifier.
One or more labels. This will return the files which contain all of the given labels.
Response
A list of files.
A unique number identifying the SourceFile.
46530
The file name.
"en_US.json"
A unique hash value associated with the file. An MD5 hash of the file content will be used by default.
"3858f62230ac3c915f300c664312c63f"
Language associated with the file.
"de"
Confidence score for the language associated with the file.
0.7
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.
"REFERENCE"
The list of labels associated with the file.
[]
Time at which the object was created.
"2019-10-16T22:12:34Z"
Time at which the object was created.
"2019-10-16T22:12:34Z"
Was this page helpful?

