Problem/Motivation

At the moment COD doesn't provide any API for the 3rd party application to work with. This fact makes impossible to build any native mobile (or other) application, that can connect to COD and retrieve some pieces of information.

Proposed resolution

Add RESTful Web Services module to the COD distribution.
Pros:

  • Automatically makes all entities accessible via RESTful web services
  • Uses entity access mechanism for fine-grained control over access
  • Used as a base for Drupal 8 REST in Core

Remaining tasks

  1. Provide a patch that adds REST WS to COD
  2. Investigate what custom resource controllers might need to be added
  3. Implement custom controllers from #2 (if any)
  4. Create end user documentation for cod related entities

User interface changes

REST WS module provides set of user permissions: access resource <entity_type>. Site administrators must grant access permissions to some resources (if needed). All permissions are disabled by default.

CommentFileSizeAuthor
#1 cod-add_restws_module-2325391-1.patch1.58 KBtaran2l

Comments

taran2l’s picture

StatusFileSize
new1.58 KB

Patch attached. Please review.

mrconnerton’s picture

Issue summary: View changes

I really like the idea of adding restws support to cod but this doesn't need to be a dependency of the profile. Ideally we would create a cod_restapi module under cod_support that would have the dependency on restws and any custom endpoints we specify. The patch to the distro would add the module to the make file and include support for enabling cod_restapi during the install process.