Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

jsonrpc

780 sites Security covered
View on drupal.org

JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol.

This module implements a framework for creating non-RESTful services. It is intended to be the platform on which a decoupled Drupal administration and introspection interface can be built.

While JSON API module handles entity data and REST can be used to create custom REST resources, some Drupal actions can't be neatly handled with REST principles. Clearing cache is a perfect example.

JSON-RPC exposes Drupal internal data like permissions or installed modules. Additionally, JSON-RPC can be used to execute actions remotely against your Drupal application, like clearing caches or putting the site in maintenance mode.

Not all features are implemented. If you would like to help, you can find or add to the list of missing APIs.

Learn more about the motivation and the internals of this module in this article.

Read the article

Discovery

The available RPC services along with documentation and usage details can be discovered by sending an HTTP GET request to /jsonrpc/methods. To make these available you will need to enable the jsonrpc_discovery sub-module.

Usage

To execute an RPC method, send an HTTP POST request to /jsonrpc. The body of your request must adhere the JSON-RPC specification.

You can also execute an RPC method sending a GET request with a ?query= parameter. Remember to URL-encode the JSON string. Many CDNs only allow caching on GET requests so this is the recommended approach in most situations.

Examples

You can use this Postman Collection with examples and tests. These RPC examples are provided by the jsonrpc_core sub-module. Enable it to see the examples in action.

Example request/response:

Request
POST
{
  "jsonrpc": "2.0",
  "method": "plugins.list",
  "params": {
    "service": "plugin.manager.link_relation_type",
    "page": {
      "limit": 3,
      "offset": 1
    }
  },
  "id": "relation-types"
}

The same request using the GET method (after URL encode) would be:

https://example.org/jsonrpc?query=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22plugins.list%22%2C%22params%22%3A%7B%22service%22%3A%22plugin.manager.link_relation_type%22%2C%22page%22%3A%7B%22limit%22%3A3%2C%22offset%22%3A1%7D%7D%2C%22id%22%3A%22relation-types%22%7D

Response

That will return a list of the relation type plugins available on the site.

{
  "jsonrpc": "2.0",
  "id": "relation-types",
  "result": {
    "add-page": {
      "class": "Drupal\\Core\\Http\\LinkRelationType",
      "uri": "https://drupal.org/link-relations/add-page",
      "description": "A page where a resource of this type and related types can be created.",
      "provider": "core",
      "id": "add-page"
    },
    "delete-form": {
      "class": "Drupal\\Core\\Http\\LinkRelationType",
      "uri": "https://drupal.org/link-relations/delete-form",
      "description": "A form where a resource of this type can be deleted.",
      "provider": "core",
      "id": "delete-form"
    },
    "revision": {
      "class": "Drupal\\Core\\Http\\LinkRelationType",
      "uri": "https://drupal.org/link-relations/revision",
      "description": "A particular version of this resource.",
      "provider": "core",
      "id": "revision"
    }
  }
}

Contenta CMS

This module is part of the Contenta CMS decoupled distribution and integrates with Contenta JS. Learn more about these projects:

👉 Contenta CMS 👈
🔥 Contenta JS 🔥

Supporting this Module

All contributions are welcome. Please submit MRs, not patches, so that the CI tests are run. Please add tests if possible.

If you post an issue and do not receive a response, feel free to contact me by private message in the Drupal Slack (ptmkenny) or via my Drupal.org contact form.

Activity

Total releases
3
First release
Jul 2025
Latest release
5 months ago
Release cadence
51 days
Stability
67% stable

Release Timeline

Releases

Version Type Release date
3.0.1 Stable Oct 31, 2025
3.0.0 Stable Oct 17, 2025
3.0.0-beta1 Pre-release Jul 21, 2025