0

I am trying to create a drupal node with a iphone app via rest server. I want to send the request to drupal as json.

I have added a taxonomy vocabulary for categorizing the nodes. Specifying a category is mandatory when creating node.

My request url is
drupal site/ep/node.json

Post parameters
node[title]=mysample&node[type]=story&node[body]=sample body&node[???]=myCategory1

I specified title, body, and type....but what will be the parameter name to specify the term of my vocabulary (i.e. category name)?

I tried node[taxonomy], node[term], node[vocabulary], but no success. Please help!

Config:
Drupal 6.26
REST Server 3.0

1 Answer 1

1

node[taxonomy][vocabulary term id][tid]=vocabulary term id

in place of vocabulary term id give the term id of the vocabulary term

How to get the term id? I made a custom drupal view of type term where I fetch only the fields term id and term

I then sent the view contents to my iphone app. When I choose a particular term I also have the term id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.