16 Replies Latest reply on Sep 18, 2015 9:34 AM by pushpakammela

    Plans to support ExtProps access from v3 REST API?

      Are there any plans to provide access to the ExtProps via the REST API?  Based on the documentation  the ExtProps are available to Apps, but not via the REST API?  This would be very beneficial to apps that are written as integrations which are not Jive Apps or Jive Integrations but which have a need to track additional information relevant to a REST based integration. 

        • Re: Plans to support ExtProps access from v3 REST API?
          mattdickens

          Would it be possible to call an app from some JS in an HTML widget and have it read/write extprops on its behalf?

          So here's my situation:

          I've built an HTML widget that allows icons to be dragged & dropped from one section to a 'favourites' section and it  currently uses a cookie to store each user's list of favourites where the cookie name is favs_[containerid] and then the favourites are stored as a full-stop-delimited (that's a period for those in the US) list of icon ids e.g. 125.23.347

          It works very well on the whole but is of course subject to losing the favourites when users clear their cookies (sadly, this seems to be the first thing on helpdesk staff's list of instructions when anything at all wrong occurs on a PC!). We have 16.5k users using this group as their territory portal which is large enough as it is but other territories are now looking to use the same design and I'd really like to have a better way to store these preferences.

          The extprops seems like an ideal place to store this info but given their use is restricted to Apps and Integrations, I was thinking it might be possible to create an app that's sole purpose is to read/write extprops to user profiles. I was then hoping to be able to call the app from some JS. As long as it can validate the current user's identity and only read/write from/to their profile, it should be secure enough.

           

          Can anyone please tell me if this is feasible or if I'm missing something major and living in dreamland? Any other suggestions would be greatly appreciated!

            • Re: Plans to support ExtProps access from v3 REST API?
              pawans

              Given the current limitation for use of extprops, I would suggest creating an app or html tile in new cloud release instead of html widget and everything in that one app.

              There is no way a widget can call an app.

              What version of Jive are you on?

              • Re: Plans to support ExtProps access from v3 REST API?
                DominicG

                Hey Matt!

                 

                Profile fields can be accessed via the api.

                 

                HACK: You might try creating a custom profile field. Admin Console > People > Settings > Profile Settings > Create new field > Large Text Field. This will create a profile field for each user where your javascript could use the api to store up to 3500 characters of text data. You would probably want to theme out the new field so the data can't be seen on the client side.

                 

                I don't know if this works on cloud, but it works for our hosted instance.

                  • Re: Plans to support ExtProps access from v3 REST API?
                    mattdickens

                    Thanks Dominic, thanks for the suggestion. I considered this approach but the need to theme the new field(s) out won't go down well with our sponsors and central IT guys (I'm not an admin for our environment). Is it not possible to create a profile field and not have it automatically added to the UI? I know we've got a few custom profile fields and I didn't realise we had to theme them OUT - I assumed we had to theme them IN.

                    I also need to store preferences for mutliple groups that use the template. I suppose I could write something to save all the prefs from all the groups together/extract specific prefs but it would be preferable to have individual fields for each one.

                     

                    I also considered storing the prefs in a Jive document in the user's personal document space, visible only to them. It would be a very clunky approach though and the document would appear to users in their activiy stream and no doubt confuse them.

                    Storing in a private bookmark might be another option but its really a hack/bodge that I'm not comfortable with.

                      • Re: Plans to support ExtProps access from v3 REST API?
                        mattdickens

                        Have I confused matters by referring to these additional profile properties as extprops rather than PrivateProps?

                         

                        I just found this post Re: Bookmark Count for contents and User property using Rest Api where Ryan Rutan states 'As for PrivateProps, the service is limited to Add-Ons/Apps, so you'll need to make sure to interact with these properties either via an App or using the integration user generated for your Add-On, which means via OAuth.

                         

                        Ryan - when you say 'using the integration user generated for your Add-On', do you mean it is possible to make a read/write request to these privateprops using the client id/secret as defined in the addon thus effectively using the addon as a tunnel?

                        • Re: Plans to support ExtProps access from v3 REST API?
                          DominicG

                          Matt Dickens wrote:

                           

                          Is it not possible to create a profile field and not have it automatically added to the UI?

                          I'm sure this is possible. Although, I don't know how to do that.

                           

                          Matt Dickens wrote:

                          I know we've got a few custom profile fields and I didn't realise we had to theme them OUT - I assumed we had to theme them IN.

                          It depends on your use case. If you don't mind people seeing the custom profile fields, there is no need to theme them out.

                          The way we use a couple of those fields, we are storing cryptic looking JSON data. There is no reason for our users to see that, and it would only cause confusion, so we hide them.

                            • Re: Plans to support ExtProps access from v3 REST API?

                              Dominic G wrote:

                               

                              Matt Dickens wrote:

                               

                              Is it not possible to create a profile field and not have it automatically added to the UI?

                              I'm sure this is possible. Although, I don't know how to do that.

                               

                              Matt Dickens wrote:

                              I know we've got a few custom profile fields and I didn't realise we had to theme them OUT - I assumed we had to theme them IN.

                              It depends on your use case. If you don't mind people seeing the custom profile fields, there is no need to theme them out.

                              The way we use a couple of those fields, we are storing cryptic looking JSON data. There is no reason for our users to see that, and it would only cause confusion, so we hide them.

                              Yes, it is possible to create a Profile field and not have it display in the UI.  There is a "visible" eyeball icon next to each custom profile field you create that controls that behavior.

                               

                              You shouldn't need to do any theme work to make custom profile fields appear unless you have strict UI requirements that exceed the order stacking capabilities and default rendering in the management console.