Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

query.ctx

To filter by the context string of a segment. The context may be the style (such as Heading 1 in a Microsoft Word document) or a software string ID.

This element is an object with the following properties:

Optional, object
query.ctx.valueThe string to search. The search is case-insensitive.Mandatory, string
query.ctx.mode

The search mode, any of these options. If missing then uses the "Prefix" mode.

See String filter (Filter) for details.

Optional, string



query.constraints

Optional. To find segments that have or have no size constraint (max or min length in translations).

Missing or null: No filter. True: Segment must have a size constraint. False: Segment must not have a size constraint.

Optional, bool



query.cfs

Optional filter for segment-level custom fields.

A array of custom field filters. Each element filters one custom field value:

  • id: The numeric ID of the custom field. Custom fields have IDs starting at 1. Mandatory.
  • val: The value to find. Mandatory
  • mode: The search mode. Uses "Plain" if not specified. Optional (See text.mode)
    Note: The search is an exact search for pick list custom fields, you can choose the mode for other field types.
  • phrase: Optional phrase match flag. Default is false.

Example to find values prefixed with "Department" in custom text field #1:

Code Block
"cfs": [ { "id": 1, "val": "Department.*", mode: "Regex" }, { "id": 5, "val": "Priority", "phrase": true } ]

When specifying multiple items, all of them must match.

Optional, object[]
query.lbls

Optional filter for segment-level labels.

A array of label filters. Each element filters one label value:

  • id: The numeric ID of the label. Labels have IDs starting at 1. Mandatory.
  • val:
    • The numeric label option to find. Use 0 for the first value option, 1 for the second, etc.
    • Use null to find segments where the label is not set. With labels configured to be always visible, a null-query is equivalent to finding the default value of the label. 

Example:

Code Block
"lbls": [ { "id": 1, "val": 0 }, { "id": 23, "val": 3 }, { "id": 10, "val": null } ]

When specifying multiple items, all of them must match.

Optional, object[]
query.tbx

Optional filter on term-level TBX fields. An array of TBX field and value pairs. Each array element has these properties:

  • id: TheTBX field ID. Mandatory.
  • val: The value to find.
  • mode: Optional search mode. Any of "Plain" (default, prefix search), "Wildcards", "Regex" or "Empty"
  • phrase: Optional phrase match flag. Default is false.

Example:

Code Block
"tbx": [ { "id": "context", "val": "Mechanical" }, { "id": "example", "val": "stru*e", "mode": "Wildcards" } ]


Optional, object[]

...

locs

An array with one or more language codes. With multiple languages, filters apply to either one of the languages (a boolean "OR"). Let us look at an example:

Example 1: Search segments that contain "ministry" in any of the 3 languages:

Code Block
{ 
	"query": {
		"languages": [
    		{ "locs": ["en", "de", "fr"], "text": { "value": "ministry" } }
		]
	}
}


Example 2: Search segments that contain "ministry" in all of the 3 languages:

Code Block
{ 
	"query": {
		"languages": [
    		{ "locs": ["en"], "text": { "value": "ministry" } },
			{ "locs": ["de"], "text": { "value": "ministry" } },
			{ "locs": ["fr"], "text": { "value": "ministry" } }
		]
	}
}



Mandatory, string[]



textOptional filter on the text of the language.Optional, object
text.value

The string to search.

Find any translation containing a word, case insensitive:

Code Block
"text": { "value": "ministry of energy" }

Find all texts starting with:

Code Block
"text": { "value": "Chapter*", "mode": "Wildcards", "case": false, "phrase": true }


Mandatory, string
text.mode

The optional search mode. Uses "Plain" if not specified.

  • Plain: Searches the value. (default)
  • Wildcards: Allows wildcards "*" and "?" in the value.
  • Regex: The value is a regular expression.


Optional, string
text.case

Case sensitive constraint. By default false.

True: Search is case sensitive. False: Search is case insensitive.

Optional, bool
text.phrase

Optional, default is false. If true then the value must match the complete text. If false then the system does an infix search.

With regular expressions or wildcards and phrase set to true: The system automatically prepends and appends * or .*?

Optional, bool



hasText

Optional. Default is null:

  • true: A text must exist
  • false: There must be no text
  • null: No filter


Optional, bool?
hasBadOrMissing

Permits to find erroneous translations:

  • true: Find all translations that are either missing/empty or have a red status
  • false: Find all translated texts and which are not red status
  • null: no filter


Optional, bool?
hasQAError

Filter segments with or without QA error. Optional. Default is null.

True: Segments with QA error. False: Segments without QA error. Any dismissed QA errors are not considered.


Optional, bool?
qaAdvanced filter for QA issues, see Searching - QA issuesOptional, object
status

Filter by status. An optional list of one or more statuses. See Text Status (Enumeration)

  • 0: Neutral status
  • 1: Green status ("OK")
  • 2: Red status ("Problem")


Example:

Code Block
"status": [ 2 ]


Optional, int[]
bookmarks

Filter by bookmark. An optional list of one or more bookmarks. See Text Bookmark (Enumeration)

  • 0: No bookmark set
  • 1: Blue bookmark
  • 2: Red bookmark

Example:

Code Block
"bookmarks": [ 1, 2 ]


Optional, int[]


dttext

Filter on the last text change date. This is an optional object.

See Date filter (Filter) for details.

Examples:

Periods are accumulated. The following finds texts changed the last 3 days:

Code Block
"dttext": { "hours": 48, "days": 1 }

Find changes of October (UTC):

Code Block
"dttext": { "min": "2018-10-1T00:00:00Z", "max": "2018-11-1T00:00:00Z" }


Optional, object
dtflags

Filter on the last status or bookmark change. This is an optional object. The properties are the same as for dttext.

Example for finding any texts changed on or after a date:

Code Block
"dtflags": { "min": "2018-10-26T10:40:00Z" }


Optional, object

lengthMin

lengthMax

Filter on the text length. The following finds all texts between 10 and 20 characters:

Code Block
"lengthMin": 10,
"lengthMax": 20

Find texts with maximum of 10 characters:

Code Block
"lengthMax": 10


Optional, int?

Optional, int?

locked

Filter texts that are explicitly locked or unlocked for editing.

  • True: Only locked texts.
  • False: Only unlocked texts.

Example to find locked texts:

Code Block
"locked": true


Optional, bool?
hasHistory

Filter texts that have a text change history. A text has a history if the first (initial) text, whether typed by a human or coming from a pre-translation, was changed at least once.

Texts with history are generally referred to as post-edited or revised.

True: Only locked texts. False: Only unlocked texts.


Optional, bool?
editors

Filter texts by who is responsible for the latest version. See available options here: Last Editor (Enumeration).

Find all types of pre-translations:

Code Block
"editors": [ 2, 3, 6, 7, 8, 9 ]

Find texts last edited by a human:

Code Block
"editors": [ 1 ]

Optional, INT[]
pastEditors

Filter texts by who has edited a past version of the text. See available options here: Last Editor (Enumeration).

Find any text that was initially a machine translation:

Code Block
"pastEditors": [ 5 ]


Optional, INT[]
users

Filter texts that were last edited by specific users.

Code Block
"users": [ 100, 110 ]


Optional, int[]
repetitions

Permits to find repetitions identified during the last word count (e.g. when marking the file for translation in Codyt). This filter must be set on a target language and NOT the source language. Options are:

  • Identicals: Filter segments that are identical (100% or 110%) repetitions within project
  • NotIdenticals: Filter all segments except those that are identical repetitions within project
  • Any: Filter identical or fuzzy repetitions within project. It depends on the word count configuration whether fuzzy repetitions are identified and down to which similarity threshold.
  • NotAny: Filter all but identical and fuzzy repetitions.


Optional, string?



cfs

Optional filter for language-level custom fields.

A array of custom field filters. Each element filters one custom field value:

  • id: The numeric ID of the custom field. Custom fields have IDs starting at 1. Mandatory.
  • val: The value to find. Mandatory.
    Note: The search is an exact search for pick list custom fields and a prefix search for all other custom field types. Mandatory.
  • mode: Optional search mode. Any of "Plain" (default, prefix search), "Wildcards", "Regex" or "Empty"
  • phrase: Optional phrase match flag. Default is false.

Example to find values prefixed with "Department A" in custom field #1:

Code Block
"cfs": [ { "id": 1, "val": "Department A" }, { "id": 5, "val": "Priority" } ]

When specifying multiple items, all of them must match.


Optional, object[]
lbls

Optional filter for language-level labels.

A array of label filters. Each element filters one label value:

  • id: The numeric ID of the label. Labels have IDs starting at 1. Mandatory.
  • val:
    • The numeric label option to find. Use 0 for the first value option, 1 for the second, etc.
    • Use null to find segments where the label is not set. With labels configured to be always visible, a null-query is equivalent to finding the default value of the label.

Example:

Code Block
"lbls": [ { "id": 1, "val": 0 }, { "id": 23, "val": 3 }, { "id": 10, "val": null } ]

When specifying multiple items, all of them must match.

Optional, object[]
tbx

Optional filter on term-level TBX fields. An array of TBX field and value pairs. Each array element has these properties:

  • id: TheTBX field ID. Mandatory.
  • val: The value to find.
  • mode: Optional search mode. Any of "Plain" (default, prefix search), "Wildcards", "Regex" or "Empty"
  • phrase: Optional phrase match flag. Default is false.

Example:

Code Block
"tbx": [ { "id": "context", "val": "Mechanical" }, { "id": "example", "val": "stru*e", "mode": "Wildcards" } ]


Optional, object[]



dataAny additional string data you want to include for your specific purposes. This is useful if you load/save search profiles resources/segments/search/profiles and you need to persist additional data here.Optional, string?



...