Skip to main content
Update for C# programmers re: setting permissions.
Source Link
rrirower
  • 349
  • 1
  • 13

I'm trying to figure out how to pass a filter parameter on a Services rest call. I've got a node of a specific type that I'd like to access through the Services module and rest. I'm testing with FireFox RestClient and I can get all nodes of the particular type by typing

http://localhost/drupal/gpa/node/?parameters[type]=node_type

But, I'd like to be able to get one specific instance of 'node_type' that contains a specific field value. I've taken a look at node_resource.inc, but, I can't seem to make heads or tails of what I need to use as parameters. I've tried several variations that typically return no result, or, all instances of, 'node_type'.

Is it possible to filter the returned results, or, is my approach incorrect?

EDIT: If any C# programmer stumbles across this, I was able to use the Basic HTTP Authentication module to prevent unauthorized access to the view. First, as Tyler indicated, I needed to change the permissions settings. In My case, I chose a Role (Administrator).

I'm trying to figure out how to pass a filter parameter on a Services rest call. I've got a node of a specific type that I'd like to access through the Services module and rest. I'm testing with FireFox RestClient and I can get all nodes of the particular type by typing

http://localhost/drupal/gpa/node/?parameters[type]=node_type

But, I'd like to be able to get one specific instance of 'node_type' that contains a specific field value. I've taken a look at node_resource.inc, but, I can't seem to make heads or tails of what I need to use as parameters. I've tried several variations that typically return no result, or, all instances of, 'node_type'.

Is it possible to filter the returned results, or, is my approach incorrect?

I'm trying to figure out how to pass a filter parameter on a Services rest call. I've got a node of a specific type that I'd like to access through the Services module and rest. I'm testing with FireFox RestClient and I can get all nodes of the particular type by typing

http://localhost/drupal/gpa/node/?parameters[type]=node_type

But, I'd like to be able to get one specific instance of 'node_type' that contains a specific field value. I've taken a look at node_resource.inc, but, I can't seem to make heads or tails of what I need to use as parameters. I've tried several variations that typically return no result, or, all instances of, 'node_type'.

Is it possible to filter the returned results, or, is my approach incorrect?

EDIT: If any C# programmer stumbles across this, I was able to use the Basic HTTP Authentication module to prevent unauthorized access to the view. First, as Tyler indicated, I needed to change the permissions settings. In My case, I chose a Role (Administrator).

Tweeted twitter.com/StackDrupal/status/1082426825790443520
Please avoid Drupal version naming in titles, that's what tags are for
Link
leymannx
  • 18.8k
  • 6
  • 72
  • 126

Drupal 7: Pass parameters for Nodenode access on RestfulRESTful call

Source Link
rrirower
  • 349
  • 1
  • 13

Drupal 7: Pass parameters for Node access on Restful call

I'm trying to figure out how to pass a filter parameter on a Services rest call. I've got a node of a specific type that I'd like to access through the Services module and rest. I'm testing with FireFox RestClient and I can get all nodes of the particular type by typing

http://localhost/drupal/gpa/node/?parameters[type]=node_type

But, I'd like to be able to get one specific instance of 'node_type' that contains a specific field value. I've taken a look at node_resource.inc, but, I can't seem to make heads or tails of what I need to use as parameters. I've tried several variations that typically return no result, or, all instances of, 'node_type'.

Is it possible to filter the returned results, or, is my approach incorrect?