Get a JSON report with the most recent push operations. It includes project details, Flex container details and the language print names.
In comparison, apps/wbflex/documents/{id}/log returns the raw and unprepared information on all push operations. It lacks the data such as project name or document name which one needs to produce end-user reports.
URL
(GET) /api/apps/wbflex/documents/{id}/log/report?take={take}
PARAMETERS
URL parameters are:
|
id |
Specify either a document ID (such as 1000) or a job ID (such as c300). |
Mandatory |
|
take |
Optional number between 1 and 200. Default is 100. Retrieve up to this number of most recent commit details. |
Optional |
RESULTS
The method returns a JSON object with these properties:
|
id |
The flex document ID.
|
int |
|
name |
The flex file name including any parent folders, if any. |
string |
|
filterName |
The Flex configuration name that was used when the document was created. This can be done in Wordbee Translator or via API: apps/wbflex/documents (POST)
|
string |
|
pid |
The project ID |
int |
|
pname |
The project name |
string |
|
src |
An object with language code ("v") and language name ("t"). |
object |
|
trgs |
An array with all target languages. Each with code ("v") and name ("t"). See example below. |
object[] |
|
take |
Number of returned push recods |
int |
|
total |
Total push records in the log |
int |
|
rows |
JSON array with the push record details |
object[] |
Each push in array rows has these details:
|
ts |
Date of operation
|
datetime |
|
success |
True if success. False if failure. |
bool |
|
error |
Array of errors encountered during the push operation. Empty if no error. |
string[] |
|
mode |
The push mode. Either "full" or "partial". See documents/{id}/contents/push |
string |
|
|
|
|
|
source |
Information on the pushed segments (JSON payload) |
object |
|
source.segmentsTotal |
Total segments pushed. |
int |
|
source.segmentsErrors |
Total segments that contain errors and were skipped. |
int |
|
source.segmentsSkipped |
Total segments skipped because eliminated by a regular expression (configured in the Flex file configuration). |
int |
|
source.header.* |
A subset of the JSON payload header object in documents/{id}/contents/push. It describes the parameters of the push operation. |
object |
|
|
|
|
|
updates |
Information on the segments actually added/updated/deleted in the target Flex document. |
object |
|
updates.targetParagraphs |
Total paragraphs affected in target document. A paragraph corresponds to a segment in the JSON payload of a push. A paragraph is then split into sub-segments if e.g. SRX segmentation is enabled. A split into 3 sub-segments would assign these IDs in the translation editor: 10-1, 10-2, 10-3 |
int |
|
updates.targetSegments |
Total segments affected in target document. Each pushed paragraph may be split into sub-segments as a function of the segmentation settings in the Flex filter configuration (see filterName). |
|
|
|
|
|
|
updates.total |
Sum of the counts below |
|
|
updates.totalAdded |
Total segments that do not exist in the Flex document. They will be added. |
|
|
updates.totalUpdated |
Total segments that already exist in the Flex document. They will be updated. |
|
|
updates.totalInvalid |
Total invalid segments. Those are segments in the payload that did lack the source text. The source text is mandatory in the payload except when deleting a segment. |
|
|
updates.totalRemoved |
Total segments that are removed from the Flex document. There are 2 cases for this:
|
|
|
|
|
|
|
updates.texts |
Counts all additions and updates of texts per each language. Languages comprise both source language and target languages. This is a JSON dictionary like:
This information can be interpreted as such: A translator or the project manager may see 2 changes to source texts, 7 changes to the French translations and no changes to Spanish translations. It could also mean: 2 new segments added with French translations included, plus 5 changes to French texts.
|
|
|
updates.textsMeta |
Counts number of texts for which meta information was added or updated. Languages comprise both source language and target languages. |
|
|
|
|
|
|
updates.newProblemsAdditions |
Total newly added texts for which the status was set to "Problem" (red color) where it was not in this status before. Note: This requires enabling status changes in the Flex filter configuration. This is a dictionary like:
|
|
|
updates.newProblemsUpdates |
Total existing modified texts for which the status was set to "Problem" (red color) where it was not in this status before. Note: This requires enabling status changes in the Flex filter configuration. This is a dictionary like the one above.
|
|
EXAMPLES
API call:
(GET) /api/apps/wbflex/documents/{id}/log/report?take=2
Result:
{
"id": 10358,
"name": "Software strings.wbflex",
"filterName": "SRX",
"pid": 3502,
"pname": "My software",
"src": {
"v": "en",
"t": "English"
},
"trgs": [
{
"v": "es",
"t": "Spanish"
}
],
"take": 2,
"total": 24,
"rows": [
{
"ts": "2020-03-26T10:22:18.0934706Z",
"success": true,
"errors": [],
"mode": "partial",
"source": {
"segmentsTotal": 3,
"segmentsErrors": 0,
"segmentsSkipped": 0,
"header": {
"mode": "partial",
"segmentation": null,
"segmentationParams": null,
"sourceTextChange": null,
"targetTextChange": null,
"targetTextChangeXWS": null,
"targetTextAdd": null,
"format": "html_jaws",
"major": "2",
"minor": "0"
}
},
"updates": {
"targetParagraphs": 3,
"targetSegments": 9,
"total": 9,
"totalAdded": 0,
"totalUpdated": 9,
"totalInvalid": 0,
"totalRemoved": 0,
"texts": {
"en": 7
},
"textsMeta": {},
"newProblemsAdditions": {},
"newProblemsUpdates": {}
}
},
{
"ts": "2020-03-26T10:22:12.9115279Z",
"success": true,
"errors": [],
"mode": "full",
"source": {
"segmentsTotal": 10,
"segmentsErrors": 0,
"segmentsSkipped": 0,
"header": {
"mode": "full",
"segmentation": null,
"segmentationParams": null,
"sourceTextChange": null,
"targetTextChange": null,
"targetTextChangeXWS": null,
"targetTextAdd": null,
"format": "html_jaws",
"major": "1",
"minor": "0"
}
},
"updates": {
"targetParagraphs": 10,
"targetSegments": 16,
"total": 16,
"totalAdded": 16,
"totalUpdated": 0,
"totalInvalid": 0,
"totalRemoved": 0,
"texts": {
"en": 16,
"es": 16
},
"textsMeta": {},
"newProblemsAdditions": {
"es": 16
},
"newProblemsUpdates": {}
}
}
]
}