POST api/translations

Request Information

URI Parameters

None.

Body Parameters

GetTranslationMultipleBindingModel
NameDescriptionTypeAdditional information
SearchSegments

Collection of string

None.

ResultLimit

integer

None.

ShouldReplaceNumbers

boolean

None.

ShouldDoTermRecognition

boolean

None.

ShouldUseRtf

boolean

None.

ShouldSetHyperlinksMatch

boolean

None.

DatabaseType

DatabaseType

None.

SourceLanguageId

integer

None.

TargetLanguageId

integer

None.

SubjectId

integer

None.

SubsubjectId

integer

None.

ProjectCode

string

None.

MinMatchPercent

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "SearchSegments": [
    "sample string 1",
    "sample string 2"
  ],
  "ResultLimit": 1,
  "ShouldReplaceNumbers": true,
  "ShouldDoTermRecognition": true,
  "ShouldUseRtf": true,
  "ShouldSetHyperlinksMatch": true,
  "DatabaseType": 1,
  "SourceLanguageId": 6,
  "TargetLanguageId": 7,
  "SubjectId": 8,
  "SubsubjectId": 9,
  "ProjectCode": "sample string 10",
  "MinMatchPercent": 11
}

application/xml, text/xml

Sample:
<GetTranslationMultipleBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TTWebApi.Models">
  <DatabaseType>Private</DatabaseType>
  <MinMatchPercent>11</MinMatchPercent>
  <ProjectCode>sample string 10</ProjectCode>
  <SourceLanguageId>6</SourceLanguageId>
  <SubjectId>8</SubjectId>
  <SubsubjectId>9</SubsubjectId>
  <TargetLanguageId>7</TargetLanguageId>
  <ResultLimit>1</ResultLimit>
  <ShouldDoTermRecognition>true</ShouldDoTermRecognition>
  <ShouldReplaceNumbers>true</ShouldReplaceNumbers>
  <ShouldSetHyperlinksMatch>true</ShouldSetHyperlinksMatch>
  <ShouldUseRtf>true</ShouldUseRtf>
  <SearchSegments xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </SearchSegments>
</GetTranslationMultipleBindingModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'GetTranslationMultipleBindingModel'.

Response Information

Resource Description

Collection of GetTranslationsResult
NameDescriptionTypeAdditional information
SearchResults

Collection of TranslationResult

None.

HighlightPositions

Collection of HighlightPosition

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "SearchResults": [
      {
        "EntryId": 1,
        "MatchPercent": 2,
        "SearchSegment": "sample string 3",
        "SourceSegment": "sample string 4",
        "TargetSegment": "sample string 5",
        "Ownership": 1,
        "ProjectMatch": true,
        "ProjectCode": "sample string 7",
        "ProjectDescription": "sample string 8"
      },
      {
        "EntryId": 1,
        "MatchPercent": 2,
        "SearchSegment": "sample string 3",
        "SourceSegment": "sample string 4",
        "TargetSegment": "sample string 5",
        "Ownership": 1,
        "ProjectMatch": true,
        "ProjectCode": "sample string 7",
        "ProjectDescription": "sample string 8"
      }
    ],
    "HighlightPositions": [
      {
        "Begin": 1,
        "End": 2
      },
      {
        "Begin": 1,
        "End": 2
      }
    ]
  },
  {
    "SearchResults": [
      {
        "EntryId": 1,
        "MatchPercent": 2,
        "SearchSegment": "sample string 3",
        "SourceSegment": "sample string 4",
        "TargetSegment": "sample string 5",
        "Ownership": 1,
        "ProjectMatch": true,
        "ProjectCode": "sample string 7",
        "ProjectDescription": "sample string 8"
      },
      {
        "EntryId": 1,
        "MatchPercent": 2,
        "SearchSegment": "sample string 3",
        "SourceSegment": "sample string 4",
        "TargetSegment": "sample string 5",
        "Ownership": 1,
        "ProjectMatch": true,
        "ProjectCode": "sample string 7",
        "ProjectDescription": "sample string 8"
      }
    ],
    "HighlightPositions": [
      {
        "Begin": 1,
        "End": 2
      },
      {
        "Begin": 1,
        "End": 2
      }
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfGetTranslationsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TTWebApi.Models">
  <GetTranslationsResult>
    <HighlightPositions>
      <HighlightPosition>
        <Begin>1</Begin>
        <End>2</End>
      </HighlightPosition>
      <HighlightPosition>
        <Begin>1</Begin>
        <End>2</End>
      </HighlightPosition>
    </HighlightPositions>
    <SearchResults>
      <TranslationResult>
        <EntryId>1</EntryId>
        <MatchPercent>2</MatchPercent>
        <Ownership>Public</Ownership>
        <ProjectCode>sample string 7</ProjectCode>
        <ProjectDescription>sample string 8</ProjectDescription>
        <ProjectMatch>true</ProjectMatch>
        <SearchSegment>sample string 3</SearchSegment>
        <SourceSegment>sample string 4</SourceSegment>
        <TargetSegment>sample string 5</TargetSegment>
      </TranslationResult>
      <TranslationResult>
        <EntryId>1</EntryId>
        <MatchPercent>2</MatchPercent>
        <Ownership>Public</Ownership>
        <ProjectCode>sample string 7</ProjectCode>
        <ProjectDescription>sample string 8</ProjectDescription>
        <ProjectMatch>true</ProjectMatch>
        <SearchSegment>sample string 3</SearchSegment>
        <SourceSegment>sample string 4</SourceSegment>
        <TargetSegment>sample string 5</TargetSegment>
      </TranslationResult>
    </SearchResults>
  </GetTranslationsResult>
  <GetTranslationsResult>
    <HighlightPositions>
      <HighlightPosition>
        <Begin>1</Begin>
        <End>2</End>
      </HighlightPosition>
      <HighlightPosition>
        <Begin>1</Begin>
        <End>2</End>
      </HighlightPosition>
    </HighlightPositions>
    <SearchResults>
      <TranslationResult>
        <EntryId>1</EntryId>
        <MatchPercent>2</MatchPercent>
        <Ownership>Public</Ownership>
        <ProjectCode>sample string 7</ProjectCode>
        <ProjectDescription>sample string 8</ProjectDescription>
        <ProjectMatch>true</ProjectMatch>
        <SearchSegment>sample string 3</SearchSegment>
        <SourceSegment>sample string 4</SourceSegment>
        <TargetSegment>sample string 5</TargetSegment>
      </TranslationResult>
      <TranslationResult>
        <EntryId>1</EntryId>
        <MatchPercent>2</MatchPercent>
        <Ownership>Public</Ownership>
        <ProjectCode>sample string 7</ProjectCode>
        <ProjectDescription>sample string 8</ProjectDescription>
        <ProjectMatch>true</ProjectMatch>
        <SearchSegment>sample string 3</SearchSegment>
        <SourceSegment>sample string 4</SourceSegment>
        <TargetSegment>sample string 5</TargetSegment>
      </TranslationResult>
    </SearchResults>
  </GetTranslationsResult>
</ArrayOfGetTranslationsResult>