Back to API Reference Home

POST v1/tms/{tmGuid}/lookupsegments

Performs a lookup operation in the translation memory specified by a Guid.

Request information

Uri parameters

NameTypeDescriptionAdditional information
tmGuidGuidThe Guid of the translation memory

Request body type

NameTypeDescription
SegmentsQuerySegment[]Obligatory; An array of the segments to search.
ContextIDStringOptional, default value: null; The context id of the segment.
FollowingSegmentStringOptional, default value: null; The following segment.
PrecedingSegmentStringOptional, default value: null; The preceding segment.
SegmentStringObligatory; The segment to search.
OptionsLookupSegmentOptions
AdjustFuzzyMatchesBooleanOptional, default value: False; Defines whether an adjustment of fuzzy hits should be performed.
InlineTagStrictnessInlineTagStrictness (enum)Optional, default value: 0; Possible enum values: 0:Strict; 1:Medium; 2:Permissive; Defines the strictness of matching inline tags.
MatchThresholdInt32Optional, default value: 0; The match threshold for the lookup result. A number between 50 and 102 is expected.
ShowFragmentHitsBooleanOptional, default value: False; Defines whether to show fragment assembly hits in the lookup result.
OnlyBestBooleanOptional, default value: False; Defines whether the lookup should return only the best matches.
OnlyUnambiguousBooleanOptional, default value: False; Defines whether the lookup should return only unambiguous matches. Only relevant if MatchThreshold is 100, 101 or 102.
ReverseLookupBooleanOptional, default value: False; Defines whether a reversed lookup should be performed.

Request body formats

application/json

Sample:
{
  "Segments": [
    {
      "ContextID": "context id",
      "FollowingSegment": "<seg>Following segment content.</seg>",
      "PrecedingSegment": "<seg>Preceding segment content.</seg>",
      "Segment": "<seg>Sample segment content.</seg>"
    },
    {
      "ContextID": "context id",
      "FollowingSegment": "<seg>Following segment content.</seg>",
      "PrecedingSegment": "<seg>Preceding segment content.</seg>",
      "Segment": "<seg>Sample segment content.</seg>"
    },
    {
      "ContextID": "context id",
      "FollowingSegment": "<seg>Following segment content.</seg>",
      "PrecedingSegment": "<seg>Preceding segment content.</seg>",
      "Segment": "<seg>Sample segment content.</seg>"
    }
  ],
  "Options": {
    "AdjustFuzzyMatches": true,
    "InlineTagStrictness": 2,
    "MatchThreshold": 100,
    "ShowFragmentHits": false,
    "OnlyBest": true,
    "OnlyUnambiguous": true,
    "ReverseLookup": true
  }
}

Response information

Response return type

NameTypeDescription
ResultTMHitsPerSegment[]Optional, default value: null; The result of the lookup.
TMHitsTMHit[]Optional, default value: null; The result of the lookup per segment.
MatchRateInt32Optional, default value: null; The match rate of the lookup hit.
TransUnitTMEntryModel
ClientStringThe client of the TM entry.
ContextIDStringThe context id of the TM entry.
CreatedDateTimeThe creaton date of the TM entry.
CreatorStringThe creator of the TM entry.
DocumentStringThe document of the TM entry.
DomainStringThe domain of the TM entry.
FollowingSegmentStringThe following segment of the TM entry.
KeyInt32The key of the TM entry.
ModifiedDateTimeThe date of the TM entry's last modification.
ModifierStringThe last modifier of the TM entry.
PrecedingSegmentStringThe preceding segment of the TM entry.
ProjectStringThe project of the TM entry.
SourceSegmentStringThe source segment of the TM entry.
SubjectStringThe subject of the TM entry.
TargetSegmentStringThe target segment of the TM entry.
CustomMetasTMCustomMetaItem[]An array of the TM entry's custom meta properties.
NameStringThe name of the custom meta property.
ValueObjectThe value of the custom meta property.

Response body formats

application/json

Sample:
{
  "Result": [
    {
      "TMHits": [
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        },
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        },
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        }
      ]
    },
    {
      "TMHits": [
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        },
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        },
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        }
      ]
    },
    {
      "TMHits": [
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        },
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        },
        {
          "MatchRate": 1,
          "TransUnit": {
            "Client": "client",
            "ContextID": "context id",
            "Created": "2015-08-28T14:02:31.22Z",
            "Creator": "Built-in administrator",
            "Document": "document",
            "Domain": "domain",
            "FollowingSegment": "<seg>Following segment content.</seg>",
            "Key": 0,
            "Modified": "2015-08-28T14:02:31.22Z",
            "Modifier": "Built-in administrator",
            "PrecedingSegment": "<seg>Preceding segment content.</seg>",
            "Project": "project",
            "SourceSegment": "<seg>Sample segment content1.</seg>",
            "Subject": "subject",
            "TargetSegment": "<seg>Sample segment content2.</seg>",
            "CustomMetas": [
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              },
              {
                "Name": "name",
                "Value": "value"
              }
            ]
          }
        }
      ]
    }
  ]
}