Query User Skills in batch?

Hi
I'm looking for a way to query User Skills in batch by passing a list of userid's. It appears that the only API's available for querying user skills are:

/api/v2/users/{userId}/profileskills

/api/v2/users/{userId}/routingskills

So it looks unlikely, but need to be sure, if someone would please advise.

Thanks
Richard

Hello,

I think the closest way would be to search users with POST /api/v2/users/search, using a filter with a list of userIds and specifying profileSkills (for profile skills) and skills (for routing skills) in the expand attribute.

The request body would look like this:

{
   "sortOrder": "ASC",
   "sortBy": "id",
   "pageSize": 100,
   "pageNumber": 1,
   "expand": ["profileSkills", "skills"],
   "query": [
      {
         "values": ["userId01", "userId02", "userId03"],
         "fields": ["id"],
         "type": "EXACT"
      }
   ],
   "enforcePermissions": true
}

As far as I know, you can define up to 50 values (userIds) in the filter's values array attribute.
I have not tried it myself - I do not have enough users defined in my test environment - but I think that's the correct limit.

Regards,

Jerome's answer sounded more like what you were trying not to do (supply a list of users).

If you truly want just everyones skills rather than searching for a subset you can call GET /api/v2/users with skills as an expands too.

Hi @Jerome.Saint-Marc & @Eos_Rios
Thanks for your help. It sounds like it might be achievable, which is great. We'll have a play around.

Cheers
Richard

Just reporting back that I can get this to work using the Expand against /api/v2/users.
Thanks, I didn't know about this. Very useful

1 Like

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