Skip to main content

apps/wbflex/documents/{id}/log/report

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
nameThe flex file name including any parent folders, if any.string
filterNameThe 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
pidThe project IDint
pname

The project name

string
srcAn object with language code ("v") and language name ("t").object
trgsAn array with all target languages. Each with code ("v") and name ("t"). See example below.object[]
takeNumber of returned push recodsint
totalTotal push records in the logint
rowsJSON array with the push record detailsobject[]


Each push in array rows has these details:

ts

Date of operation


datetime
successTrue if success. False if failure.bool
errorArray of errors encountered during the push operation. Empty if no error.string[]
modeThe push mode. Either "full" or "partial". See documents/{id}/contents/pushstring



source

Information on the pushed segments (JSON payload)

object
source.segmentsTotalTotal segments pushed.int
source.segmentsErrorsTotal segments that contain errors and were skipped.int
source.segmentsSkippedTotal 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



updatesInformation on the segments actually added/updated/deleted in the target Flex document.object
updates.targetParagraphsTotal 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-3int
updates.targetSegmentsTotal 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.totalSum of the counts below
updates.totalAddedTotal segments that do not exist in the Flex document. They will be added.
updates.totalUpdatedTotal segments that already exist in the Flex document. They will be updated.
updates.totalInvalidTotal 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:

  • The payload explicitly flags a segment as to be deleted, or
  • The push has mode "full". In the latter case any segments in the Flex document not referenced by the push are deleted.




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:

CODE
"texts": { "en": 2, "fr-FR": 7, "es-ES": 0 }

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:

CODE
"newProblemsAdditions": { "en": 0, "fr-FR": 2, "es-ES": 3 }

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:

CODE
(GET) /api/apps/wbflex/documents/{id}/log/report?take=2


Result:

CODE
{
    "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": {}
            }
        }
    ]
}







JavaScript errors detected

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

If this problem persists, please contact our support.