4 Replies Latest reply on Sep 13, 2016 4:17 AM by nils.drews

    Update user attribute "visible" to false


      Hi all,


      We are using the 'run-as' strategy for an API call but the call is getting tracked as user activity and this is throwing off our engagement index.  We opened a case with support and they suggested changing the user attribute visible to false for the dedicated API user.


      From Support:


      From there you can run a get on a user: GET <yoururl>/api/core/v3/people/<userid>. Once you have the users information there is a field called visible, you can set this to false.

      Eample: https://jivesupport-jive-x.jiveon.com/api/core/v3/people/2031


        "id" : "2031",

        "resources" : {

          "reports" : {

            "allowed" : [ "GET" ],

            "ref" : "https://jivesupport-jive-x.jiveon.com/api/core/v3/people/2031/@reports"


          "followingIn" : {

            "allowed" : [ "POST", "GET" ],

            "ref" : "https://jivesupport-jive-x.jiveon.com/api/core/v3/people/2031/followingIn"



          "locale" : "en_US",

          "externalContributor" : false,

          "profile" : [ {

            "jive_label" : "Biography",

            "value" : "stuff",

            "jive_displayOrder" : 7,

            "jive_showSummaryLabel" : false

          }, {

            "jive_label" : "Field",

            "value" : "Battlestar Galatica",

            "jive_displayOrder" : 15,

            "jive_showSummaryLabel" : false

          } ],

          "sendable" : true,

          "timeZone" : "America/Los_Angeles",

          "username" : "abswed",

          "visible" : true,

          "status" : "registered"


        "location" : "here",

        "name" : {

          "familyName" : "weddle",

          "formatted" : "abbey weddle",

          "givenName" : "abbey"


        "thumbnailId" : "1001",

        "thumbnailUrl" : "https://jivesupport-jive-x.jiveon.com/api/core/v3/people/2031/avatar?a=1001",

        "initialLogin" : "2015-08-20T22:01:53.496+0000",

        "type" : "person",

        "typeCode" : 3



      However when I tried that as a POST or PUT call the visible attribute did not change to invisible.  I am getting a 400 bad request and that field is not documented as an update-able field: https://developers.jivesoftware.com/api/v3/6.0/rest/PersonEntity.html (visible property is not listed here).


      Here is the POST call I am making:

      I am using my admin user with full admin rights for authorization.


      Any ideas of what I am doing wrong here?



        • Re: Update user attribute "visible" to false

          Hey Sam,


          Generally speaking the API should mirror the UI, if it can be done in the UI then it can be done in the API.  In this case, the UI does not allow you to set an account to "Hidden" aka turn "Visible: false".  As such, the API will not permit you to change this field and you'll have to modify it directly in the database if you'd like to make a change. 


          Setting accounts to Hidden also stops them from consuming a user license seat which is another reason why you can only hide accounts through manual database manipulation.


          Erin Cleary

          Matthew Tervo

          2 people found this helpful
            • Re: Update user attribute "visible" to false

              Seth, thanks for the input.
              We use several admin accounts in our community which are needed to separate the normal user account and administrative account of one user. This is needed so that the user normally can interact with the community and switch to the other account when needed...


              Typically that accounts should be hidden in the community so that other people don't follow admin accounts etc. So in my eyes, it makes totally sense to make them hidden easily in the UI. As this is a second account for the same User, it don't make sense to pay for a licence. To avoid misuse you could introduce a hidden user limit to only allow 20 user (maybe depending on the community size) or so to be hidden.


              What do you think?

                • Re: Update user attribute "visible" to false

                  Seems reasonable enough to me, why don't you file an idea in the Ideas for Jive community?  If the idea nets over 50 votes this quarter it'll be reviewed by product and that's your best bet to get a new feature into the core application.  As it stands, you have to modify the jiveuser table in the Application database and set visible to 0 if you want an account to be hidden.  There is no other method at this time for hiding accounts.

                  1 person found this helpful
              • Re: Update user attribute "visible" to false

                Your POST is wrong, visible IS indeed an updateable field. You need to send the JSON and not only a single form field:

                Screen Shot 2016-09-13 at 13.14.42.png