Copy/Consolidate resource
Permits to copy (or consoldiate) the contents of a translation memory into another one.
URL
(PUT) resources/{resourceid}/copy
PARAMETERS
token | The token obtained on connection | Required |
resourceid | The id of the resource to copy | Required |
targetresourceid | The id of the resource in which the segments shall be copied | Required |
options | JSON containing options to execute the copy | Required |
JSON format of "options" parameter
sourceLocale | The language that shall be considered as source for the copy. See Languagesfor a list of all supported ISO-2 language codes. | Required |
languagesToCopy | A json array containing a list of language mappings. See below for details.
Example:
languagesToCopy: [ { "locale": "en-GB", "mappedLocale": "en" } ] | Required |
bookmarkExcludeRed | Default: false If true then texts with red bookmark are excluded during copy. | Optional |
skipSourceIsTarget | Default: true If true then translations identical to source are excluded | Optional |
statusExcludeError | Default: true If true then texts in error status are excluded | Optional |
customFields | A json array containing a list of custom field ids and values. See below for details.
Example:
CODE
| Optional |
modifiedFrom | Get texts modified after this date. | Optional |
modifiedTo | Get texts modified before this date. | Optional |
docIds | Optional: A comma-separated list of documents ids. If set, clear word counts for those specific documents only. Identifies document by document id. Example: "docids: 2011,2020,2024" | Optional |
mergeOption | Default: 3 0: Merge new and existing data - Replace existing translations 1: Merge new and existing data - Do not import if translation already exists 2: Do not merge but skip doubles 3: Do not merge and do not look for doubles (fastest!) | Optional |
JSON format of field "customFields"
id | The custom string id such as 'CustomStr1', 'CustomStr2', etc. Use method settings/customfields to obtain all available ids. Note that custom fields may apply to clients only, suppliers only or both (check out the configuration of custom fields in your Wordbee platform). | Required |
value | The value (string) of the custom field | Required |
JSON format of field "languagesToCopy"
locale | The language of the resource from which the segments are copied. See Languages for a list of all supported ISO-2 language codes. | Required |
mappedLocale | The language to map in the target resource. See Languages for a list of all supported ISO-2 language codes. | Required |
RESULTS
The method executes asynchronously. It returns the id of the asynchronous operation or 0 if the operation has completed immediately:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">2147483647</int>
If not 0 then your software should poll the status of the operation every 5 seconds. See Asynchronous operations, operation "asyncoperations/{operationid}/status".