Studio API: Can't list TMs from GS (14.0.511.4) if using Studio 2017 SR1 (14.1.6413.8)

Hello developers

The below chunk of code runs well with most recent version of GS if used with Studio 2017 pre-SR1. After updating to Studio 2017 SR1 (14.1.6413.8) the TM-Server doesn't respond anymore.

I am stuck here. What has changed?

For Each sTM As ServerBasedTranslationMemory In tmServer.GetTranslationMemories(TranslationMemoryProperties.All)

      If sTM.Name = tmName Then

            Dim credential As String = String.Format("user={0};password={1};type=CustomUser", GroupShare_user, GroupShare_pw)

            newProject.Credentials.AddCredential(New Uri("sdltm." & GroupShare_server), credential)

            Save(newProject, System.Reflection.MethodInfo.GetCurrentMethod.Name)

            servertm = sTM : Exit For

      End If

Next

 

Thank you for your help

Victor Linnemann

Parents
  • Hi

    I am having exactly the same issue.
    I used fiddler to monitor what is sent to GroupShare and what i saw looked to me like a bug.
    I am using exactly the same approach to get the list of TMs: tmServer.GetTranslationMemories(TranslationMemoryProperties.All)

    The client API uses probably a loop when calling the method above and makes calls to the GroupShare RESTApi (give me the top 25 TMs and skip the already received TMs from previous calls)

    • first call made to GroupShare:
      api/tm-service/v1/tms?$count=true&$top=25&$skip=0&$orderby=Name%20asc&$filter=(not%20Metadata/any()%20or%20Metadata/any(m:%20m/Key%20eq%20'IsProjectTm'%20and%20m/Value%20eq%20'false')%20or%20Metadata/any(m:%20m/Key%20ne%20'IsProjectTm'))

              --> This call looks good, you should get the top 25 TMs and 0 are skipped.

    • second call looks also good:
      api/tm-service/v1/tms?$count=true&$top=25&$skip=25&$orderby=Name%20asc&$filter=(not%20Metadata/any()%20or%20Metadata/any(m:%20m/Key%20eq%20'IsProjectTm'%20and%20m/Value%20eq%20'false')%20or%20Metadata/any(m:%20m/Key%20ne%20'IsProjectTm'))

             --> you get again the top 25 but the first 25 TMs are skipped as you already got them with the first call.

    • After the second call there seems to be an issue, as the third an the other following calls look exactly the same as the second:
      api/tm-service/v1/tms?$count=true&$top=25&$skip=25&$orderby=Name%20asc&$filter=(not%20Metadata/any()%20or%20Metadata/any(m:%20m/Key%20eq%20'IsProjectTm'%20and%20m/Value%20eq%20'false')%20or%20Metadata/any(m:%20m/Key%20ne%20'IsProjectTm'))

             -> get top 25 and skip first 25
             -> this means you get again and again after the second call the same TMs. This will end in an endless loop if you have more then 50 TMs on GroupShare.                   The skip parameter should be increased with every call. So for the third call there should be something like:
                 top= 25 and skip=50, to skip the TMs you get from first and second call, but that's not the case...

    I hope someone from SDL can give some feedback on this.

    best

    Arben

Reply
  • Hi

    I am having exactly the same issue.
    I used fiddler to monitor what is sent to GroupShare and what i saw looked to me like a bug.
    I am using exactly the same approach to get the list of TMs: tmServer.GetTranslationMemories(TranslationMemoryProperties.All)

    The client API uses probably a loop when calling the method above and makes calls to the GroupShare RESTApi (give me the top 25 TMs and skip the already received TMs from previous calls)

    • first call made to GroupShare:
      api/tm-service/v1/tms?$count=true&$top=25&$skip=0&$orderby=Name%20asc&$filter=(not%20Metadata/any()%20or%20Metadata/any(m:%20m/Key%20eq%20'IsProjectTm'%20and%20m/Value%20eq%20'false')%20or%20Metadata/any(m:%20m/Key%20ne%20'IsProjectTm'))

              --> This call looks good, you should get the top 25 TMs and 0 are skipped.

    • second call looks also good:
      api/tm-service/v1/tms?$count=true&$top=25&$skip=25&$orderby=Name%20asc&$filter=(not%20Metadata/any()%20or%20Metadata/any(m:%20m/Key%20eq%20'IsProjectTm'%20and%20m/Value%20eq%20'false')%20or%20Metadata/any(m:%20m/Key%20ne%20'IsProjectTm'))

             --> you get again the top 25 but the first 25 TMs are skipped as you already got them with the first call.

    • After the second call there seems to be an issue, as the third an the other following calls look exactly the same as the second:
      api/tm-service/v1/tms?$count=true&$top=25&$skip=25&$orderby=Name%20asc&$filter=(not%20Metadata/any()%20or%20Metadata/any(m:%20m/Key%20eq%20'IsProjectTm'%20and%20m/Value%20eq%20'false')%20or%20Metadata/any(m:%20m/Key%20ne%20'IsProjectTm'))

             -> get top 25 and skip first 25
             -> this means you get again and again after the second call the same TMs. This will end in an endless loop if you have more then 50 TMs on GroupShare.                   The skip parameter should be increased with every call. So for the third call there should be something like:
                 top= 25 and skip=50, to skip the TMs you get from first and second call, but that's not the case...

    I hope someone from SDL can give some feedback on this.

    best

    Arben

Children
No Data