On this page
- RESTful Web Services
- Adding filters to narrow your results
- Limit your query and paginate
- Filter by content type
- Filtering on issue data
- Filtering users on Drupal Association individual membership
- Filtering organizations on Drupal Association organization membership or partner program
- Additional data included
- Project’s machine name
- Security advisory risk
- Sample queries
- Get the data for a project (like its nid):
- Show all the change notices for a project:
- Show all the critical, needs review issues for Drupal 8.0.x:
- Show all the issues tagged with "d8dx":
- Show all the Security Advisory nodes:
- Get all the comments for a particular node:
- Get information on a particular file:
- Look up a taxonomy vocabulary by ID:
- Get all the taxonomy terms for a particular vocabulary (e.g. all project release types):
- Get all Drupal Association individual members
- Get all Drupal Association organization members
- Requesting additional metadata
- Comment credit metadata
- Issue-related MRs [Feature request | Implementation]
- Other APIs
- Projects
- Index of all projects
- Releases
- Contribution Records
- RSS
- Automatic updates
- Drupal.org subsites
- Tools for interacting with Drupal.org's API
REST and other APIs
This documentation needs work. See "Help improve this page" in the sidebar.
Please use Drupal.org’s APIs respectfully.
- Use an appropriate user agent string.
- Make requests from a single thread.
- Cache results locally whenever possible.
Abuse will be blocked as needed.
For support and requesting API changes, use the Infrastructure issue queue.
RESTful Web Services
Drupal.org uses the RESTful Web Services module to expose node, comment, user, file, taxonomy_vocabulary and taxonomy_term resources. An important difference is that Drupal.org prepends api-d7/ to paths, which may be removed in the future. For example, this page is available at https://www.drupal.org/api-d7/node/2773581.json. Only read access is allowed.
All requests must either have an Accept: [application/json|application/xml] request header or .[json|xml] extension.
Additionally the api provides querying capabilities. These endpoints are available at https://www.drupal.org/api-d7/{entity-type}.json
The query endpoints will return up to 100 resources, paged, and controlled by filters on the entity.
For example, https://www.drupal.org/api-d7/node.json?type=casestudy will return the first 100 nodes of the casestudy type. To filter the entity, add another querystring parameter for the field you wish to filter on.
https://www.drupal.org/api-d7/node.json?type=casestudy&field_status=featured will show just the case studies that are 'featured'
The following entities are available through the Drupal.org API:
- users: user.json or user.xml
- nodes: node.json or node.xml
- comments: comment.json or comment.xml
- files
- Get information on a specific file:
https://www.drupal.org/api-d7/file/[fid].json - e.g. https://www.drupal.org/api-d7/file/4688627.json
- Get information on a specific file:
- project maintainers
- Get project maintainers for a specific project:
https://www.drupal.org/project/[project ID]/maintainers.json - e.g. https://www.drupal.org/project/drupal/maintainers.json
- Get project maintainers for a specific project:
Adding filters to narrow your results
For further information and features see the RestWS documentation: https://git.drupalcode.org/project/restws/-/tree/7.x-2.x/
Limit your query and paginate
You can pass special meta controls to your query: limit, page, sort, and direction. For example, if you only wanted users 11-20 sorted by user id descending: https://www.drupal.org/api-d7/user.json?limit=10&page=2&sort=uid&directi...
There is a hard-coded limit of 50. If you want more than 50 records you will need to use the pagination feature.
Filter by content type
The content types listed below link to their filtered JSON query.
- book
- book_listing
- casestudy
- changenotice
- forum
- organization
- packaging_whitelist
- page
- project_issue
- project_core
- project_distribution
- project_drupalorg
- project_module
- project_release
- project_theme
- project_theme_engine
- sa (security advisory)
Deprecated content types
You probably will not need these.
Filtering on issue data
Of particular interest is interacting with the issue queues. Some of the field values returned by the api are the numeric representations in the database. The following mappings are used for some key fields on project_issue nodes:
field_issue_priority
- 400 = Critical
- 300 = Major
- 200 = Normal
- 100 = Minor
field_issue_status
- 1 = active
- 2 = fixed
- 3 = closed (duplicate)
- 4 = postponed
- 5 = closed (won't fix)
- 6 = closed (works as designed)
- 7 = closed (fixed)
- 8 = needs review
- 13 = needs work
- 14 = reviewed & tested by the community
- 15 = patch (to be ported)
- 16 = postponed (maintainer needs more info)
- 17 = closed (outdated)
- 18 = closed (cannot reproduce)
field_issue_category
- 1 = Bug report
- 2 = Task
- 3 = Feature request
- 4 = Support request
- 5 = Plan
Available Taxonomy Vocabularies
- 1 = Forums (Special case, uses taxonomy_forums instead of taxonomy_term_1)
- 2 = Screenshots
- 3 = Module categories
- 5 = Drupal version
Via Comment - Only used for older Drupal releases with version numbers like7.x-1.2that 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. - 6 = Core compatibility
- 7 = Release type
- 9 = Issue tags
- 31 = Page status
- 34 = Front page news
- 38 = Audience
- 44 = Maintenance status
- 46 = Development status
- 48 = Services
- 50 = Sectors
- 52 = Locations
- 54 = Keywords
- 56 = Level
- 58 = License
- 60 = Book availability
- 62 = Book format
Filtering users on Drupal Association individual membership
field_da_ind_membership_value
Current= current memberNew= current member who has joined recentlyGrace Period= member whose membership is currently expiring soon
field_da_join_date
Date of first membership.
field_da_expiration_date
Current membership expiration date.
Filtering organizations on Drupal Association organization membership or partner program
field_org_membership_status
Current= current memberNew= current member who has joined recentlyGrace Period= member whose membership is currently expiring soon
field_organization_support
hosting= member of Drupal Hosting Supporter Programhosting_premium= premium member of Drupal Hosting Supporter Programhosting_signature= signature member of Drupal Hosting Supporter Programsupporting= member of Drupal Supporting Partner Programsupporting_premium= premium member of Drupal Supporting Partner Programsupporting_signature= signature member of Drupal Supporting Partner Programtechnology= member of Drupal Technology Supporter Programtechnology_premium= premium member of Drupal Technology Supporter Program
Additional data included
Data returned by RestWS directly follows Drupal’s entity API and how Drupal.org structures its fields. Some additions have been made for convenience.
Project’s machine name
Values of field_project, found in project_issue, sa, and changenotice node types, have an additional machine_name property.
Security advisory risk
sa nodes have an additional sa_risk property with the score out of 25 and text description, like [10,"Moderately critical"] See Security risk levels defined for details on risk calculation.
Sample queries
Get the data for a project (like its nid):
https://www.drupal.org/api-d7/node.json?field_project_machine_name=payment
Show all the change notices for a project:
https://www.drupal.org/api-d7/node.json?type=changenotice&field_project=1353878
Show all the critical, needs review issues for Drupal 8.0.x:
https://www.drupal.org/api-d7/node.json?type=project_issue&field_project=3060&field_issue_status=8&field_issue_version=8.0.x-dev&field_issue_priority=400
Show all the issues tagged with "d8dx":
https://www.drupal.org/api-d7/node.json?type=project_issue&field_project=3060&taxonomy_vocabulary_9=20540
Show all the Security Advisory nodes:
Newer advisories (as of October 2017) have their own "sa" content type:
https://www.drupal.org/api-d7/node.json?type=sa&status=1
Older security advisories used forum taxonomy term 44 (contrib) and 1852 (core). Forum terms use taxonomy_forums= instead of taxonomy_term_1=tid:
https://www.drupal.org/api-d7/node.json?taxonomy_forums=44
https://www.drupal.org/api-d7/node.json?taxonomy_forums=1852
There is also a taxonomy term 1856 for Security public service announcements. These are sometimes used to announce upcoming highly critical releases:
https://www.drupal.org/api-d7/node.json?taxonomy_forums=1856
Get all the comments for a particular node:
Note: Comments use the filter ‘node’, instead of nid.
https://www.drupal.org/api-d7/comment.json?node=1978202
Get information on a particular file:
https://www.drupal.org/api-d7/file/4688627.json
Look up a taxonomy vocabulary by ID:
https://www.drupal.org/api-d7/taxonomy_vocabulary.json?vid=7
Get all the taxonomy terms for a particular vocabulary (e.g. all project release types):
https://www.drupal.org/api-d7/taxonomy_term.json?vocabulary=7
Get all Drupal Association individual members
https://www.drupal.org/api-d7/user.json?field_da_ind_membership[value][]=New&field_da_ind_membership[value][]=Current&field_da_ind_membership[value][]=Grace%20Period
Get all Drupal Association organization members
https://www.drupal.org/api-d7/node.json?type=organization&field_org_membership_status[value][]=New&field_org_membership_status[value][]=Current&field_org_membership_status[value][]=Grace%20Period
Requesting additional metadata
Comment credit metadata
Issues support requesting comment credit metadata with the drupalorg_extra_credit query arg. E.g https://www.drupal.org/api-d7/node/3332546.json?drupalorg_extra_credit=1
Issue-related MRs [Feature request | Implementation]
Issues support requesting related MR data with the related_mrs query arg. E.g https://www.drupal.org/api-d7/node/3332546.json?related_mrs=1
{
"related_mrs": { "https://git.drupalcode.org/project/drupal/-/merge_requests/3233" }
}Other APIs
Projects
Index of all projects
Drupal.org exposes a view with this information:
(Also works for theme engines, drupal.org projects and other project_foo types listed above.)
Releases
See the update status XML documentation.
Contribution Records
Credit was moved from drupal.org issue comments into its own content type, called "Contribution Record". The information is available via jsonapi endpoints.
To make it easier to query, additional endpoints are available to read credit information:
https://new.drupal.org/contribution-records-by-user?PARAMShttps://new.drupal.org/contribution-records-by-organization?PARAMShttps://new.drupal.org/contribution-records-by-organization-by-user?PARAMS
You should add filters to those endpoints, to limit the data to be retrieved. The options are documented in the README file of the underlying module.
Those endpoints accept most of the following parameters:
username= Username to filter records from.organization= Title of the organization to filter records from.machine_name= Project machine name (eg: project_browser).page= Page within the paginated dataset.months= Number of recent months to bring records (eg: 3 = last 3 months).is_sa= (0 or 1) Is Security Advisory.csv_export= (0 or 1) Only available incontribution-records-by-userandcontribution-records-by-organizationto get all time credits.
If you don't fill up months, you'd be asking for all-time data, so the requests might take longer or even timeout.
RSS
Various pages have RSS feeds, discoverable via <link rel="alternate" type="application/rss+xml" …> tags. This is a good way to find recently-updated content.
Automatic updates
APIs supporting automatic updates are documented in the Automatic updates guide.
Drupal.org subsites
Localization client sends translations to localize.drupal.org.
Tools for interacting with Drupal.org's API
- Drupal.org API Component: This SDK provides a simple PHP layer for interacting with Drupal.org's API. Currently it supports Users and Nodes with special handling for Project Issue & Page Nodes.
- Drupal.org API client: An alternative to above based on Guzzle 6. It supports all the listed entity types and provides constants to deal with vocabularies, issue status, etc. It is used for DruStats and other projects.
- Drupal.org Javascript API client: A tiny, universal (browser, nodeJS) npm wrapper for interacring with the Drupal.org's API written in Typescript.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.