Skip to content

Expose the Content, Document, and Editoria11y Report Views to REST API #290

@michaelablackham

Description

@michaelablackham

Is your feature request related to a problem? Please describe.

For the MA accessibility compliance program, it is crucial for all secretariats to do monthly or bi monthly pulls for all content from Mass.gov to show accessibility progress over time. This is proving to be an extremely manual process as we need to search each agency, and each division, and download the CSV each time for each one. For some secretariats, like EEA, this is an extremely long process due to the amount of organizations that fall within that umbrella.

EEA is currently working on a PowerBI dashboard to pull in these monthly progress updates and we are hoping to do this automatically to avoid the current time waste manual process. The goal is that this dashboard will be a baseline for all secretariats to pull in their information in a more consistent and clean way.

I can currently access the https://www.mass.gov/jsonapi no problem, and I do see access to a view https://www.mass.gov//jsonapi//view//view, but I don't believe this is the view we are looking for (as I cannot see the machine_name for the appropriate views and Many of these say we do not have permissions). So it could just be a permission issue, otherwise you may have to follow the suggestion below.

Describe the solution you'd like

The current JSON feed does not expose the information for these views. I would like a new exposed API endpoint for the following views:

  1. Content (content)
  2. Documents (all_documents)
  3. Editoria11y Report (accessibility_report_for_authors)
  4. Ensure permissions are set for a Developer to be able to GET the information

Having endpoints to these views will make our accessibility Monthly reporting a much smoother process and save time for other important Accessibility initiatives. EEA is currently creating a dashboard for all things accessibility to show progress over time and show complete transparency to all agencies.

Additional context

From the Drupal standpoint, I believe it should be pretty straight forward, however I do not know the ins and outs of the Mass.gov development setup and current config of course. But from my understanding I would:

  1. Enable the core "Rest" module.
  2. Create a new View and add a "REST Export" display, or leverage the current view and add a new "REST Export" display mode.
  3. Add a path to access the endpoint.
  4. Add your fields, filtering, etc. (this should be the same content shown in the current CSV)
  5. Leverage https://www.drupal.org/project/rest_views module if you need it for cleaned up data.
  6. Ensure permissions are set for a Developer to be able to GET the information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Queued for work

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions