Monitor file translation
curl --request GET \
--url https://api.lilt.com/v2/translate/file \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/translate/file"
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/translate/file', 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/translate/file",
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/translate/file"
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/translate/file")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/translate/file")
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": 1,
"fileId": "2,",
"status": "InProgress",
"createdAt": 1609357135
}
]"<string>"{
"Unsupported_file_type": {
"message": "Customer gave us garbage."
},
"File_extraction_error": {
"message": "Customer gave us garbage."
},
"No_translatable_content": {
"message": "Customer gave us an empty file."
},
"Batch_MT_initiation_failure": {
"message": "Something is wrong with MT."
},
"Batch_MT_response_failure": {
"message": "Something is wrong with MT."
},
"File_reassembly_error": {
"message": "We couldn't put the translated file back together.(okapi error)"
},
"Billing_error": {
"message": "We couldn't log the information about the MT to our billing system."
},
"Invalid_memory": {
"message": "Something is wrong with the memory."
},
"Storage_error": {
"message": "Error occurred interacting with file storage."
}
}Translate
Monitor file translation
Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided.
Example CURL:
curl -X GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress'
GET
/
v2
/
translate
/
file
Monitor file translation
curl --request GET \
--url https://api.lilt.com/v2/translate/file \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/translate/file"
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/translate/file', 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/translate/file",
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/translate/file"
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/translate/file")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/translate/file")
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": 1,
"fileId": "2,",
"status": "InProgress",
"createdAt": 1609357135
}
]"<string>"{
"Unsupported_file_type": {
"message": "Customer gave us garbage."
},
"File_extraction_error": {
"message": "Customer gave us garbage."
},
"No_translatable_content": {
"message": "Customer gave us an empty file."
},
"Batch_MT_initiation_failure": {
"message": "Something is wrong with MT."
},
"Batch_MT_response_failure": {
"message": "Something is wrong with MT."
},
"File_reassembly_error": {
"message": "We couldn't put the translated file back together.(okapi error)"
},
"Billing_error": {
"message": "We couldn't log the information about the MT to our billing system."
},
"Invalid_memory": {
"message": "Something is wrong with the memory."
},
"Storage_error": {
"message": "Error occurred interacting with file storage."
}
}Authorizations
Query Parameters
Response
Translation Info
Was this page helpful?

