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 -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -