In order to enable some exploration of an external CMS tool as part of 3scale-toolbox, we would like to have json versions of the existing XML-only CMS API methods.
NOTE: These will remain undocumented and unsupported until a decision is made on the path forward. So, it is possible to take some short-cuts when implementing them, which may require re-visiting later to "polish" if we decide to go this path.
Also, we are discussing documenting our API in OAS 3.0 using apicurio - so providing it's relatively clear how to use these endpoints (for a 3scale developer doing experimentation) there is no need for new API docs for them.
API Methods required are:
- list
- update
- delete
- create
for each of CMS 'templates', 'files' and 'sections'
Some of the relevant files: (https://github.com/3scale/porta/search?q=%22%2Fadmin%2Fapi%2Fcms%2F%22&unscoped_q=%22%2Fadmin%2Fapi%2Fcms%2F%22)
Tests
- https://github.com/3scale/porta/blob/9a5aec7eb97cb9c487edc3030665da8ed3f213dd/test/integration/cms/api/files_test.rb [files, templates, sections]
Rspecs
- https://github.com/3scale/porta/blob/c145979122b9f528a3edc5746fcf0002d19c7ce1/spec/acceptance/api/cms_file_spec.rb [files, templates, sections]
Controllers: