1 Reply Latest reply on Jul 2, 2019 5:17 AM by Robert Hanson

    JIVE API - get content - last modified

    nicolasjrc

      Hi everyone,

      For a custom tile, i am using the api to fetch content, based on tags or places.

      I am able to filter, to sort out and so on, and to get for each result the fields I am interested in, author, creation date...and many others BUT the user id of the user that last modified the document... is it available through the api??

       

      I found item.updated to get the date, but nothing about the corresponding user... has anyone managed to retrieve it?

      thanks,

      Nicolas

        • Re: JIVE API - get content - last modified
          Robert Hanson

          For Documents, File Uploads, and Photos you can fetch the last version to see who made the edit.  It is a multi-step process though.

           

          1. Fetch the content.
          2. Check for the "versions" resource link in the response (only content types that support versioning will have this)
          3. Fetch the versions URL, and grab the first item (the first item is the most recent change)
            1. i.e. /api/core/v3/versions/<CONTENTID>?count=1
          4. Fetch the "self" resource for the specific version to get the author.
            1. i.e. /api/core/v3/versions/<CONTENTID>/<VERSION>?fields=author

           

          Normally when you fetch the list in #3 you would get the author there in the results list and not need to follow the "self" link, but in my testing (tested in Jive cloud) the author field isn't available in that list view.

           

          For other content types I don't believe that it is possible to get that info.

          1 person found this helpful