• Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 2.14.0 GA
    • 2.14.0 GA
    • System
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • API CCS Sprint 37 (3Scale), API CCS Sprint 38 (3Scale), API CCS Sprint 39 (3Scale), API CCS Sprint 40 (3Scale), API CCS Sprint 42 (3Scale), API CCS Sprint 43 (3Scale), API CCS Sprint 44 (3Scale) 2

      As part of the efforts to bring 3scale's CMS API up and running, we need to adjust the JSON response formats for the CMS endpoints, following these guidelines:

       

      # GET /admin/api/cms/templates.json
      {
        "collection": [
          { "id": 1, "type": "page", ... },
          { "id": 10, "type": "partial", ... }
        ],
        "metadata": {...}
      } 

      ("collection" is a generic key that can be used by any endpoint that returns a collection of objects). 

       

      # GET /admin/api/cms/templates/1.json
      { "id": 1, "type": "page", ... } 

      (Instead of having different keys for each type of template object, we simply add a "type" attribute to the response).

       

      # GET /admin/api/cms/files.json
      {
        "collection": [
          { "id": 2, "title": "some title", ... },
          { "id": 3, "title": "some other title", ... }
        ],
        "metadata": {...}
      } 
      # GET /admin/api/cms/files/2.json
      { "id": 2, "title": "some title", ... } 

      /admin/api/cms/sections and /admin/api/cms/sections/:id have a similar behaviour as /files.

       

      Notes

      The attributes currently returned by the CMS API should not change aside from the addition of the "type" key for the /templates endpoints;

              Unassigned Unassigned
              mkudlej@redhat.com Martin Kudlej
              Martin Kudlej Martin Kudlej
              Thales Miguel Thales Miguel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: