File processing metadata
curl --request GET \
--url https://eu.phrase.com/smt/api/v1/fileTranslations/{uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}', 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://eu.phrase.com/smt/api/v1/fileTranslations/{uid}",
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: Bearer <token>"
],
]);
$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://eu.phrase.com/smt/api/v1/fileTranslations/{uid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uid": "random-uid",
"actions": [
{
"actionType": "MT_GENERIC_PRETRANSLATE",
"results": [
{
"id": "random-uid",
"sourceLang": "en",
"targetLang": "cs",
"status": "OK",
"errorMessage": "MT engine returned an error"
}
]
}
],
"metadata": {
"sourceLang": {
"code": "cs"
},
"targetLangs": [
{
"code": "cs"
}
],
"actionTypes": [
"MT_GENERIC_PRETRANSLATE"
],
"callbackUrl": "<string>",
"mtSettings": {
"usePhraseMTSettings": true,
"profile": {
"uid": "CFUki8ptanoz1WAIYoXSH4"
}
},
"transMemoriesConfig": [
{
"targetLang": {
"code": "cs"
},
"transMemories": [
{
"transMemory": {
"uid": "<string>"
},
"tmMode": [
"PRETRANSLATE"
],
"tmSourceLocale": {
"code": "cs"
},
"tmTargetLocale": {
"code": "cs"
}
}
]
}
],
"termBasesConfig": [
{
"termBases": [
{
"termBase": {
"uid": "<string>"
}
}
]
}
],
"contentGroup": {
"uid": "ckh83nfj20001qz7fqf9k3l2"
}
}
}File translations
File processing metadata
Allows the fetching of metadata from the processing file. The completed file can be downloaded using the File download endpoint.
GET
/
v1
/
fileTranslations
/
{uid}
File processing metadata
curl --request GET \
--url https://eu.phrase.com/smt/api/v1/fileTranslations/{uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}', 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://eu.phrase.com/smt/api/v1/fileTranslations/{uid}",
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: Bearer <token>"
],
]);
$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://eu.phrase.com/smt/api/v1/fileTranslations/{uid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/smt/api/v1/fileTranslations/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uid": "random-uid",
"actions": [
{
"actionType": "MT_GENERIC_PRETRANSLATE",
"results": [
{
"id": "random-uid",
"sourceLang": "en",
"targetLang": "cs",
"status": "OK",
"errorMessage": "MT engine returned an error"
}
]
}
],
"metadata": {
"sourceLang": {
"code": "cs"
},
"targetLangs": [
{
"code": "cs"
}
],
"actionTypes": [
"MT_GENERIC_PRETRANSLATE"
],
"callbackUrl": "<string>",
"mtSettings": {
"usePhraseMTSettings": true,
"profile": {
"uid": "CFUki8ptanoz1WAIYoXSH4"
}
},
"transMemoriesConfig": [
{
"targetLang": {
"code": "cs"
},
"transMemories": [
{
"transMemory": {
"uid": "<string>"
},
"tmMode": [
"PRETRANSLATE"
],
"tmSourceLocale": {
"code": "cs"
},
"tmTargetLocale": {
"code": "cs"
}
}
]
}
],
"termBasesConfig": [
{
"termBases": [
{
"termBase": {
"uid": "<string>"
}
}
]
}
],
"contentGroup": {
"uid": "ckh83nfj20001qz7fqf9k3l2"
}
}
}Authorizations
Path Parameters
UID of the operation. See File translations endpoint.
Response
Returns metadata of previously created translation request by requests unique identifier.
UID of the operation. UID can be used to query the result.
Example:
"random-uid"
Results for each requested action type, ordered as submitted.
Minimum array length:
1Show child attributes
Show child attributes
Echo of the request metadata as stored by TMS.
Show child attributes
Show child attributes
Was this page helpful?