This is an API module that facilitates connections to a Spectra Analytics server.

Creating connectors

Upon enabling this module, under /admin/structure you will see a new menu entry, Spectra Connect Entity Listing. These are to set up connections to a Spectra server that is utilizing the key_auth module. The module allows multiple connectors, as there are use cases where you might use differing Spectra plugins on the same site, or you might have different servers to communicate with (i.e. one for data entry and another for reporting).

Using connectors

  • Call Drupal\spectra_connect\SpectraConnectUtilities::load_connector_by_name() to load a connector entity by the name you gave it on creation.
  • Using your loaded connector, cal ::spectra_get() or ::spectra_post with your connector and relevant data. This will create an appropriately formatted GET/POST request, and send it to the server. You can parse the returned response body as needed.

Requirements

This module is meant to connect to a Spectra Analytics server, which may be hosted on the same Drupal site, or a separate one for scaling purposes. The Spectra server must implement the key_auth module, as this module connects using key-based authentication.

Supporting organizations: 
CeriumSoft maintains and develops the Spectra modules and distribution.

Project information

Releases