8 Replies Latest reply on Jun 8, 2017 6:05 AM by Aaron Freeland

    REST API: how to convert user-name to user-id

    Glauber Ribeiro

      In order to query or manipulate an user account, the REST API requires the "user-id", which is the new-style id, a long gibberish string, not the old numeric id, or the id the user logs in with (called "user-name"). However, there is no easy way to find this piece of information. Typically, all we have is the login id (user-name).

       

      The only way to convert user-name into user-id seems to be "Get Users On Site" (which in our case, will return several hundreds of users) and scan each user returned until we find the one we want. This is not even guaranteed to work: what if we don't know what site the user belongs to?

       

      Certainly there must be another way? What am I missing?

       

      Thanks,

       

      glauber