1

I am creating node from my android app using services 3. I hit this URL www.mysite/endpoint/node with the following json:

{
    "title": "my act for tax",
    "type": "activity",
    "field_activity_type": [{
        "tid": {
            "tid": "[tid:45]"
        }
    }]
}

field_activity_type is a taxonomy term autocomplete filed.

Node is created successfully but field_activity_type remains empty. I am unable to find a correct way to populate taxonomy field. Anyone who knows please help me.

2
  • Is it possible to send term (text) instead of term id in your json? If yes I'll post solution ;) In that case we can easily create node with taxonomy filed. Commented Mar 12, 2014 at 8:23
  • Yes I can send term as well in json. Please Post your solution. Thanku
    – Mian
    Commented Mar 12, 2014 at 9:41

1 Answer 1

4

Here is the Json format to create node having taxonomy filed

{"title":"my act for tax","type":"activity","field_activity_type":{"und":"termname"}}
4
  • @Krishna.. I have posted one more question. Its related to deletion of a file from node using services. When I hit my url (mysite/endpoint/file/fid) with DELETE method it returns me status 200 ok but in actual the file is still there and so it has'nt been deleted. Can you please help me in this issue too.
    – Mian
    Commented Mar 12, 2014 at 10:09
  • Did you check your sever logs? Commented Mar 12, 2014 at 10:15
  • Yes I checked my server Log.. There is no error.
    – Mian
    Commented Mar 12, 2014 at 10:41
  • The file may not be deleted on disk: is it deleted from the managed file table? Commented Mar 25, 2014 at 9:38

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.