Legacy Dev Forum Posts

 View Only

Sign Up

Retrieve users from a division

  • 1.  Retrieve users from a division

    Posted 06-05-2025 18:41

    wu_edward | 2020-04-07 23:34:29 UTC | #1

    Hi, Any way I can search and retrieve a list of users from a division? Thanks, Ed


    anon28885283 | 2020-04-08 04:51:46 UTC | #2

    Yes you can use the Search Users under Users API

    Your query would look something like this

    {
       "query": [
          {
             "fields": ["divisionId"],
             "value": "--DIVISION ID--",
             "operator": "OR",
             "type": "EXACT"
          }
       ]
    }

    wu_edward | 2020-04-08 06:52:12 UTC | #3

    Thanks. I tried and had no return. Any ideas?

    /api/v2/users/search

    { "query": [{ "operator": "OR", "type": "EXACT", "fields": ["divisionId"], "value": "b19e3c9a-xxxxx-xxxx-xxxx-46bd3968829a" }] }


    wu_edward | 2020-04-08 07:05:18 UTC | #4

    Sorry I used the wrong division id. I got it thanks.


    wu_edward | 2020-04-08 08:24:51 UTC | #5

    Hi, I am not getting the response. I think it is something to do with my translationMap. Any ideas?

    Thanks, Ed

    { "translationMap": { "name": "$..KeyValuePair[?(@.Key == 'results.name')].Value", "userid": "$..KeyValuePair[?(@.Key == 'results.id')].Value" }, "translationMapDefaults": {}, "successTemplate": "{ \"Name\":${name}, \"userid\":${userid}}" }


    anon28885283 | 2020-04-08 08:37:22 UTC | #6

    What's the error you're getting? And if possible please upload the data action export (remove any sensitive information)


    wu_edward | 2020-04-08 09:01:20 UTC | #7

    Thanks @anon28885283. I over complicated it. I got it working now.

    { "translationMap": { "name": "$.results[].name", "Id": "$.results[].id"

    }, "translationMapDefaults": {}, "successTemplate": "{ \"Name\":${name}, \"Id\":${Id}}" }


    system | 2020-05-09 09:01:25 UTC | #8

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


    This post was migrated from the old Developer Forum.

    ref: 7504