Skip to content

Resolve #3427686 "Multiple fixes for REST clients"

Closes #3427686 REST storage clients refactoring.

Fixes:

New features:

  • Provide an optional setting for a different URL from the "list" one to fetch entities that supports an {id} token
  • Provide an optional setting to get the total number of available entities (or provide a static value when the endpoint does not provide a way to get that number)
  • Provide an optional delay between consecutive endpoint queries to partially support endpoint limitations (starting point that needs to be improved in the future)
  • Provide static caching when entities can be fully loaded from the "list" query to avoid unnecessary endpoint queries (to load each external entity individually when listing for instance)
  • Added an optional "data path" settings to support the diversity of REST services and handle each case
  • Improved pager system to support discrepancies between the Drupal-side paging system and the endpoint paging system and restrictions (max number of items per page, indexes starting from 1 instead of 0,...)
  • Improved authentication support: now the API key can be specified either in the header or in the query string but it is specified at one place. There is a basic support for OAuth "Bearer" token (the token still needs to be entered on the admin side but it will be possible to make it support authentication plugins in the future). It is also possible to specify custom authentication headers.
  • Support for additional (custom) HTTP headers in a dedicated section (for instance for accepted server answer format)
  • "{id}" token replacement in single entity query string
  • Simplified Wiki client settings with pre-configured (hidden) settings and improved help/hints
  • Simplified Drupal JSON:API client settings with pre-configured (hidden) settings and improved help/hints
  • Improved performances with the new pager system and the static cache (when possible)
  • A wider range of supported REST API
  • Additional automated tests to test REST client features and default external entity behavior

Merge request reports