- General Information
- Connecting Third-party Systems
- crossConnect for content systems
- crossConnect for External Editing
- Purpose and usage
- Requirements
- Implementation
- Across XLIFF format
- Across-specific Extensions
- <xliff> Element Attributes
- <file> Element Extensions
- <trans-unit> Element Extension
- Paragraph States
- Paragraph State Flags
- <source> and <target> Element Content
- <bpt> Element Attributes
- <ph> Element Attributes
- <x> Element Attributes
- Across-specific Properties
- Analysis Results
- Sample Files
- Across XLIFF - import, export and segmentation
- Context information
- Exporting best matches in Across XLIFF
- Hyperlinks to XLIFF
- Secure file handling with C#
- Secure file handling with JAVA
- Workflow and vendor configuration
- Sample code - Integrated solution
- Across XLIFF format
- Generic File Connector
- Display Texts
- APIs
- APIs - Technology
- crossTank API v1
- crossTank API v2
- crossTerm API v1
- crossTerm API v2
- crossAPI SI
- Requirements
- Function Return Types
- crossAPI SI and Java
- List of Objects in crossAPI SI
- Sample - transferring checkout files via FileManager
- Sample - VBS
- Text Preprocessing API
Searching for Translations
Translations can be retrieved via the API either by referencing them directly using their ID or by using a search function.
The search modes Similar search and Concordance search are available via the API, each one either with explicitly defined search filters or by passing the GUID of a predefined filter. See crossTank API v2 - Overview for more details on how the search functions work.
The Across Identity Server grants the application an access token. Each request to the API has to have this token in the header.
Please note that the examples below omit the headers to stay compact.
Example: Simple Search Query (Concordance Search)
A simple search query can be done by specifying a query and a resultLimit. The minimal parameters for the query are a Pattern object containing a Language value and a TargetLanguage value. By setting the TargetLanguage value to 0, it is possible to search for all translations for a given source language.
http://localhost/across/crosstank/api/v2/Translations/concordanceSearch
{ "Pattern": { "Language": 1031 }, "TargetLanguage": 1033 }
Example: Creating Search Filters
Instead of defining filtering criteria for the search explicitly, the API can use predefined search filters. The following example is a filter that limits the search to translations created (DateTimeFilter/FilterMode value 0) between 1/6/2019 and 12/11/2019, with the state MachineTranslated (TranslationStatesFilter value 4) into all languages (TargetLanguage value 0). The request will return the GUID of the created filter which can then be passed to the respective search functions (e.g. /api/v2/Translations/concordanceSearchWithFilter) or be used to delete the filter.
http://localhost/across/crosstank/api/v2/Translations/createSearchFilter
{ "FilterExpirationInMinutes": 0, "TargetLanguage": 0, "DateTimeFilter": { "FilterMode": 0, "Start": "2019-06-01T00:00:00.000Z", "End": "2019-11-12T00:00:00.000Z" }, "TranslationStatesFilter": [ 4 ] }