Collections (filtering, sorting, and paginating)

JSON API makes it possible to retrieve multiple resources in a single request, these routes are called "collection" routes. One can fetch a collection of resources by sending a GET request to the base resource route, e.g. GET /api/node/article and not including a UUID. By default, this will include all resources of the specified type.

Core Concepts

JSON API has many concepts in the specification, not all of which are documented here. However, users of the module do not need to completely understand all of the concepts of the specification to become productive with this module. If you would like to go deeper into how JSON API's documents are structured, why the module does something in one way or another, or just would like to learn more about the module's design, readers are encouraged to read the specification on

Contributed Modules

This is a space for contributed modules related to RESTful web services to put their documentation.

Feeds JSONPath Parser

1) Identify the json URL, and look at it using this tool: (or, if you know the json well, identify what you want to import.

2) Download jsonpath php file here: and place inside sites/all/modules/feeds_jsonpath_parser

3) Create a new parser using feeds, with the jsonpath parser selected

4) Example json:

  "tumblelog": {
    "title": "Tumblr Blog",
    ..... (other global fields)
  "posts": [
      "id": "46252144726",
      "url": "",
      "type": "regular",
      "date": "Mon, 25 Mar 2013 10:45:38",
      "regular-title": "Test Blog Entry",
      "regular-body": "Body text goes here",
      "tags": [
      "id": 46249331035,
.... rest of posts

OK, so now is where I'm getting unclear, and need help.

5) In the jsonpath parser settings page:admin/structure/feeds/rss_feed_importer/settings/FeedsJSONPathParser there are two elements, "Context" and "Title". In the Context field, if you want to map the variables in post, to fields in a blog content type, for example, you need to let jsonpath parser know where to start. So in this case, the context would be:


RESTful Web Services

RESTWS exposes Drupal resources (e.g. entities) as RESTful web services. The module makes use of the Entity API and the information about entity properties (provided via hook_entity_property_info()) to provide resource representations.

It aims to be fully compliant to the REST principles.

Installing the Module

  • Copy the whole restws directory to your modules directory (e.g. DRUPAL_ROOT/sites/all/modules) and activate the RESTful Web Services module.
  • Use Drush commands: drush dl restws & drush en restws
  • There is no user interface to configure.

Usage / Testing

To obtain the JSON representation of an entity use your browser to visit:<entity type name>/<entity id>.json
For example: or would resolve as a JSON dump to client. There are no "service endpoints" to configure as resources are just available at uniform paths like "node/1", "user/1". One can use a client in the form of a browser plugin to test out the different CRUD functions.



Subscribe with RSS Subscribe to RSS - json