5 Replies Latest reply on Jul 27, 2017 11:48 AM by gopi.gorantala

    How to get default avatar list?

    shengzhi

      For users, there are some default avatars, they can choose one as their avatar.

      Currently, I want to know people's avatar is system avatar or new photo that uploaded by themselves.

      Is there any API to get the default avatar list?

        • Re: How to get default avatar list?
          gopi.gorantala

          You can query it with the following, as I did

           

          noCache helps to get the current image rather than an old cached profile picture of a user.

           

          "/people/' + username + '/' + jiveVersion + '/profile-image-display.jspa?size=200&userID=' + userID + '&_noCache=' + getCurrentTime + '"

            • Re: How to get default avatar list?
              shengzhi

              Thanks for your reply, but this API is not useful for me. I want to know all the system avatar ID.

              Is there jive REST API can get the system avatar list?

                • Re: How to get default avatar list?
                  gopi.gorantala

                  I remember, I have had some requirement to upload custom avatar list(can be done through admin-console>people>Avatar-setting> {{upload}}...

                   

                  There is no Jive rest api to pull all jive default avatars and its avatarID..   Ryan RutanRashed Talukder , any idea ?

                    • Re: How to get default avatar list?
                      Jonathan Block

                      It would certainly be helpful if Jive attached a "System Default" flag of some sort to the pre-populated avatars.

                       

                      In lieu of that, you could theoretically pull down all the currently-available avatars, with numbers and images, then compare those to the ones configured on the avatar management admin page.  If you haven't modified that list, or if you have but you know which ones you changed, you should be able to easily isolate the IDs of the system avatars.

                       

                      Once you have that ID list, it should be fairly easy to compare each user's avatar ID with the list to determine which are custom.

                       

                      I did a much simpler version of this when initially importing avatars from a legacy system into our Jive environment.  It appeared that the default avatars were sequentially numbered from 1 to X (40?).  Maybe 1001-1040.  Anyway, I just tested for avatar ID > X to determine which ones were new uploads.  I think this wouldn't work if new default avatars are uploaded later, as they may get arbitrary numbers well above X.