The methods below permit to find Flex documents by various filter criteria: Find all Flex documents, Find Flex documents changed since a given date/time, Find documents by name, ID etc. and so on. See examples below. If user credentials are worker level (and not manager level), the user can only access Flex documents in Wordbee that have a job assigned to that user. Managers can see all flex documents.
For the full API documentation, see:
To list all flex documents to which user has access:
(POST) /api/apps/wbflex/list
The result contains an array with the flex documents. The most important properties are:
dtchange: Last date/time when the content of the flex file changed. For example, when translation was edited or a meta data modified.
{ "total": 4, "count": 4, "rows": [ { "id": "9371", "dtchange": "2019-06-15T13:45:30.0000000Z", "did": 9371, "jid": null, "src": "en", "srct": "English", "name": "folder\\mysoftware.wbflex", "paragraphs": 2002, "segments": 2002, "pid": 3263, "connector": null, "preference": "Software Translation Project" } .... } |
Please look at the detailed method documentation to see how pagination works.
Include a query string in the request body. Set content type to "application/json":
(POST) /api/apps/wbflex/list
Include the following string in the request body.
{ "query": "{preference}.Matches(\"Project-1123\")" }
The query language is very powerful and lets you filter on most properties: Query language
Include a query string in the request body.
(POST) /api/apps/wbflex/list
Include the following string in the request body. Set content type to "application/json"
{ "query": "{dtchange}.Matches(\"2018-10-25 22:30:00\"), \">=\")" }
The query language is very powerful and lets you filter on most properties: Query language
Use the aggregation feature of lists. We aggregate data by project reference.
(POST) /api/apps/wbflex/list/aggregations/projects
The result is:
{ "total": 4, "buckets": [ { "value": 123, "title": "Software project 1", "css": null, "query": null, "count": 1 }, { "value": 287, "title": "Software project 2", "css": null, "query": null, "count": 3 } ], "properties": { "id": "projects", "name": "Flex projects", "desc": "Shows list of Wordbee projects with both project ID and Reference." } } |
You only need to know these properties in the list:
Use the aggregation feature of lists. We aggregate data by project reference. Contrary to the above aggregation, we do not include the project ID with the results.
(POST) /api/apps/wbflex/list/aggregations/preference
The result is:
{ "total": 4, "buckets": [ { "value": "Software project 1", "title": "Software project 1", "css": null, "query": null, "count": 1 }, { "value": "Software project 2", "title": "Software project 2", "css": null, "query": null, "count": 3 } ], "properties": { "id": "preference", "name": "Flex projects", "desc": "Shows list of Wordbee projects with number of contained flex documents." } } |
You only need to know these properties in the list:
See Which access rights are required by API users?