Retrieves a list of all assets attached to a specific segment in a Flex document, including their metadata and download URLs.
URL
(GET) /api/apps/wbflex/documents/{id}/assets/{segmentid}/list
PARAMETERS
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
id (URL) |
string |
Mandatory |
The unique Flex document identifier |
|
segmentid (URL) |
int |
Mandatory |
The unique segment identifier to list assets from |
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
curl --location '{{URL}}/api/apps/wbflex/documents/19914/assets/27667833/list' \
--header 'X-Auth-Token: {{AUTH_TOKEN}}' \
--header 'X-Auth-AccountId: {{ACCOUNT_ID}}'
RESULTS
The response contains a JSON array of asset objects. 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 assets |
|
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
[
{
"projectId": 7214,
"documentId": "19914",
"segmentId": 27667833,
"locale": "en",
"relativePath": "public\\views",
"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&relativePath=public%5Cviews"
}
]
USAGE NOTES
-
Returns an empty array [] if no assets are attached to the segment
-
Assets from all locales (if any) are included in the response
-
The downloadUrl can be used directly to retrieve the asset content
-
Multiple assets can exist in the same segment with different filenames or locales