Gets edits.
URL
(GETPOST) /resources/segments/textedits
...
The JSON has these properties:
EXAMPLES
...
Submit request
We submit this request:
Code Block |
---|
POST /api/resources/segments/textedits
BODY:
{
"scope": { "type": "Project", "projectid": 3502 },
"groupby" : "ByUserAndLocale"
} |
Await completion of operation
We get the operation status and poll it until it is finished:
Code Block |
---|
{
"trm": {
"requestid": 22230,
"status": "Finished",
},
"custom": {
"filetoken": "158a4bee38a943d6a2aff09859e165be"
}
} |
Until the status is not Finished or Failed, you need to poll with a second or more in between calls until operation is finished:
Code Block |
---|
GET /api/trm/status?requestid=22230 |
Get report
We download the file token:
Code Block |
---|
GET /api/media/get/158a4bee38a943d6a2aff09859e165be |
And obtain the report:
Code Block |
---|
{
"counts": [
{
"texts": 2,
"edits": 9,
"editDistance": 0.34,
"editDistanceSum": 91,
"editDistanceSumLengths": 266,
"editDistanceSumNormalized": 3.25,
"words": 12.03,
"chars": 67.10,
"wordsTarget": 12.03,
"charsTarget": 67.10,
"dateMin": "2020-03-26T10:22:12.8457033Z",
"dateMax": "2020-04-04T14:30:50.2094891Z",
"did": 10358,
"src": "en",
"trg": "en",
"uid": 505
},
{
"texts": 2,
"edits": 2,
"editDistance": 1.0,
"editDistanceSum": 6,
"editDistanceSumLengths": 6,
"editDistanceSumNormalized": 2.0,
"words": 10.0,
"chars": 51.0,
"wordsTarget": 2.0,
"charsTarget": 6.0,
"dateMin": "2020-04-16T09:00:28.6727929Z",
"dateMax": "2020-04-16T09:00:28.6727929Z",
"did": 10358,
"src": "en",
"trg": "es",
"uid": 505
}
],
"locales": {
"en": "English",
"es": "Spanish"
},
"users": {
"505": {
"uid": 505,
"uname": "Böhmig Stephan",
"cid": 537,
"cname": "team"
}
},
"documents": {
"10358": {
"did": 10358,
"dname": "WM-4458.wbflex",
"src": "en",
"dsid": 4163,
"dsname": "WM-4458"
}
},
"parameters": {
"groupby": "ByDocumentAndLocaleAndUser",
"dateFrom": null,
"dateTo": null,
"aggregationMode": "SingleActionPerUser",
"src": null,
"trgs": null
}
}
|