Trying to get the Server TMs by query fails with internal server error, if the size parameter of the query is set to a value higher than 100 (Groupshare 2020 SR 1 CU9)

Fullscreen
1
2
3
4
Dim ServerUri As New System.Uri(ServerURL & ":" & Portnumber)
Dim TMServer As New TranslationProviderServer(ServerUri, False, Username, Password)
Dim query = New Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryQuery() With {.ResourceGroupPath = "/", .IsProject = True, .IsMain = True, .IncludeChildResourceGroups = True, .Size = 120}
Dim PagedTMs() = TMServer.GetTranslationMemoriesByQuery(query).TranslationMemories
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Hi - the code above will fail with an internal server error, since the size parameter is set to a value > 100. Set it to 100 or lower, will work, but will not retrieve all TMs that are on the server.

Is this by design or is this product flaw?

Many thanks,

Tom

  • Just checked - the exact error I am getting is: HTTPRequestException: Response status code does not indicate sucess: 400 (Bad Request)

    Groupshare 2020 SR 1 CU9

    Studio 2022 17.1.8.17828

  • Found this to be working alright:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Dim ServerUri As New System.Uri(ServerURL & ":" & Portnumber)
    Dim TMServer As New TranslationProviderServer(ServerUri, False, Username, Password)
    Dim queryNoOfTMs = New Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryQuery() With {.Index = 0, .ResourceGroupPath = "/", .IsProject = True, .IsMain = True, .IncludeChildResourceGroups = True, .Size = 10}
    Dim TMCount As Integer = TMServer.GetTranslationMemoriesByQuery(queryNoOfTMs).TotalEntities
    For i = 0 To TMCount - 1
    Dim queryTMs = New Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryQuery() With {.Index = i, .ResourceGroupPath = "/", .IsProject = True, .IsMain = True, .IncludeChildResourceGroups = True, .Size = 1}
    Dim PagedTMs() = TMServer.GetTranslationMemoriesByQuery(queryTMs).TranslationMemories
    Dim ServerTM As String = PagedTMs(0).Name
    Next
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX