Skip to main content

Get suggestions from translation memory

POST 

https://app.tolgee.io/v2/projects/:projectId/suggest/translation-memory

Suggests machine translations from translation memory. The result is always sorted by similarity, so sorting is not supported.

Request

Path Parameters

    projectId int64required

Query Parameters

    page integer

    Possible values: >= 0

    Zero-based page index (0..N)

    Default value: 0
    size integer

    Possible values: >= 1

    The size of the page to be returned

    Default value: 20
    sort string[]

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Bodyrequired

    baseTextstring

    Text value of base translation. Useful, when base translation is not stored yet.

    isPluralboolean

    Whether base text is plural. This value is ignored if baseText is null.

    keyIdint64

    Key Id to get results for. Use when key is stored already.

    pluralboolean
    servicesstring[]

    List of services to use. If null, then all enabled services are used.

    Possible values: [GOOGLE, AWS, DEEPL, AZURE, BAIDU, TOLGEE]

    targetLanguageIdint64required

Responses

OK

Schema
    _embedded object
    translationMemoryItems object[]
  • Array [
  • baseTextstringrequired
    keyNamestringrequired
    similarityfloatrequired
    targetTextstringrequired
  • ]
  • page object
    numberint64
    sizeint64
    totalElementsint64
    totalPagesint64

Authorization: X-API-Key

name: X-API-Keytype: apiKeyin: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://app.tolgee.io/v2/projects/:projectId/suggest/translation-memory");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("X-API-Key", "<X-API-Key>");
var content = new StringContent("{\n \"baseText\": \"string\",\n \"isPlural\": true,\n \"keyId\": 0,\n \"plural\": true,\n \"services\": [\n \"GOOGLE\"\n ],\n \"targetLanguageId\": 0\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://app.tolgee.io
Auth
Parameters
— pathrequired
— query
— query
— query
Body required
{
  "baseText": "string",
  "isPlural": true,
  "keyId": 0,
  "plural": true,
  "services": [
    "GOOGLE"
  ],
  "targetLanguageId": 0
}
ResponseClear

Click the Send API Request button above and see the response here!