Filtering Terms based on termbaseFieldValues

I'm using Rws.LanguageCloud.Sdk and call ListTermbaseTermsAsync to get the list of Terms. How can I filter Terms based on termbaseFieldValues? Can I use search and searchType to implement this?

  • Hi  , the LanguageCloud API’s List Termbase Terms endpoint does not support filtering directly on termbaseFieldValues via additional query parameters. The search and searchType parameters only apply to the term text itself (and their behavior is defined as “normal” for an exact match, “linguistic” for language-dependent similarity, or “fuzzy” for fault-tolerant matching). They do not extend to matching custom field values on the term entries.

    That doesn't stop you from implementing this logic on yr client-side.

    • Retrieve the terms using ListTermbaseTermsAsync.
    • Once you have the term data (which includes termbaseFieldValues), apply your custom filtering logic

    I'll propose this as an API change proposal; thx for this feedback.

    +  

    Patrick Andrew Hartnett | RWS Group

  • Thank you for bringing this to our attention. Our development team will review it in the context of our ongoing projects and priorities. Your understanding and patience as we assess this matter is appreciated. We have recorded the issue in our tracking system under the reference number CRQ-41271
  • Hello  

    It seems like you're using the wrong endpoint for what you're trying to accomplish.

    You should use ListTermbaseEntriesAsync, adding the required "fields" query parameter (documented here), depending on what level the termbaseFieldValues are at.

    So, for example:

    Let's say you have a term level field, named "TermLevelField"

    Edit Termbase Wizard screen showing the Fields and structure section with options to add fields at Entry, Language, and Term levels. TermLevelField is listed under Term level.

    And you wish to get terms that have a "TermLevelField" value of "TermLevelValue". Then, to get the terms, the code would be something similar to:

    public async Task<List<string>> GetTermsFilteredByFieldValues()
    {
        var credentials = new ServiceCredentials("cleintId", "clientSecret", "tenant");
        var clientProvider = new LanguageCloudClientProvider("region");
    
        var termbase = clientProvider.GetTermbaseClient(credentials);
        var listTermbaseEntriesResponse = await termbase.ListTermbaseEntriesAsync("termbaseId", fields: "termbaseFieldValues, languages.terms.termbaseFieldValues");
    
        var terms = new List<string>();
        foreach (var termbaseEntry in listTermbaseEntriesResponse.Items)
        {
            foreach (var language in termbaseEntry.Languages.Where(lang => lang.Language.LanguageCode == "de"))
            {
                foreach (var term in language.Terms)
                {
                    if (term.TermbaseFieldValues.First(fiedlValue => fiedlValue.Name == "TermLevelField").Value ==
                        "TermLevelValue")
                        terms.Add(term.Text);
                }
            }
        }
    
        return terms;
    }



    Generated Image Alt-Text
    [edited by: RWS Community AI at 1:35 PM (GMT 1) on 12 Aug 2025]