I am using Bluemix with a cloudant nosql database.
The API URL is,
https://6bf8b7fb-a253-4433-a8e3-20da37e95dee-bluemix.cloudant.com/dpjg-sensorlog3/_find
The code from Postman which works perfectly!!!
POST /dpjg-sensorlog3/_find HTTP/1.1
Host: 6bf8b7fb-a253-4433-a8e3-20da37e95dee-bluemix.cloudant.com
Authorization: Basic dHRlcnNlZW5ncnRpbmV2ZW5zd2Vyc3R1OmJmNGMzZmRkOTFjMzVjNDYyN2JmNDBiN2ViYTFkNjBhMzkyMjhhZDc=
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 666e0601-41de-de9a-e8e4-346cc353eb71
{
"selector": {
"tme": {
"$gt": 0
}
},
"fields": [
"tme",
"oat",
"sot",
"oah",
"rnt",
"lux",
"bxt",
"spv",
"btv",
"hea"
],
"sort": [
{
"tme": "desc"
}],
"limit":1
}
The sample response is,
{"docs":[
{"tme":"2016-04-29T19:36:18-04:00","oat":"77.2","sot":"78.0","oah":66.1,"rnt":0,"lux":73,"bxt":0,"spv":"4.3","btv":"3.6","hea":33024}
]}
I cannot figure out how to set this up in a block.