When I request /mycollections?ql=Select * where name='dfsdfsdfsdfsdfsdf' , I get
{ "action" : "get", "application" : "859e6180-de8a-11e4-9360-f1aabbc15f58", "params" : { "ql" : [ "Select * where name='dfsdfsdfsdfsdfsdf'" ] }, "path" : "/mycollections", "uri" : "http://localhost:8080/myorg/myapp/mycollections", "entities" : [ { "uuid" : "2ff8961a-dea8-11e4-996b-63ce373ace35", "type" : "mycollection", "name" : "dfsdfsdfsdfsdfsdf", "created" : 1428577466865, "modified" : 1428577466865, "metadata" : { "path" : "/mycollections/2ff8961a-dea8-11e4-996b-63ce373ace35", "connections" : { "relations" : "/mycollections/2ff8961a-dea8-11e4-996b-63ce373ace35/relations" } } } ], "timestamp" : 1428589309204, "duration" : 53, "organization" : "myorg", "applicationName" : "myapp", "count" : 1 }
Now, if I request /mycollections/2ff8961a-dea8-11e4-996b-63ce373ace35/relations , I get a second object
{ "action" : "get", "application" : "859e6180-de8a-11e4-9360-f1aabbc15f58", "params" : { }, "path" : "/mycollections/2ff8961a-dea8-11e4-996b-63ce373ace35/relations", "uri" : "http://localhost:8080/myorg/myapp/mycollections/2ff8961a-dea8-11e4-996b-63ce373ace35/relations", "entities" : [ { "uuid" : "56a1185a-dec1-11e4-9ac0-e9343f86b604", "type" : "secondcollection", "name" : "coucou", "created" : 1428588269141, "modified" : 1428588269141, "metadata" : { "connecting" : { "relations" : "/mycollections/2ff8961a-dea8-11e4-996b-63ce373ace35/relations/56a1185a-dec1-11e4-9ac0-e9343f86b604/connecting/relations" }, "path" : "/mycollections/2ff8961a-dea8-11e4-996b-63ce373ace35/relations/56a1185a-dec1-11e4-9ac0-e9343f86b604" } } ], "timestamp" : 1428589668542, "duration" : 51, "organization" : "myorg", "applicationName" : "myapp" }
I want instead of giving me the path of the associated object, Usergrid directly embeds it in the first JSON response, so I only need to make one HTTP request instead of two.