Allow finding Drupal projects by core version and releases in the API

Created on 22 May 2023, about 1 year ago

Problem/Motivation

I recently discovered the Drupal.org API since I need to maintain a large syndicated list of modules for our community, but I found it not very useful. One key feature that's missing (not even mentioned in the doc examples) is to be able to find modules like it is already possible from the UI but from the API.

Steps to reproduce

1. Find the documentation with a Google search (no Drupal.org menu links bring to the API) to be at https://www.drupal.org/drupalorg/docs/apis/rest-and-other-apis
2. See available info for the Feeds project as an example at https://www.drupal.org/api-d7/node.json?type=project_module&field_projec...
3. Check what the "taxonomy_vocabulary_XX" fields mean at https://www.drupal.org/api-d7/taxonomy_vocabulary.json
4. Find the projects' taxonomy vocabulary related to Drupal version:
the vocabulary id is "vid" = "5", so you add ?vid=5 to the URL...

...and you find only 10 out of 50,096 modules are on Drupal 10?! This must be wrong.
5. Check the projects with taxonomy term id related to the latest and recommended core release (that you suppose is Drupal 10, ie. should we have a specific field about this?).. You found out the term id is 195821but you can't or don't know how to use it

6. Start searching for an alternative CMS.. or start contributing to make Drupal better.

Proposed resolution

Add a few very useful fields in the API output at https://www.drupal.org/api-d7/node.json?type=project_module , like:

- A: field_project_releases with values similar to what's currently available in project_usage (last field in the JSON API output), maybe with subfields (or another field) regarding stability (the green and yellow in the UI) and current (Drupal Association?) recomendation
- B: field_project_core_versions using what is already available at vocabulary_5 "Drupal version", that somehow modules' maintainers are not using (!?) or is currently a bug in the API (I guess the latter since core version requirement is correctly shown on each module page)
- C ..
..so that Drupal users could easily filter imported modules based on their required core version and stability, or directly import only the relevant ones with something like this:
https://www.drupal.org/api-d7/node.json?type=project_module&field_project_core_versions=10&field_project_releases.stability=stable

🙏🏻

Remaining tasks

User interface changes

API changes

The approved/implemented specifics of the proposed solution..

Data model changes

🐛 Bug report
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

🇮🇹Italy kopeboy Mainland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kopeboy
  • Status changed to Closed: duplicate about 1 year ago
  • 🇺🇸United States drumm NY, US

    vocabulary_5 is only used for older Drupal releases with version numbers like 7.x-1.2 that are only compatible with one version of Drupal. Since current Drupal contrib releases can be compatible with any version of Drupal core, we no longer use the core compatibility vocabulary.

    regarding stability (the green and yellow in the UI) and current (Drupal Association?) recomendation

    Supported and recommended versions are up to each individual project maintainer. The Drupal Association does not make these recommendations.

    The api-d7 endpoint is no longer getting improvements as it will not be practical to maintain once Drupal.org upgrades. It will be removed in the future. We are working on a new version of the API to support the project browser project, #3218285: Document web API requirements for Project Browser . That API is being designed to support project browsing, so should cover your use cases.

Production build 0.69.0 2024