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

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -