Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-13282

Support Page Model API with version in the URL as path info

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • None
    • 5
    • Quasar

    Description

      The currently PMA URL is currently something like

      /site/api/[project-name]/page
      

      A different version of the PMA can be requested via the 'Accept-Version' header.

      However, according [1] and [2], the best practice is to have the version in the path info. For the PMA, the most logical part in the pathInfo to support this is most likely this:

      /site/api/1.0/[channel-name]/page
      /site/api/1.1/[channel-name]/page
      /site/api/2.0/[channel-name]/page
      

      Next to this, we also need to decide whether the PMA will become available below

      /site/api/1.0/[channel-name]/page
      

      or rather below

      /site/api/1.0/page/[channel-name]
      

      Since I expect that next to 'page' for PMA we also need to support 'content' to serve a single document in Page Model API format, I prefer :

      /site/api/1.0/[channel-name]/page
      

      which gives room to

      /site/api/1.0/[channel-name]/content
      

      Also note that supporting '/[channel-name]/page' instead of '/page/[channel-name]' is much easier in the current HST. I am not sure how much time the alternative would take to implement but I think considerable.

      The 5 story points is only for moving the version into the pathInfo

      [1] https://ci-xm.corp.bloomreach.com/static-content/api-guidelines/
      [2] https://issues.onehippo.com/browse/BRGAC-4

      Attachments

        Activity

          People

            team-quasar Team Quasar
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: