Active
Project:
Services node resource extension
Version:
7.x-1.2
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2013 at 23:12 UTC
Updated:
30 Oct 2017 at 23:15 UTC
Jump to comment: Most recent
Comments
Comment #1
stone_d commented... i came to these module by searching for a solution to publish/unpublish a node via JSON-POST.
But also dont know how to access those resources. I tried
{"publish"}
{"publish":"1"}
{"publish":"true"}
{"publish":"[my-node-ID]"}
None of those worked. Any hints?
Thanks in advance.
Comment #2
stone_d commentedok - after a little more lookaround i found the solution:
You have to enable the so-called "targeted actions" in the node-ressource of your services-settings (http://...?q=admin/structure/services).
Then target those actions via JSON by URL:
- http://.../?q=rest/nodes/[YOUR-NODE-ID]/publish
- http://.../?q=rest/nodes/[YOUR-NODE-ID]/unpublish
Works perfect! :)
Comment #3
vvv8 commentedThis is not working for me. I have my services endpoint configured at api2
I can make all other requests just fine (i.e updating nodes etc) via http://mysite/?q=api2/node/ and from there I can do whatever I need to with a node.
Since the genius programmers who made the service module thought it was not important to deal with publishing / unpublishing I am now forced to use this module which has no documentation whatsoever - awesome!
I am testing on:
http://mysite/?q=api2/node/999/publish and http://mysite/?q=api2/node/999/unpublish and nothing is working... (999 being the nid)
Does anybody have any documentation on how these endpoints are supposed to work? The error that I am getting specifically for this is a 404 not found, when I have enabled the module and checked off the required 'publish' and 'unpublish' targeted actions...
Thanks