mlab - Unable to execute queries on MongoLab via CURL -


i tried executing query on mongolab using curl send http request, failing error { "message" : "please provide valid api key."} . im using right api key , using same key im able write collection on mongolab failing read form same . here how used curl achieve objective

curl  'https://api.mongolab.com/api/1/databases/mydb/collections/mycoll?q={"2sf5hzcp":{$exists:true}}&fo=true&apikey=xxxxxxxxx' 

how fix ?

try replacing '{' , '}' characters url encoded equivalents (%7b , %7d respectively):

curl  'https://api.mongolab.com/api/1/databases/mydb/collections/mycoll?q=%7b"2sf5hzcp":%7b$exists:true%7d%7d&fo=true&apikey=xxxxxxxxx' 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -