• We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      See CONF-25086 which was marked as fixed, but was not complete.

      Add a Content representation with embedded styles, similar to SOAP API.

            [CONFSERVER-36424] REST API to render content needs content id support

            Bob Swift added a comment -
            1. Thanks for the pointer. That should be just fine .
            2. That would be a nice capability, but, I don't think it is a replacement for the equivalent of SOAP default rendering.

            Bob Swift added a comment - Thanks for the pointer. That should be just fine . That would be a nice capability, but, I don't think it is a replacement for the equivalent of SOAP default rendering.

            Hi bswift,

            /rest/api/content/{id}?expand=body.view 
            

            Will fetch the content with the html body rendered without requiring data to be sent to the server

            There is currently no way to render the content with the styles inline as per the SOAP API, we're investigating it currently, but would prefer to do https://jira.atlassian.com/browse/CRA-256

            Steve Lancashire (Inactive) added a comment - Hi bswift , / rest /api/content/{id}?expand=body.view Will fetch the content with the html body rendered without requiring data to be sent to the server There is currently no way to render the content with the styles inline as per the SOAP API, we're investigating it currently, but would prefer to do https://jira.atlassian.com/browse/CRA-256

            Bob Swift added a comment - - edited

            Another thing that appears to be missing from the REST API is the ability to render the page when a content id is provided and no specific content is provided:

            String renderContent(String token, String spaceKey, String pageId, String content) - returns the HTML rendered content for this page. The behaviour depends on which arguments are passed: If only pageId is passed then the current content of the page will be rendered.

            This is the most efficient option, otherwise the data has to be retrieved from the server and then sent back even. The server already has the content id and doesn't need the data.

            Bob Swift added a comment - - edited Another thing that appears to be missing from the REST API is the ability to render the page when a content id is provided and no specific content is provided: String renderContent(String token, String spaceKey, String pageId, String content) - returns the HTML rendered content for this page. The behaviour depends on which arguments are passed: If only pageId is passed then the current content of the page will be rendered. This is the most efficient option, otherwise the data has to be retrieved from the server and then sent back even. The server already has the content id and doesn't need the data.

            Bob Swift added a comment -

            Yes, I can confirm this works very similar to the SOAP equivalent when the style = "clean" option is specified. Is there no longer an option to render the content with the HTML preamble and stylesheet as is the default with SOAP???

            Bob Swift added a comment - Yes, I can confirm this works very similar to the SOAP equivalent when the style = "clean" option is specified. Is there no longer an option to render the content with the HTML preamble and stylesheet as is the default with SOAP ???

            Bob Swift added a comment - - edited

            Thanks for the pointer. I would not have been able to guess that would have been the way to specify it. I will try this out shortly and let you know.

            "content":{"id":"1448805348"}
            

            Bob Swift added a comment - - edited Thanks for the pointer. I would not have been able to guess that would have been the way to specify it. I will try this out shortly and let you know. "content":{"id":"1448805348"}

            Hi bswift,
            If I understand the issue correctly, this did get done as part of 5.5, I've updated documentation for it here : https://developer.atlassian.com/display/CONFDEV/Confluence+REST+API+Examples#ConfluenceRESTAPIExamples-Convertstorageformattoviewusingaparticularpagefortheconversioncontext

            and will get better documentation it into the javadoc of the resource so it gets generated into the REST API doc in the next confluence release.

            Steve Lancashire (Inactive) added a comment - Hi bswift , If I understand the issue correctly, this did get done as part of 5.5, I've updated documentation for it here : https://developer.atlassian.com/display/CONFDEV/Confluence+REST+API+Examples#ConfluenceRESTAPIExamples-Convertstorageformattoviewusingaparticularpagefortheconversioncontext and will get better documentation it into the javadoc of the resource so it gets generated into the REST API doc in the next confluence release.

              ciacullo Christian Iacullo (Inactive)
              bob.swift@charter.net Bob Swift
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: