Skip to main content

resources/qa/execute (post)

Run a Quality Assurance (QA) check on segments in one or more language.

URL

CODE
(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 project or job scope, the sort property can only accept value Natural, which is the default value

object?, Optional

src

The source language code (e.g., "en-US").

string, Mandatory

trgs

A list of target language codes to check (e.g., ["fr-FR", "de-DE"]).

You must specify at least one target locale.

string[], Mandatory

profileId

The ID of an existing QA Profile to use for the check.
Note: You must specify either profileId OR profile, but not both.

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 true.

  • false: The system disregards any instructions in the profile to change statuses. The status change instructions on the profile will be disregarded.

  • true: The status change instructions on the profile will be applied.

bool, Optional

updateBookmarks

Optional, default is true.

  • false: The system disregards any instructions in the profile to change bookmarks. The bookmark change instructions on the profile will be disregarded.

  • true: The bookmark change instructions on the profile will be applied.

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:

JSON
{
  "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 count property above.

string?

EXAMPLES

Basic Request (Using an existing Profile ID)

JSON
{
  "scope": {
    "type": "Project",
    "projectid": 1502
  },
  "query": {
    "languages": [
       "..."
    ]
  },
  "src": "en-US",
  "trgs": ["de-DE", "fr-FR"],
  "profileId": 10
}

Advanced Request (Using a Custom QA Profile)

JSON
{
  "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
}

JavaScript errors detected

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

If this problem persists, please contact our support.