Skip to main content

[Flex] List Assets for Multiple Segments

Retrieves a list of all assets attached to multiple segments in a Flex document in a single request, including their metadata and download URLs.

URL

(GET) /api/apps/wbflex/documents/{id}/assets/list

PARAMETERS

Parameter

Type

Required

Description

id (URL)

string

Mandatory

The unique Flex document identifier

segmentIds (Query)

string

Mandatory

Comma-separated list of segment IDs to retrieve assets from. Example: 27667833,27667834

ACCESS RIGHTS

The user must have access rights to the Flex document. The system checks document-level permissions to ensure the user can list assets from the specified document.

EXAMPLE REQUEST

CODE
curl --location '{{URL}}/api/apps/wbflex/documents/19914/assets/list?segmentIds=27667833%2C27667833' \
--header 'X-Auth-Token: {{AUTH_TOKEN}}' \
--header 'X-Auth-AccountId: {{ACCOUNT_ID}}'

RESULTS

The response contains a JSON array of asset objects from all specified segments. Each asset object has the following properties:

Property

Type

Description

projectId

int

The project identifier associated with the Flex document

documentId

string

The Flex document identifier

segmentId

int

The segment identifier containing the asset

locale

string?

The language code if the asset is associated with a specific language

relativePath

string

The relative path within the segment's asset folder. Empty string if the asset is stored at the root level

fileName

string

The stored filename

fileSizeInBytes

int

The file size in bytes

contentType

string

The MIME type of the asset file

createdDate

datetime

ISO 8601 timestamp when the asset was first created

modifiedDate

datetime

ISO 8601 timestamp when the asset was last modified

downloadUrl

string

Direct URL to download the asset. Includes document ID, segment ID, locale, filename, and relativePath parameters

EXAMPLE RESPONSE

CODE
[
    {
        "projectId": 7214,
        "documentId": "19914",
        "segmentId": 27667833,
        "locale": "en",
        "relativePath": "",
        "fileName": "pexels-gons2.jpg",
        "fileSizeInBytes": 2268156,
        "contentType": "image/jpeg",
        "createdDate": "2025-07-27T15:58:53.4687698Z",
        "modifiedDate": "2025-07-27T16:14:48.0402178Z",
        "downloadUrl": "http://{{URL}}/api/apps/wbflex/documents/19914/assets/27667833?locale=en&filename=pexels-gons2.jpg"
    }
]

USAGE NOTES

  • Returns an empty array [] if no assets are found in any of the specified segments

  • Assets from all specified segments are combined in a single response

  • The segmentIds parameter accepts comma-separated integer values

  • Duplicate segment IDs are automatically removed from the request

  • An error is returned if segmentIds is empty or contains invalid values

  • User must have access to the Flex document to retrieve assets from any of its segments

JavaScript errors detected

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

If this problem persists, please contact our support.