resources/qa/execute (post)
Run a Quality Assurance (QA) check on segments in one or more language.
URL
(POST) /api/resources/qa/execute
PARAMETERS
The request BODY contains a JSON object with the following properties:
scope | Defines the scope of segments to check (e.g., specific documents, a whole project, or a job). See Scope (Object) for details on how to construct this object. | object, Mandatory |
query | Optional filter to select specific segments within the scope (e.g., filter by status, text content, or specific segment IDs). See resources/segments/search for the query structure. Note: when using | object?, Optional |
src | The source language code (e.g., | string, Mandatory |
trgs | A list of target language codes to check (e.g., You must specify at least one target locale. | string[], Mandatory |
profileId | The ID of an existing QA Profile to use for the check. | int?, Optional |
profile | A custom QA Profile object defined on-the-fly. Use this if you want to define rules dynamically instead of using a saved profile ID. See QA Profile (Object) for the full structure. | object, Optional |
updateStatus | Optional, default is
| bool, Optional |
updateBookmarks | Optional, default is
| bool, Optional |
maxSegments | The maximum number of segments to process. Default is 10,000. Maximum allowed is 100,000. | int?, Optional |
callbackUrl | Specify a URL which will be called upon success or failure of the operation. This makes polling for operation status unnecessary. | string, Optional |
For detailed descriptions of the complex objects used in this request, please refer to the official documentation pages:
RESULTS
This method is an Asynchronous operations: Your request is queued and will execute as soon as possible.
Asynchronous operations - How to:
The API method immediately returns a JSON object that includes the ID of the operation (look for the requestId property).
However, the operation has not yet been executed. You will need to await the operation’s termination to obtain results.
Waiting can be done in two ways: Polling: Regularly check the operation’s status. Webhook Call: Wait for a callback using the callbackurl parameter in your request. We strongly recommend the latter approach. For more details, please refer to the documentation: Asynchronous operations
The JSON results, obtained with polling or with a callback, include the operation status as well as any results specific to the API method. Below is an example of successful termination:
{
"trm": {
"requestid": 13432,
"isbatch": false,
"status": "Finished",
"statusText": "Finished!"
},
"custom": {
"results": [
{
"loc": "fr",
"loct": "French",
"segmentsScanned": 1000,
"segmentsFlagged": 200,
"issuesError": 220,
"issuesWarning": 60,
"issuesInformation": 0
},
{
"loc": "es",
"loct": "Spanish",
"segmentsScanned": 1000,
"segmentsFlagged": 0,
"issuesError": 0,
"issuesWarning": 0,
"issuesInformation": 0
}
],
"abortText": null
}
}
The custom node of the asynchronous result contains a QA check summary per language.
For each language you find these details:
loc, loct | Language code and name. | string, string |
segmentsScanned | Total number of texts that were checked for issues. | int |
segmentsFlagged | Total number of texts that were assigned one or more issues. | int |
issuesError | The total number of issues of error-type. Note that a text can be assigned more than one issue. | int |
issuesWarning | The total number of issues of warning-type found. | int |
issuesInformation | The total number of issues of information-type found. | int |
The results further contain this property:
abortText | Present only if the operation was aborted (e.g., "Too many errors" or "Cancelled"). If present, then the QA only ran partially and the number of segments successfully processed is in the | string? |
EXAMPLES
Basic Request (Using an existing Profile ID)
{
"scope": {
"type": "Project",
"projectid": 1502
},
"query": {
"languages": [
"..."
]
},
"src": "en-US",
"trgs": ["de-DE", "fr-FR"],
"profileId": 10
}
Advanced Request (Using a Custom QA Profile)
{
"scope": {
"type": "Project",
"projectid": 1502
},
"src": "en-US",
"trgs": ["fr-FR"],
"profile": {
"name": "One-off Custom Check",
"description": "Checks for spacing issues only",
"updateStatus": false,
"..."
},
"maxSegments": 1000
}