None of the documentation seemed to click for me but after a few guesses I was able to guess correctly that you use the "Node: Create" Resource on a Service with Endpoint URL of "node-service" by doing the following (using the "Poster" extension for Firefox):

I then enabled the "Node: Retrieve" Resource on the same Service and was able to guess at how to access the node I just created in that last POST.

But now I'm stuck at using the "Node: Update" and "Node: Delete" Resources. Here is my attempt at an update.

How exactly are those Resources supposed to be used?

Comments

Canadaka’s picture

Version: 6.x-3.1 » 7.x-3.x-dev

I also can't figure out how to use UPDATE. I get 404 or 406 return.

tried all these

http://www.domain.com/api/rest/node.json
http://www.domain.com/api/rest/node/333.json

"nid' in data

...
$node_data['nid'] = 333;
...
$node_data = http_build_query($node_data);
....
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, $node_data);
...

I can't find any documentation or examples of how to use the Services REST UPDATE operation with PHP.

7wonders’s picture

Updating a file on a node works fine with a json post like this:

endpoint/node/999

{"field_dl_file":{"und":[{"fid":999}]},"uid":1,"language":"und"}

So you have to make sure the field you are updating is sent fully and that you add necessary params such as uid and language. One thing I noticed was to make sure there is NO whitespace in your posts when using json through poster.

kylebrowning’s picture

Status: Active » Closed (works as designed)