Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Get list of of Users

    Posted 07-13-2023 17:36
    No replies, thread closed.

    Is there a way to query an API to get a list of users who have not logged in X amount of days?  

    Similarly, is there a way to get a list of users that have NO skills assigned?


    #PlatformAdministration
    #Reporting/Analytics
    #SystemAdministration
    #Unsure/Other

    ------------------------------
    Nichole Conway
    State of Missouri
    ------------------------------


  • 2.  RE: Get list of of Users

    Posted 07-13-2023 23:31
    Edited by Antwuan Rencher 07-18-2023 10:16
    No replies, thread closed.

    @Nichole Conway Hi,

    There is no API with the exact output you are looking for, however, you can use the following APIs: 

    GET /api/v2/users?pageSize=50&pageNumber=1&expand=skills,dateLastLogin,outOfOffice 
    and then iterate through the response to get the skills. 
    The users with no ACD Skills will have node skills empty i.e. in returned JSON from the API you will see it as "skills": [], 
    This API returns the last login date as "dateLastLogin", however, this is not the actual attribute.
    You need to use the API GET /api/v2/users/{userId}/presences/purecloud and then loop for each of the users to get the last login date (modifiedDate): 
          



    ------------------------------
    Tatjana Knezevic

    www.startelecom.cloud

    https://www.linkedin.com/company/star-telecom-www-startelecom-ca-/
    ------------------------------



  • 3.  RE: Get list of of Users

    Posted 07-14-2023 04:05
    No replies, thread closed.

    Hi Nichole,

    For last login you can use get /api/v2/users?pageSize=100&pageNumber=1&expand=dateLastLogin to get all users and check the "dateLastLogin" for each user.

    For skills you can do get /api/v2/users?pageSize=100&pageNumber=1&expand=skills and check who doesn't have any skills.

    For both at the same time add comma between the expand parameters.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 4.  RE: Get list of of Users
    Best Answer

    Posted 07-14-2023 04:22
    No replies, thread closed.

    Did a bit more testing and dateLastLogin seem to be the last time you logged in with your credentials in the login page.
    I leave my browser running so my date was a month ago.

    The value used by the Genesys UI for Last Login seem to be lasttokenissued

    get /api/v2/users?pageSize=100&pageNumber=1&expand=lasttokenissued

          "lastTokenIssued": {
            "dateIssued": "2023-07-13T10:40:27Z"



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 5.  RE: Get list of of Users

    Posted 07-14-2023 09:44
    No replies, thread closed.

    How do I get to that API?  I'm looking under the Users API but am not seeing that one.  Or is this something I can just put in the code editor and click on Run?



    ------------------------------
    Nichole Conway
    State of Missouri
    ------------------------------



  • 6.  RE: Get list of of Users

    Posted 07-14-2023 11:10
    No replies, thread closed.

    It depends what language you're using, here are the links for it

    https://developer.genesys.cloud/useragentman/users/#get-api-v2-users

    https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-users



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 7.  RE: Get list of of Users

    Posted 07-14-2023 11:28
    No replies, thread closed.

    Oh I see, I was looking here: https://developer.genesys.cloud/developer-tools/#/api-explorer 



    ------------------------------
    Nichole Conway
    State of Missouri
    ------------------------------



  • 8.  RE: Get list of of Users

    Posted 07-14-2023 11:36
    No replies, thread closed.

    Okay, I use that as well for testing.

    If you wanna find it there it's under the category Users, and in the bottom you have Get the list of available users.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 9.  RE: Get list of of Users

    Posted 07-14-2023 11:40
    No replies, thread closed.

    Got it, thank you!



    ------------------------------
    Nichole Conway
    State of Missouri
    ------------------------------