Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Use to upload a file and synchronize contents with a Flex container. The synchronization is two-way:

  • First, changes from the file can be optionally be pushed into the Flex container.

  • Second, the file contents is updated with the latest translations from the Flex container.

The result is your updated file.

URL

(POST) /api/apps/wbflex/documents/{id}/contents/sync

PARAMETERS

The URL parameters are:

id

Specify either a document ID (such as 1000) or a job ID (such as c300).

string, Mandatory

The BODY must be a JSON object with these properties:

file

A JSON object with the reference to the uploaded file, the parser configuration for content extraction and more. Please see a full list of properties here: Pushing content - "files" property . The file must be uploaded using media/upload to obtain a token, see example below.

Example:

 "file": {
        "token": "{{uploadedFile}}",
        "name": "software-strings.xlsx",
        "formatId": 137,
        "stringKeyPattern": "string-{seq}"
    }

object, Mandatory

push

An optional JSON object that defines how file content is updated to the Flex container. If not specified then no updating will be done. See specifications further down.

Example:

"push": {
    "enabled": true
}

bool, Optional

The push node has these properties:

enabled

Specifies if content shall be synchronized into the Flex container or not.

bool, Mandatory

isPreviewMode

Optional boolean, default is false. If true then the system simulates the update and returns all the details but it will not actually update the Flex container.

bool, Optional

translations

Optional, default is false.

  • false: Update only the source texts from the file into the Flex container. Do not push but only pull translations.

  • true: Update content in target languages from the file into the Flex container. Push and pull source and translations.

The use of true only makes sense for the very initial push of a file or in combination with timestamp. Otherwise, you would overwrite any changes to translations done in the TMS.

bool, Optional

timestamp

Optional date/time.

If specified, then the system will only update source texts or translations if those were last modified prior to this date.

The use case is to prevent erasing changes in the Flex container that are more recent than the changes in the file.

For proper two-way synchronization of translations, this property must be set.

datetime, Optional

RESULTS

  • No labels