Get target term with GroupShare REST API

Hi All,

I looking for a way to get the target term in a entry. Using the '/multiterm/api/1.0/termbases/search' I'm only able to receive back the source term for the source language 'srcLangId'. I've tried to use the param 'trgLangId' but the result is the same.

The response has only the value for 'termText' for the source language.

Maybe the 'trgLangId' field has another purpose...

  

Thanks in advance

Luca

emoji
  • An issue has been created on Jira with the internal tracking nr. CRQ-32723
    emoji
  •   

    Hello!

    Could you share an example of the call you're making and the response?

    In the meantime, you could try to use the trgLangId as the srcLangId and see whether that works.
    As a termbase can have more than two languages, I am not sure they are treated differently.

    Also, there's another endpoint that you can use:

    Fullscreen
    1
    /multiterm/api/1.0/termbases/findterms?tid={tid}&srcLangCode={srcLangCode}&query={query}
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This one worked for me, and I was able to get a termText for any language. Unfortunately, it takes just a srcLangCode as a parameter so I had to use it for each language separately.

    emoji
  • Hello again,  !

    There is another solution, using this endpoint:

    Fullscreen
    1
    /multiterm/api/1.0/termbases/findtermsex?srcLangCode={sourceLang}&trgLangCode={targetLang}&query={searchQuery}&tbGuid={tbGuid}
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This works very well, giving a response like this:

    {
        "terms": [
            {
                "translation": [
                    "{translation}"
                ],
                "termText": "{termText}",
                "conceptId": "1",
                "termbaseId": "{termBaseId}",
    ...

    For this call, you need to have the tbGuid, which you can get by making these calls:

         1. GetOrganizations: /api/management/v2/organizations
                     In the response, you get the id of the organization which the relevant termbase belongs to.

         2. GetOrganizationResources: /api/management/v2/organizationresources?organizationId={orgId}&resourceType=tb
                     In the response, you get the tbGuid which you need for the FindTermsEx call above.

    Thank you  , for providing this solution!

    emoji