Skip to main content

Flex Project Assets

Flex Asset Management

Manage assets (images, videos, documents, and other files) associated with translation segments in Flex documents. This API enables uploading, downloading, listing, and deleting assets that provide visual context or reference materials for translators and reviewers working with Flex string-based translation workflows.

Overview

The Flex Assets API allows you to attach files to specific segments within Flex documents. Assets are stored in the document's reference material folder and can be organized using relative paths for better file management. This feature is particularly valuable for software localization, game localization, and CMS integrations where visual context enhances translation quality in continuous translation workflows.

Key Features

  • File Upload: Upload assets to specific segments with support for various file types

  • Organized Storage: Use relative paths to organize files in folders within segment directories

  • Multi-language Support: Associate assets with specific locales or keep them language-neutral

  • Bulk Operations: List assets across multiple segments efficiently

  • Access Control: Proper permission checking based on Flex document access rights

Storage Structure

Assets are stored following this hierarchical structure within the Flex document's reference material:

CODE
{reference material}/assets/{document ID}/{segment ID % 1000}/{segment ID}/

With locale-specific storage:

CODE
{reference material}/assets/{document ID}/{segment ID % 1000}/{segment ID}/{locale}/

With relative paths:

CODE
{reference material}/assets/{document ID}/{segment ID % 1000}/{segment ID}/{locale}/{relativePath}/

Available Endpoints

Method

Endpoint

Description

POST

/api/apps/wbflex/documents/{id}/assets/{segmentid}

Upload asset to segment

GET

/api/apps/wbflex/documents/{id}/assets/{segmentid}

Download specific asset

GET

/api/apps/wbflex/documents/{id}/assets/{segmentid}/list

List all assets in segment

GET

/api/apps/wbflex/documents/{id}/assets/list

List assets for multiple segments

DELETE

/api/apps/wbflex/documents/{id}/assets/{segmentid}

Delete specific asset or all assets in segment

Prerequisites

Before uploading assets, files must first be uploaded using the media upload API:

CODE
POST /api/media/upload?filename={filename}

This returns a filetoken that is then used in the asset upload request.

File Path Flexibility

The API supports flexible file organization:

  • Via Parameter: Use the relativePath parameter to specify folder structure

  • Via Filename: Include the path directly in the filename (e.g., "images/screenshot.jpg")

  • Precedence: When both are provided, relativePath takes precedence

Access Rights

Users must have appropriate access rights to the Flex document to perform asset operations. The system automatically validates permissions based on the user's access to the specified Flex document.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.