Search translation memory
Overview
Runs an asynchronous TMX export based on optional wildcard/phrase queries and optional metadata filters.
The job streams filtered translation units into TMX via the downstream /export_tmx_by_query endpoint.
Use downloadExport/{asyncRequestId} to fetch the finished file.
Flow
- Caller posts
ExportByQueryDto. - Service queues backend export (job metadata marks it asynchronous).
- Response contains
asyncRequest+asyncExportdescriptors so you can poll or receive callbacks.
queries + queryLangs — intersection (AND), optional
queriesandqueryLangsare optional and must align 1-to-1 when provided.- Each pair applies a search expression to its locale. Multiple pairs are AND-intersected: a TU must satisfy every pair (it must have a TUV in each pair’s locale that matches the query).
- Query values: unquoted text = contains; quoted text = phrase;
*/?wildcards (max 5/10); no regex/boolean operators. "*"means match-all but the locale filter still applies — the TU must have a TUV in that locale (real AND constraint).""(empty string) or null means no constraint — that pair is ignored entirely and does not participate in the AND. Sending all-empty queries is the same as omittingqueriesaltogether.- When
queriesis omitted or all entries are empty/null, the export falls through to OR-over-exportTargetLangs(see below).
exportTargetLangs — disjunction (OR), optional
- Controls which target TUVs are written to the TMX. A TU is kept if it has at least one TUV matching any of the listed locales.
null/ omitted — no locale filter; the whole TU is exported with all its target TUVs.- Present but empty (or all entries invalid) — produces an empty TMX (not the same as null).
- To export TUs updated in any of N languages (OR semantics), put the N locales in
exportTargetLangsand leavequeries/queryLangsempty — do NOT put them inqueries/queryLangs(that would AND them).
Examples
Export TUs that have an es or de TUV (OR — recommended for multi-language sync):
{ "exportTargetLangs": ["es_es","de_de"] }
Export TUs that have BOTH es AND de TUVs (AND):
{ "queries": ["*","*"], "queryLangs": ["es_es","de_de"], "exportTargetLangs": ["es_es","de_de"] }
Filtering
- Timestamp bounds (
createdAtMin/Max,modifiedAtMin/Max) and author filters (createdBy,modifiedBy) narrow the TU set before export.
Output & limits
- Output is always TMX, streamed in chunks; filenames follow
dto.filenamewhen provided, otherwise backend defaults. - Requests with excessive locales or wildcard limit violations reject with
400. - If no matches remain after filtering, the job still produces an empty TMX.
Callbacks & polling
- Provide
callbackUrlto receive completion notification from the async mediator; otherwise pollasyncRequestvia standard async APIs and download through/downloadExport/{asyncRequestId}when ready.
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
Export by query request payload
Request body for exportByQueryAsync; specifies query expressions, locales and optional filters
Callback URL to notify when the async export completes
Maximum segment creation timestamp filter
Minimum segment creation timestamp filter
Target locale(s) for the exported TMX. Optional — if omitted, all target TUVs are exported (OR/disjunction). TUs are kept when they have at least one TUV matching any listed locale.
Custom filename for the exported TMX file
Maximum segment last-modified timestamp filter
Minimum segment last-modified timestamp filter
Reference to an object by its unique identifier
Search query strings (one per queryLangs entry). Optional — if omitted or empty, exports all TUs matching targetLocales (OR). When provided, multiple entries are AND-intersected: a TU must satisfy every query. An empty string "" or null entry is ignored (no constraint for that locale); use "*" to require a TUV to exist in a locale without filtering by text.
Locale for each corresponding queries entry (aligned 1-to-1). Optional — required only when queries is provided; must have the same number of entries.