Search code examples
jsonapirestibm-cloudiot

JSON response in the history REST call from bluemix iotf does not contain bookmark


I try to access the historian information from bluemix IoTF. The official documentation describes the REST call here:

https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#!/Historical_Event_Retrieval/get_historian

So the result should be like this:

{
 "bookmark": "string",
 "events": [
  {
   "device_id": "string",
   "device_type": "string",
   "evt_type": "string",
   "timestamp": {
     "$date": 0
   },

but it is like this:

{
 "events": [
 {
   "device_id": "bluefish",
   "device_type": "esp8266",
  "evt_type": "tank",
  "timestamp": {
    "$date": 1447262923695
  },
  "evt": {
    "heater": "92",
    "westCloud": "70",
    "plateTemp": "27.50",
    "moon": "27",
    "centerCloud": "70",
    "waterTemp": "26.69",
    "eastCloud": "70"
  }
 },

which looks like the V1 version of the API call but I call the V2 version:

https://5rn7ip.internetofthings.ibmcloud.com:443/api/v0002/historian/?start=1447200000000&end=1447286399165

The query should return more then 100 entries so the bookmark is really necessary to access the rest of the data.

Is there a problem in the IoTF or do I do something wrong?


Solution

  • We currently have a defect open for historian not matching the swagger doc. We will investigate further based on your results.