Search Translations

End Point: [TMEngine URL]/create
Default: http://localhost:8000/TMServer/search
Send a 'POST' request to the method end point with these parameters in a JSON body:
Field Required Content
id yes
ID of the memory where the search should be performed
text Yes Text string to search
srcLang Yes Source language code
tgtLang Yes Target language code
similarity Yes Integer value indicating the lowest similarity percentage to include in results
caseSensitive Yes Boolean value indicating whether the search should be case sensitive or not
Example:
{
  "id": "1572538708492",
  "text": "tax compliance",
  "srcLang": "en-GB",
  "tgtLang": "fr-FR",
  "similarity": 70,
  "caseSensitive": false
}
The server responds with a JSON object containing two fields.
On success, field 'status' is set to 'OK' and field 'process' contains the ID of the background search process that was initiated.
{
  "process": "1572531573026",
  "status": "OK"
}
On error, field 'status' is set to 'failed' and field 'reason' contains the error cause.
{
  "status": "failed",            
  "reason": "Unknown memory type"        
}
After starting the search process, monitor its status using the Get Process Status method.
On successful completion, the result will contain an array of similar segments in the data field.
Example:
{
  "result": "Completed",
  "data": {
    "matches": [
      {
        "similarity": 71,
        "origin": "1572538708492",
        "source": "<tuv xml:lang="en-GB"><seg>Non-compliance</seg></tuv>",
        "target": "<tuv xml:lang="fr-FR"><seg>Violation</seg></tuv>",
        "properties": {
          "creationdate": "20070126T082848Z",
          "subject": "Taxes",
          "x-Origin": "TM",
          "project": "Main TM",
          "changedate": "20070126T082848Z",
          "tuid": "1546700322331",
          "creationid": "MC",
          "changeid": "MC",
          "lastusagedate": "20070126T082848Z",
          "customer": "ACME Auditors"
        }
      }, {
        "similarity": 73,
        "origin": "1572538708492",
        "source": "<tuv xml:lang="en-GB"><seg>Legal Compliance</seg></tuv>",
        "target": "<tuv xml:lang="fr-FR"><seg>Conformité légale</seg></tuv>",
        "properties": {
          "creationdate": "20160725T141611Z",
          "x-ConfirmationLevel": "ApprovedTranslation",
          "subject": "Taxes",
          "x-Origin": "TM",
          "project": "Main TM",
          "changedate": "20160727T093143Z",
          "tuid": "1546700366038",
          "creationid": "Aqcis9\Aqcis",
          "changeid": "FG",
          "lastusagedate": "20160727T093143Z",
          "customer": "ACME Auditors"
        }
      }, {
        "similarity": 100,
        "origin": "fluenta",
        "source": "<tuv xml:lang="en-GB"><seg>tax compliance</seg></tuv>",
        "target": "<tuv xml:lang="fr-FR"><seg>Conformité fiscale</seg></tuv>",
        "properties": {
          "creationdate": "20171004T111450Z",
          "subject": "Taxes",
          "project": "Main TM",
          "changedate": "20171004T111450Z",
          "tuid": "1546700370945",
          "changeid": "translator2",
          "usagecount": "1",
          "x-ConfirmationLevel": "Translated",
          "x-Origin": "TM",
          "creationid": "translator2",
          "lastusagedate": "20171006T103930Z",
          "customer": "ACME Auditors"
        }
      }
    ],
  },
  "status": "OK"
}