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

Shuaib
  • 779
  • 2
  • 13
  • 47

2 Answers2

1

in request URL not specified node.json only specified node.and use node[vocabulary term which u create][term name which u select];or use node[vocabulary term which u create][term id]

mahipal purohit
  • 264
  • 1
  • 10
0

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.

Shuaib
  • 779
  • 2
  • 13
  • 47