Skip to content

add support for /api/node/{type} and/or /api/v2/node/{type} #41

@ps23Rick

Description

@ps23Rick

I know that other JSON implementations (e.g. the Drupal one I used recently) allows querying all nodes of a specified type without the need to specify any {id} values. This will return, in these implementations, all the resulting node-ids of the specified type. This is currently missing and I'm willing to add the support if it's of interest. Also, if there's an alternative way to achieve this through the existing support, I'm open to using that.

For instance, my code that currently works with Drupal can query all nodes of custom type {navpage} using the Drupal API : http://localhost:8888/drupal/jsonapi/node/navpage and then it can weed through the results. I should note that in this case the result set is always very small and no pagination is required.

I tried defining a backdrop view for this type {navpage}, and told it to display everything, no pagination, no menu, unformatted, unsorted. I can pull that view up just fine and see the content using only the backdrop URL, but when I enable the respective view within the headless module, it just returns this terse information as shown below :

{"results":[{"nid":"3"}],"count":1}

I was hoping it would return the entire content block for that particular navpage item..I looked at the code for the views module and it apparently only returns those items. Hmm...


PR: #42

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions