I'm using the node sdk for document db and I'm able to successfully list all the documents in my collection with the following code:
collectionUrl = "dbs/dbName/colls/Membership"
this.client.readDocuments(this.collectionUrl).toArray(callback)
But when I try to query the data with the following code it fails:
querySpec = {
query: 'SELECT * FROM root r '
};
this.client.queryCollections(this.collectionUrl,this.querySpec).toArray(callback)
The error message is:
body:"{"code":"BadRequest","message":"Request url is invalid.\r\nActivityId: 532e52d2-7e97-41d4-8b07-a5fb19de88da"}"
code:400
Any idea why this is an what i need to do to execute a query?