Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  About userID, userName

    Posted 05-10-2023 06:03
    No replies, thread closed.

    Is there an API to get the user name and the user ID associated with the user name?
    If possible, I would like to get all the agents who belong to the queue etc.


    #Telephony

    ------------------------------
    OGATA HIKARU
    NEC Corporation
    ------------------------------


  • 2.  RE: About userID, userName

    Posted 05-11-2023 00:53
    No replies, thread closed.

    Yes, the User API's can do this, but an easier way would be to use the CLI (Platform API CLI (genesys.cloud)) and run this command:

    gc users list --autopaginate  | jq -r ".[] | [.name, .id] | @csv" > output.csv

    To get it by a queue, you need to use the routing API/CLI and put in the queue GUID.

    gc routing queues members list {QUEUEID} --autopaginate  | jq -r ".[] | [.name, .id] | @csv" > output.csv



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: About userID, userName

    Posted 05-11-2023 20:52
    No replies, thread closed.

    Thank you for your reply!
    I agree that the CLI is easier.
    Excuse me, I would like to know how to do it with API.



    ------------------------------
    OGATA HIKARU
    NEC Corporation
    ------------------------------



  • 4.  RE: About userID, userName

    Posted 05-11-2023 21:03
    No replies, thread closed.

    You could do it with the routing API:  https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-routing-queues--queueId--members

    You will need to supply the QueueId and the parse the JSON response.  



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------