curl --request POST \
--url https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pageNumber": 1,
"pageSize": 50,
"searchInLocale": "<string>",
"query": "<string>",
"showLocales": [
"<string>"
]
}
'import requests
url = "https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments"
payload = {
"pageNumber": 1,
"pageSize": 50,
"searchInLocale": "<string>",
"query": "<string>",
"showLocales": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pageNumber: 1,
pageSize: 50,
searchInLocale: '<string>',
query: '<string>',
showLocales: ['<string>']
})
};
fetch('https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments', 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://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pageNumber' => 1,
'pageSize' => 50,
'searchInLocale' => '<string>',
'query' => '<string>',
'showLocales' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments"
payload := strings.NewReader("{\n \"pageNumber\": 1,\n \"pageSize\": 50,\n \"searchInLocale\": \"<string>\",\n \"query\": \"<string>\",\n \"showLocales\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pageNumber\": 1,\n \"pageSize\": 50,\n \"searchInLocale\": \"<string>\",\n \"query\": \"<string>\",\n \"showLocales\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pageNumber\": 1,\n \"pageSize\": 50,\n \"searchInLocale\": \"<string>\",\n \"query\": \"<string>\",\n \"showLocales\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"content": [
{
"grossScore": 123,
"score": 123,
"segmentId": "<string>",
"source": {
"client": {
"id": 123,
"name": "<string>"
},
"createdAt": 123,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"domain": {
"id": 123,
"name": "<string>"
},
"filename": "<string>",
"id": "<string>",
"key": "<string>",
"lang": "<string>",
"modifiedAt": 123,
"modifiedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"nextSegment": "<string>",
"previousSegment": "<string>",
"project": {
"id": 123,
"name": "<string>",
"uid": "<string>"
},
"rtl": true,
"subDomain": {
"id": 123,
"name": "<string>"
},
"tagMetadata": [
{
"content": "<string>",
"id": "<string>",
"transAttributes": "<string>",
"type": "<string>"
}
],
"text": "<string>"
},
"subSegment": true,
"transMemory": {
"id": "<string>",
"name": "<string>",
"reverse": true,
"uid": "<string>"
},
"translations": [
{
"client": {
"id": 123,
"name": "<string>"
},
"createdAt": 123,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"domain": {
"id": 123,
"name": "<string>"
},
"filename": "<string>",
"id": "<string>",
"key": "<string>",
"lang": "<string>",
"modifiedAt": 123,
"modifiedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"nextSegment": "<string>",
"previousSegment": "<string>",
"project": {
"id": 123,
"name": "<string>",
"uid": "<string>"
},
"rtl": true,
"subDomain": {
"id": 123,
"name": "<string>"
},
"tagMetadata": [
{
"content": "<string>",
"id": "<string>",
"transAttributes": "<string>",
"type": "<string>"
}
],
"text": "<string>"
}
]
}
],
"numberOfElements": 123,
"pageNumber": 123,
"pageSize": 123,
"sort": {
"orders": [
{
"property": "<string>"
}
]
},
"totalElements": 123,
"totalPages": 123
}List translation memory segments
Synchronous, paginated JSON listing of translation memory segments. A blank or ”*” query lists all segments. Available to Admin, Project Manager, Guest, and Linguist roles. Each segment’s tagMetadata holds the actual content behind its inline tags (e.g. locked/non-translatable sub-text, original embedded markup) rather than plain text — see the TagMetadata model for details.
curl --request POST \
--url https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pageNumber": 1,
"pageSize": 50,
"searchInLocale": "<string>",
"query": "<string>",
"showLocales": [
"<string>"
]
}
'import requests
url = "https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments"
payload = {
"pageNumber": 1,
"pageSize": 50,
"searchInLocale": "<string>",
"query": "<string>",
"showLocales": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pageNumber: 1,
pageSize: 50,
searchInLocale: '<string>',
query: '<string>',
showLocales: ['<string>']
})
};
fetch('https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments', 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://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pageNumber' => 1,
'pageSize' => 50,
'searchInLocale' => '<string>',
'query' => '<string>',
'showLocales' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments"
payload := strings.NewReader("{\n \"pageNumber\": 1,\n \"pageSize\": 50,\n \"searchInLocale\": \"<string>\",\n \"query\": \"<string>\",\n \"showLocales\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pageNumber\": 1,\n \"pageSize\": 50,\n \"searchInLocale\": \"<string>\",\n \"query\": \"<string>\",\n \"showLocales\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v2/transMemories/{transMemoryUid}/segments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pageNumber\": 1,\n \"pageSize\": 50,\n \"searchInLocale\": \"<string>\",\n \"query\": \"<string>\",\n \"showLocales\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"content": [
{
"grossScore": 123,
"score": 123,
"segmentId": "<string>",
"source": {
"client": {
"id": 123,
"name": "<string>"
},
"createdAt": 123,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"domain": {
"id": 123,
"name": "<string>"
},
"filename": "<string>",
"id": "<string>",
"key": "<string>",
"lang": "<string>",
"modifiedAt": 123,
"modifiedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"nextSegment": "<string>",
"previousSegment": "<string>",
"project": {
"id": 123,
"name": "<string>",
"uid": "<string>"
},
"rtl": true,
"subDomain": {
"id": 123,
"name": "<string>"
},
"tagMetadata": [
{
"content": "<string>",
"id": "<string>",
"transAttributes": "<string>",
"type": "<string>"
}
],
"text": "<string>"
},
"subSegment": true,
"transMemory": {
"id": "<string>",
"name": "<string>",
"reverse": true,
"uid": "<string>"
},
"translations": [
{
"client": {
"id": 123,
"name": "<string>"
},
"createdAt": 123,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"domain": {
"id": 123,
"name": "<string>"
},
"filename": "<string>",
"id": "<string>",
"key": "<string>",
"lang": "<string>",
"modifiedAt": 123,
"modifiedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"nextSegment": "<string>",
"previousSegment": "<string>",
"project": {
"id": 123,
"name": "<string>",
"uid": "<string>"
},
"rtl": true,
"subDomain": {
"id": 123,
"name": "<string>"
},
"tagMetadata": [
{
"content": "<string>",
"id": "<string>",
"transAttributes": "<string>",
"type": "<string>"
}
],
"text": "<string>"
}
]
}
],
"numberOfElements": 123,
"pageNumber": 123,
"pageSize": 123,
"sort": {
"orders": [
{
"property": "<string>"
}
]
},
"totalElements": 123,
"totalPages": 123
}Authorizations
Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.
Path Parameters
Translation memory UID
Body
Page number, starting with 0, default 0; must be >= 0
x >= 0Page size, accepts values between 1 and 100, default 50
1 <= x <= 100Language to search in.
Search query. When null or blank, "*" is used (matches all segments).
Languages to show in response. When empty or null, all TM languages are used.
Was this page helpful?