5 Replies Latest reply on Aug 17, 2014 6:36 PM by tone

    REST API Documentation: streams/{streamID}/activities


      Hi Community,


      A developer on our side has a question.



      Is the following result a result of the API spec?


      When issuing the following GET, expecting 20 results, he only gets 10 back:


      https://<Jive URL>/api/core/v3/streams/100/activities?count=20



      Relevant Documentation

      I found this in the documentation, but it doesn't specify the maximum number of returned results.


      Link: https://developers.jivesoftware.com/api/v3/cloud/rest/StreamService.html#getActivity(String, String, String, int, List<String>, String, boolean, boolean, String, boolean)


      Get Activity

      GET /streams/{streamID}/activities


      countIntegerfalseMaximum number of activities to return in this request (you may get more activities than this in order to get all of the activities in the last collection)




      Thanks in advance for any feedback!



        • Re: REST API Documentation: streams/{streamID}/activities
          Ryan Rutan

          Definitely seems odd.  Can you confirm that there are 20, or more than 10, entries in the stream?  I just validated this against the Jive Community (Jive 7), using:

          ?count=2,10,20,50 and got the appropriate results. 


          Can you share version information or any other details that might be relevant?

            • Re: REST API Documentation: streams/{streamID}/activities

              Hi Ryan,


              Thanks for the reply. I was able to get more clarification on the issue:



              URI's like the ones below, which retrieve Activity objects, return not only comments but other types of updates made to a certain piece of content:


              • https://<Jive URL>/api/core/v3/streams/100/activities?count=20
              • https://<Jive URL>/api/core/v3/activities




              • In the "comments" subset of a list of Activities, if comments exist in that list, it was observed that the list only includes up to only the most recent 10 comments for a given piece of content. Is this by design, and is it possible to increase this threshold?
              • In other news, it was also observed that GETting Activities returned a list of 28 objects even when the items per page attribute was 25. Is there something in the design which accounts for this, or is this an error in our understanding of this value?


              Thanks, and sorry for the miscommunication in the original post.



                • Re: REST API Documentation: streams/{streamID}/activities
                  Ryan Rutan

                  Missed the extra detail here.  Will re-escalate and follow-up today.

                  • Re: REST API Documentation: streams/{streamID}/activities
                    Ryan Rutan

                    A few thoughts here on the Activities API.  Because the activities API filters out for things for security purposes (like entitled content) and also can contain activity for content that doesn't exist any more...it is possible for these counts to be off.


                    As a Test, I would create a group.  Then create a stream that uses that group.  Flood it with activity and content and my guess is that the stream/activity should match up.  If they dont then we'll need to look deeper, but as it stands, pretty sure that the post-process cleansing of non-permissioned activity and stale content makes the most sense on the discrepancy.


                    As for the Comments.  That sounds like a cache-setting IMO, but I've asked internally.  My guess is that it will not be configurable but will let them weigh in.


                    Thanks for continuing to be an awesome contribution of information and great questions in the developer community =)