Legacy Dev Forum Posts

 View Only

Sign Up

How can we get number of users for particular location

  • 1.  How can we get number of users for particular location

    Posted 06-05-2025 18:20

    Vageesan_Saminathan | 2021-10-03 22:37:49 UTC | #1

    Hi,

    How can we get number of agents for particular location?

    I am looking into API # /api/v2/locations/search to fetch agents mapped to a particular location.

    In the API, We have parameter "expand", what are all the resources we can fetch?

    Regards, Vageesan


    anon11147534 | 2021-10-07 08:24:18 UTC | #2

    Hi Vageesan,

    The possible values of expand are images and addressVerificationDetails.


    Vageesan_Saminathan | 2021-10-07 08:26:16 UTC | #3

    Vageesan_Saminathan, post:1, topic:12222
    /api/v2/locations/search

    So we cant expand users mapped or assigned to a location. Is that Correct?


    Jerome.Saint-Marc | 2021-10-07 08:39:09 UTC | #4

    Hello,

    You can search for users using POST /api/v2/users/search and use a filter on the id of the location in your query.

    The field to use for search on location id is: location.location.value.guid

    As an example:

    { "sortBy": "id", "pageSize": 25, "pageNumber": 1, "query": [ { "fields": ["location.location.value.guid"], "value": "IDOFYOUR_LOCATION", "type": "EXACT" } ], "enforcePermissions": true }

    In expand, you can use: routingStatus, presence, conversationSummary, outOfOffice, geolocation, station, authorization, lasttokenissued, authorization.unusedRoles, team, profileSkills, certifications, locations, groups, skills, languages, languagePreference, employerInfo, biography These are the same values than the ones supported for GET /api/v2/users/{userId}

    Regards,


    Vageesan_Saminathan | 2021-10-07 08:48:28 UTC | #5

    Thanks a lot. Can you share the link or document to learn more about "query" in search


    Jerome.Saint-Marc | 2021-10-07 08:54:24 UTC | #6

    There is unfortunately no document at this stage describing the support fields. There is an opened action to have it documented. But I don't know when this will happen. Some of these fields are mentioned in former posts on this forum.

    Regards,


    Vageesan_Saminathan | 2021-10-07 08:55:35 UTC | #7

    Thanks Jerome.

    I will reach to the forum then :slight_smile:


    Jerome.Saint-Marc | 2021-10-07 10:15:38 UTC | #8

    Here are the ones I know:

    "id": id of the user (userId) "email": email of the user "name": name of the user

    "routingSkills": skill the user has (this one uses the skill name) "languages": language the user has (uses language name) "manager.id": id of the manager (userId of the manager) "divisionId": id of division the user belongs to "groups.official.guid" and "groups.social.guid": id of groups the user is a member of "location.location.value.guid": id of location

    And on other fields from contact/user details: "department" "profileSkills" "certifications" "addresses" "primaryContactInfo"

    Regards,


    Vageesan_Saminathan | 2021-10-07 11:08:28 UTC | #9

    Thanks a lot for the information


    system | 2021-11-07 11:09:12 UTC | #10

    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: 12222