3 Replies Latest reply on Jul 16, 2019 10:00 AM by mattj18

    Getting a list of document's from communities.

    petar.bozovic Novice

      Hi All!,




      New here! I am working on this via PHP and using postman for testing. I am trying to determine the most efficient way to pull information for documents. Essentially I am trying to create an export for all documents within a community(i.e. an export for all documents within the marketing community or IT community. I also have some communities that are private/hidden and wonder if there is a different method for this case scenario. I have successfully used oAuth2 to authenticate and receive a token to use. I am trying to determine the correct call/request path in order to pull in the data that contains the document id's/names/, parse that information and export the documents.  Your response is greatly appreciated!!


      Thank you

        • Re: Getting a list of document's from communities.
          mattj18 Jive SME

          They method will not differ for private of public communities. The user account you authenticate with OAuth2 will need permission to view the documents


          Endpoint to find all documents/files in a place: https://mycommunity.com/api/core/v3/places/{placeId}/contents?filter=type(document,file) with the parameter placeId. You may change the filter to include or exclude specific content types.

          Note 1: The /contents response is paginated and you will need to recursively or iteratively call it until you find all results.

          Note 2: You can find the place id by appending /api/v3 to the end of the url: https://mycommunity.com/groups/myGroup/api/v3


          This will return a list of content: Jive REST API v3.14 → Content entity . You may want  to add some logic to handle the following types of content. I recommend the approach below. However, you may find something works better for you or others may have a different style.


          • For Jive native documents, type: "document"
            • Inside the content object, look at the "resources" field. Inside the resources list there is a field for "pdf". This has the reference url to download it.
            • Download the PDF. The converted PDF will contain the comments from the original post.
            • If the original document had attachments (such as a .docx), download the source files in addition to the converted PDF.
              • content object -> attachments field (field may not be present on all documents)
          • For uploaded documents, type: "file" (Word, Excel, PDF, & etc...)
            • Inside the content object, look at the field: "binaryURL" field. This is the download link
            • Download the source files as is.
          2 people found this helpful