I am writing an Android app which is creating Drupal nodes remotely. I am creating these nodes via a straight php form. But now I need to create Nodes which are node_references of the main node. Usually in order to do this you will need the entity ID of the main node before you can create a node reference.
Creating the second node as a reference should be easy as it is just an extra field with a reference value in it. The problem is, once the App creates the main node, I need the entity ID to be returned to the App so that the value can be used to create the other referenced node.
How do I get the entity ID back as a return value after node creation?
or... am I thinking about this all wrong :)