Legacy Dev Forum Posts

 View Only

Sign Up

Users Search that ONLY have a specific skill or skills

  • 1.  Users Search that ONLY have a specific skill or skills

    Posted 06-05-2025 18:30

    xember | 2024-03-04 13:10:12 UTC | #1

    Dear All,

    I am trying to query users based on skill. I use the POST /api/v2/users/search function.

    Question 1: is there any documentation on this search function? I would like to know how what I can do with the several "types" (EXACT, STARTSWITH, CONTAINS, REGEX, TERM, TERMS, REQUIREDFIELDS, MATCHALL, QUERYSTRING) Question 2: I am trying to query users that have one or more skills out a list of skills but NO other skill than those. Is that possible?

    Thanks in advance for your help!

    Best Regards,

    Peter


    Eos_Rios | 2024-03-04 14:30:06 UTC | #2

    xember, post:1, topic:24983
    I am trying to query users that have one or more skills out a list of skills but NO other skill than those. Is that possible?

    As far as I know there is no way to test for the absence of other values and your best bet is to do something like;

    {
      "query": [
        {
          "value": "YourSkillHere",
          "fields": [
            "routingSkills.name"
          ],
          "type": "EXACT"
        }
      ],
      "expand": [
        "skills"
      ]
    }

    and then use your scripting language of choice to drop any results with more than 1 skill. If you're looking for an exact set of skills the equality test can be increased to only find people who have exactly those 2, 3, 4 skills, but the more complicated your search is the more it becomes additional post-processing logic.


    xember | 2024-03-05 08:19:51 UTC | #3

    Yeah, thought about that too, probably that will involve a lot of querying since there is a limit of 25 :frowning:


    Eos_Rios | 2024-03-05 13:07:55 UTC | #4

    If your needs are particularly complex and not real-time sensitive because your people's skills don't change that frequently it could be more effective to download all users and their skills from the Users API daily to a repository that handles whatever logic you need, instead of doing specific searches over and over.


    system | 2024-04-04 13:01:10 UTC | #5

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 24983