This method retrieves a list of components from a Flex document. It includes the number of segments in each component.

Use cases:

  • List all components with total segments each.

  • List all components that contain translations in error status.

  • List all components containing bookmarked translations.


(POST) /api/apps/wbflex/documents/{id}/components


URL Parameters

The URL parameters are:


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

string, Mandatory


The body must contain a JSON object with optional filters.

All filter options are optional. If you do not specify a filter you will receive every single component appearing in the document.

If you specify filters then you will receive the components of the filtered segments.


Optional list of locales. If not specified, the system uses all Flex document target languages.

This property is only used to delimit all other filters below to specific languages. Using more than one language means that a filter must apply in at least one of those languages in a segment for the segment to be retained. It does NOT mean that the filters below must apply to ALL languages!

Example to restrict to 2 languages:

"status": [ "fr", "de" ]



Optional list of numeric translation statuses. See

Example to filter translations with errors (red status):

"status": [ 2 ]

int[]?, Optional


Optional list of numeric bookmark statuses. See

Example to filter translations bookmarked in either gray or blue:

"bookmarks": [ 0, 1 ]

int[]?, Optional


Optional list of component IDs. By default this is null. If specified, the method will only dig into these components.

Example to filter translations bookmarked in either gray or blue:

"components": [ "frontend.module1", "backend.sql", "backend.classes" ]

Note: You can specify up to 500 elements.

string[]?, Optional


Optional filter on components using a prefix, suffix, infix, wildcard or regex pattern.

See for details.

Example to filter all components starting with “frontend.”. It captures “frontend.ux”, “frontend.page1.js” etc.

"component": { "value": "frontend.", "mode": "Prefix" ]


object?, Optional


Optional filter on the last change of a translation or its properties. See details here:

Filter changes at or after October 2021:

"dtchange": { "min": "2021-10-01T00:00:00Z" }

Filter changes since 3 days:

"dtchange": { "days": 3 }

object?, Optional


Optional URL which will be called upon success or failure of operation. This makes polling for results (see below) unnecessary. URL is called as POST request with operation result included in the body, see "RESULTS" chapter below for the JSON format. Suggestion: Include your own references in the URL.

"callbackurl": ""

string?, Optional


Awaiting results

The API method returns an Asynchronous operation result:

{ "trm": { "requestid":32230, "status":"Waiting", "statusText":"Waiting..." } }

You can poll the status or use the callback parameter. When the operation is complete, the results are in the custom property

{ "trm": { "requestid": 32230, "isbatch": false, "status": "Finished", "statusText": "Finished!" }, "custom": { "filetoken": "9ccc2599ac5a4cf99cf7875639ab72c9", "components": 3 } }

The components is the total number of filtered components. To download the actual results (list of components) pass the filetoken to this method: :

(GET) /api/media/get/9ccc2599ac5a4cf99cf7875639ab72c9

Method results

The results are a JSON array with the list of filtered components. Each element has these properties:

  • k : The component ID.

  • s : Total filtered segments with this component ID.

Note: We count the segments as they appear in the translation editor. For example, a Flex segment may be split into multiple segments in Wordbee to ease translation.


[ { "k": "pages.welcome", "s": 21 }, { "k": "pages.login", "s": 16 }, { "k": "pages.login.sso", "s": 16 } ]




Copyright Wordbee - Buzzin' Outside the Box since 2008