Users Search that ONLY have a specific skill or skills

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, STARTS_WITH, CONTAINS, REGEX, TERM, TERMS, REQUIRED_FIELDS, MATCH_ALL, QUERY_STRING)
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

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.

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

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.

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