4 Replies Latest reply on Jan 18, 2018 2:16 AM by jgoldhammer

    Followers of a place: strange API v3 behaviour




      I used to loop through the paginated list of persons that's returned by a "Get place followers" call.

      In the JSON result dictionary there's usually a "links" entry which is a dictionary itself containing the entry "next" which points to the next list of persons to be returned.


      Normally you start with no parameters like this (let's say, our placeID is 682896):


      This returns a nice list of followers (person entities) like this:

      The "list" contains person entities like expected.


      However, note the value of the "next" URI that is meant to be used to get the next 25 ("count=25" URL parameter) entries, starting with entry (=follower) number 25 ("startIndex=25" URL parameter).

      Interestingly, it starts with a fields=%40summary URL parameter. Note, too, that the placeID 682896 is still there.


      Now, if I make this exact API call, .../api/core/v3/places/682896/followers?fields=%40summary&count=25&startIndex=25 , look what I get:

      This is NOT a list of person entities! Instead, it's a list of different entities. In the screenshot you see blogs and groups.



      But the strangest thing: have a look at the "next" URL! Where did the placeID go?!?! The whole "682896/followers" part is suddenly missing from the URL!

      If you send THIS URL you get a result with the very same "next" URL!


      In my code I used this next URL to cycle through the chunks of person result lists and this used to work. But now I'm trapped in an infinite loop because the "startIndex" value is always 25.


      So, before I ask my IT department whether they changed something with the API installation: am I doing something wrong here? Is this a known issue? The API version that's installed here with our Jive installation is 3.11.


      Or is using the /places/{placeID}/followers API v3 method totally dumb and there's a more suitable way to collect all the followers (and their eMail Adresses!) of a given group?


      Thanks so much!