Posted by vkakani on January 20, 2017 at 12:37am
How do we retrieve a specific revision (vid) attributes of a node.
Works : http://mysite.com/endpoint/node?parameters[nid]=5¶meters[vid]=34 [vid=34 is the latest version version id]
Doesn't Works : http://mysite.com/endpoint/node?parameters[nid]=5¶meters[vid]=31 [vid=31 is the second version version id]
Please advise, how to construct the query to pull the a specific version ID related node attributes
Drupal Version : D7
Comments
Bug?
Looks correct, maybe that's a Feature Request for Services.
Thanks for your prompt
Thanks for your prompt response. I'm using this along with Workbench module, which creates REVISIONS based on the author new drafts. With parameters[vid]=31 it gives in an empty JSON array or an empty XML.
Wondering if there is any alternate solution
Services Views
Hi vkakani. I know it's not exactly what you asked for, but maybe Services Views is worth a look: https://www.drupal.org/project/services_views
Creating a view that shows revisions can be a little challenging, you can find some guidelines in this comment: https://www.drupal.org/node/1321288#comment-11229309
If you configure two contextual filters for "nid" and "vid" you should be able to invoke your view like this:
Thanks much tito.brasolin.
Thanks much tito.brasolin. Let me try it out and see if this works.
Thanks a bunch again!