4 Replies Latest reply on Jan 10, 2018 1:16 AM by panikal

    Total number of Documents or Count

    arjun Novice

      HI Team,


      We are using REST API , need a  endpoint for total number of content of type documents ,

      our use-case is we want to retrieve the large number of documents from  jive and index in NoSql(solr).So need to know ,initially how many documents exists .


      Appreciate your response.




        • Re: Total number of Documents or Count
          panikal Advanced

          What I do is just iterate through all items in /contents and increment a counter. It can take a long time especially when you get hundreds of thousands of items. Since you must run in serial to get the 'next' URL, assuming you can fire off 5 queries a second, this is 30,000 items a minute...There is no other way to do this from what i can tell. If you want to increase the speed and just want a count, remove all fields except for example 'id' and increase the count=100. Will probably still take a long time depending on whether you're on the cloud or not, time of day (activity levels), etc...We are on-prem and iterating through 100,000 items of content to just get a count still takes ~8-10 minutes.