Stream Metadata Resource

Returns stream information that is typically needed for graphing and displaying feed information. Metadata includes interval stream cycle details and rollup calendar  information that each stream may use for rollup calculations. The rollup calender list of streams is useful as the server performs complicated logic to determine which cycles a stream  base cycle can rollup into.

GET stream_metadata



Returns a list of stream metadata.
Resource Information
Rate Limited?
Yes
session, oauth and org tokens compatible?
Yes
api_key token token compatible?
Yes


Resource URL

http://grovestreams.com/api/stream_metadata

Parameters

streams
mandatory
A delimited list of streams in this format: "componentUid.streamUid+componentUid.streamUid". Ensure argument is encoded properly.
itemsById
optional A JSON array of stream values being requested by item ids (not uids). Each object in the array has this format:
[{"compId":"aComponentId","streamId":"aStreamId"}]

Ensure parameter is JSON encoded properly.
itemsByFolderPath
streamId
streamName
includeSubs
optional Set itemsByFolderPath to the absolute path (i.e. /wharehouse1). Leave off "Components". Set streamId to return only streams that match the ID (wildcard ID accepted). Set streamName to return only streams that match the name (wildcard names accepted). Setting streamId and streamName to nothing will cause the search to return all streams. Set includeSubs to to search all descendent folders. All four of these parameters are required within the same call.

Example Requests

http://www.grovestreams.com/api/stream_metadata?org=00000000-0000-0000-0000-000000000001&streams=0e95694d-91ce-3034-92bf-4e724dd18882.b60c84ec-837d-3bec-b403-9c7f274f8d54


Response Body

{
  "message": "",
  "stream_metadata": {
    "stream": [
      {
        "streamType" : "intvl_stream",

          "baseCycle": {
          "cycle_range": [
           
          ],
          "referenceDate": "2012-01-01T00:00:00",
          "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
          "intvlSizeType": "MINUTE",
          "description": "  ",
          "numSizeTypesPerIntvl": 5,
          "name": "5 Minutes",
          "estimatedIntervalSize": 300000,
          "timeZoneId": ""
        },
        "uid": "b60c84ec-837d-3bec-b403-9c7f274f8d54",
        "startDate": 1331563500000,
        "rollup_calendar": {
          "uid": "b2ef79b1-32c3-355a-ab23-39286464f0e9",
          "name": "Years, Quarters, Months, Days, Hour, FiveMin"
        },
        "rollup_calendar_cycles": [
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
            "intvlSizeType": "MINUTE",
            "description": "  ",
            "numSizeTypesPerIntvl": 5,
            "name": "5 Minutes",
            "estimatedIntervalSize": 300000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "f018389b-8dfa-3146-bc13-251609d5a88f",
            "intvlSizeType": "HOUR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Hours",
            "estimatedIntervalSize": 3600000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "2e2276aa-8db7-3985-a023-f47950e44c7a",
            "intvlSizeType": "DAY",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Days",
            "estimatedIntervalSize": 86400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "0b12fb96-271e-39b1-9845-89f71b431bc5",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Months",
            "estimatedIntervalSize": 2678400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "d3badeb7-5b6f-3ad9-bb3e-7e119ea671d0",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 3,
            "name": "Quarters",
            "estimatedIntervalSize": 7776000000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "01fd66e0-8ecf-3e3d-b9a4-37560e730326",
            "intvlSizeType": "YEAR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Years",
            "estimatedIntervalSize": 31536000000,
            "timeZoneId": ""
          }
        ],
        "selectedCycleUid": "",
        "componentUid": "0e95694d-91ce-3034-92bf-4e724dd18882",
        "constraints": {
          "min": 0,
          "minMaxHandlerType": "NO_MIN_MAX",
          "max": 0,
          "rollupPercentSetToGap": 100,
          "time_filter": {
            "uid": "",
            "name": ""
          }
        },
        "devicePermType": "NONE",
        "endDate": 1333302300000,
        "gap_filling": {
          "maxGapsToFill": 3,
          "gapFillType": "AVG"
        },
        "delete_profile": {
          "uid": "",
          "name": ""
        },
        "id": "",
        "unit": {
          "uid": "86768787-9158-3c67-817b-1d9cce262c4b",
          "symbol": "F",
          "numberFormat": "000,000.00",
          "name": "Fahrenheit  (000,000.00F)",
          "booleanStyle": "TRUE_FALSE",
          "symbolLocation": "AFTER"
        },
        "rollupMethod": "AVG",
        "completedDate": 1333302300000,
        "componentName": "Garage Temperature and Light Sensor",
        "streamDerivationType": "FROM_EXPRESSION",
        "description": "",
        "name": "temperature - F",
        "valueType": "FLOAT",
        "visuals": {
          "defaultChartType": "LINE_CHART",
          "hasAxisMinMax": false,
          "chartAxisMax": 0,
          "offset": 0,
          "multiplier": 1,
          "chartAxisMin": 0
        },
        "selectedCycleName": "",
        "timeZoneId": "US/Central"
      }
    ]
  },
  "success": true
}

GET stream_metadata/{componentUid}



Returns a list of stream metadata for each stream that belongs to a component
Resource Information
Rate Limited?
Yes
session, oauth and org tokens compatible?
Yes
api_key token token compatible?
Yes


Resource URL

http://grovestreams.com/api/stream_metadata/{componentUid}

Parameters

none


Example Requests

http://www.grovestreams.com/api/stream_metadata/0e95694d-91ce-3034-92bf-4e724dd18882

Response Body

{
  "message": "",
  "stream_metadata": {
    "stream": [
      {
       
  "streamType" : "intvl_stream",
          "baseCycle": {
          "cycle_range": [
           
          ],
          "referenceDate": "2012-01-01T00:00:00",
          "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
          "intvlSizeType": "MINUTE",
          "description": "  ",
          "numSizeTypesPerIntvl": 5,
          "name": "5 Minutes",
          "estimatedIntervalSize": 300000,
          "timeZoneId": ""
        },
        "uid": "256be655-c8c4-317f-89ce-282db244f9db",
        "startDate": 1331563500000,
        "rollup_calendar": {
          "uid": "b2ef79b1-32c3-355a-ab23-39286464f0e9",
          "name": "Years, Quarters, Months, Days, Hour, FiveMin"
        },
        "rollup_calendar_cycles": [
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
            "intvlSizeType": "MINUTE",
            "description": "  ",
            "numSizeTypesPerIntvl": 5,
            "name": "5 Minutes",
            "estimatedIntervalSize": 300000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "f018389b-8dfa-3146-bc13-251609d5a88f",
            "intvlSizeType": "HOUR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Hours",
            "estimatedIntervalSize": 3600000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "2e2276aa-8db7-3985-a023-f47950e44c7a",
            "intvlSizeType": "DAY",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Days",
            "estimatedIntervalSize": 86400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "0b12fb96-271e-39b1-9845-89f71b431bc5",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Months",
            "estimatedIntervalSize": 2678400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "d3badeb7-5b6f-3ad9-bb3e-7e119ea671d0",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 3,
            "name": "Quarters",
            "estimatedIntervalSize": 7776000000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "01fd66e0-8ecf-3e3d-b9a4-37560e730326",
            "intvlSizeType": "YEAR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Years",
            "estimatedIntervalSize": 31536000000,
            "timeZoneId": ""
          }
        ],
        "selectedCycleUid": "",
        "componentUid": "0e95694d-91ce-3034-92bf-4e724dd18882",
        "constraints": {
          "min": 1,
          "minMaxHandlerType": "NO_MIN_MAX",
          "max": 1.7976931348623157E308,
          "rollupPercentSetToGap": 100,
          "time_filter": {
            "uid": "",
            "name": ""
          }
        },
        "devicePermType": "GET",
        "endDate": 1333302000000,
        "gap_filling": {
          "maxGapsToFill": 0,
          "gapFillType": "NONE"
        },
        "delete_profile": {
          "uid": "",
          "name": ""
        },
        "id": "light",
        "unit": {
          "uid": "ff24bb7f-3234-309e-a5ec-134a286c81b6",
          "symbol": " nm",
          "numberFormat": "0,000.00",
          "name": "Brightness (000,000.00 nm)",
          "booleanStyle": "ON_OFF",
          "symbolLocation": "AFTER"
        },
        "rollupMethod": "AVG",
        "completedDate": 1333302000000,
        "componentName": "Garage Temperature and Light Sensor",
        "streamDerivationType": "NONE",
        "description": "  ",
        "name": "light",
        "valueType": "FLOAT",
        "visuals": {
          "defaultChartType": "COL_CHART",
          "hasAxisMinMax": false,
          "chartAxisMax": 200,
          "offset": 0,
          "multiplier": 1,
          "chartAxisMin": -200
        },
        "selectedCycleName": "",
        "timeZoneId": "US/Central"
      },
      {
       
  "streamType" : "intvl_stream",
         "baseCycle": {
          "cycle_range": [
           
          ],
          "referenceDate": "2012-01-01T00:00:00",
          "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
          "intvlSizeType": "MINUTE",
          "description": "  ",
          "numSizeTypesPerIntvl": 5,
          "name": "5 Minutes",
          "estimatedIntervalSize": 300000,
          "timeZoneId": ""
        },
        "uid": "94711921-a326-3979-93de-7d487b3a9a16",
        "startDate": 1331563500000,
        "rollup_calendar": {
          "uid": "b2ef79b1-32c3-355a-ab23-39286464f0e9",
          "name": "Years, Quarters, Months, Days, Hour, FiveMin"
        },
        "rollup_calendar_cycles": [
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
            "intvlSizeType": "MINUTE",
            "description": "  ",
            "numSizeTypesPerIntvl": 5,
            "name": "5 Minutes",
            "estimatedIntervalSize": 300000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "f018389b-8dfa-3146-bc13-251609d5a88f",
            "intvlSizeType": "HOUR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Hours",
            "estimatedIntervalSize": 3600000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "2e2276aa-8db7-3985-a023-f47950e44c7a",
            "intvlSizeType": "DAY",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Days",
            "estimatedIntervalSize": 86400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "0b12fb96-271e-39b1-9845-89f71b431bc5",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Months",
            "estimatedIntervalSize": 2678400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "d3badeb7-5b6f-3ad9-bb3e-7e119ea671d0",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 3,
            "name": "Quarters",
            "estimatedIntervalSize": 7776000000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "01fd66e0-8ecf-3e3d-b9a4-37560e730326",
            "intvlSizeType": "YEAR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Years",
            "estimatedIntervalSize": 31536000000,
            "timeZoneId": ""
          }
        ],
        "selectedCycleUid": "",
        "componentUid": "0e95694d-91ce-3034-92bf-4e724dd18882",
        "constraints": {
          "min": 1,
          "minMaxHandlerType": "NO_MIN_MAX",
          "max": 1.7976931348623157E308,
          "rollupPercentSetToGap": 100,
          "time_filter": {
            "uid": "",
            "name": ""
          }
        },
        "devicePermType": "GET",
        "endDate": 1333302000000,
        "gap_filling": {
          "maxGapsToFill": 0,
          "gapFillType": "NONE"
        },
        "delete_profile": {
          "uid": "",
          "name": ""
        },
        "id": "temperature",
        "unit": {
          "uid": "2ff73fee-93a1-3739-92e4-5c48c0057204",
          "symbol": "C",
          "numberFormat": "0,000.00",
          "name": "Celsius (000,000.00C)",
          "booleanStyle": "ON_OFF",
          "symbolLocation": "AFTER"
        },
        "rollupMethod": "AVG",
        "completedDate": 1333302000000,
        "componentName": "Garage Temperature and Light Sensor",
        "streamDerivationType": "NONE",
        "description": "  ",
        "name": "temperature - C",
        "valueType": "FLOAT",
        "visuals": {
          "defaultChartType": "LINE_CHART",
          "hasAxisMinMax": false,
          "chartAxisMax": 200,
          "offset": 0,
          "multiplier": 1,
          "chartAxisMin": -200
        },
        "selectedCycleName": "",
        "timeZoneId": "US/Central"
      },
      {
          "streamType" : "intvl_stream",
        "baseCycle": {
          "cycle_range": [
           
          ],
          "referenceDate": "2012-01-01T00:00:00",
          "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
          "intvlSizeType": "MINUTE",
          "description": "  ",
          "numSizeTypesPerIntvl": 5,
          "name": "5 Minutes",
          "estimatedIntervalSize": 300000,
          "timeZoneId": ""
        },
        "uid": "6c6d250c-8d9b-3e05-85bb-c15f18720234",
        "startDate": 0,
        "rollup_calendar": {
          "uid": "",
          "name": ""
        },
        "rollup_calendar_cycles": [
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
            "intvlSizeType": "MINUTE",
            "description": "  ",
            "numSizeTypesPerIntvl": 5,
            "name": "5 Minutes",
            "estimatedIntervalSize": 300000,
            "timeZoneId": ""
          }
        ],
        "selectedCycleUid": "",
        "componentUid": "0e95694d-91ce-3034-92bf-4e724dd18882",
        "constraints": {
          "min": 1,
          "minMaxHandlerType": "NO_MIN_MAX",
          "max": 1.7976931348623157E308,
          "rollupPercentSetToGap": 100,
          "time_filter": {
            "uid": "",
            "name": ""
          }
        },
        "devicePermType": "GET",
        "endDate": 0,
        "gap_filling": {
          "maxGapsToFill": 0,
          "gapFillType": "NONE"
        },
        "delete_profile": {
          "uid": "",
          "name": ""
        },
        "id": "low_battery",
        "unit": {
          "uid": "040db41a-5861-3bc7-89ec-fb8637f4c340",
          "symbol": "",
          "numberFormat": "0,000.00",
          "name": "No Symbol",
          "booleanStyle": "ON_OFF",
          "symbolLocation": "AFTER"
        },
        "rollupMethod": "AVG",
        "completedDate": -9223372036854775808,
        "componentName": "Garage Temperature and Light Sensor",
        "streamDerivationType": "NONE",
        "description": "  ",
        "name": "low_battery",
        "valueType": "BOOLEAN",
        "visuals": {
          "defaultChartType": "COL_CHART",
          "hasAxisMinMax": false,
          "chartAxisMax": 200,
          "offset": 0,
          "multiplier": 1,
          "chartAxisMin": -200
        },
        "selectedCycleName": "",
        "timeZoneId": "US/Central"
      },
      {
          "streamType" : "intvl_stream",
        "baseCycle": {
          "cycle_range": [
           
          ],
          "referenceDate": "2012-01-01T00:00:00",
          "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
          "intvlSizeType": "MINUTE",
          "description": "  ",
          "numSizeTypesPerIntvl": 5,
          "name": "5 Minutes",
          "estimatedIntervalSize": 300000,
          "timeZoneId": ""
        },
        "uid": "b60c84ec-837d-3bec-b403-9c7f274f8d54",
        "startDate": 1331563500000,
        "rollup_calendar": {
          "uid": "b2ef79b1-32c3-355a-ab23-39286464f0e9",
          "name": "Years, Quarters, Months, Days, Hour, FiveMin"
        },
        "rollup_calendar_cycles": [
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "69f231f3-037f-30d3-9826-60163b56d5d6",
            "intvlSizeType": "MINUTE",
            "description": "  ",
            "numSizeTypesPerIntvl": 5,
            "name": "5 Minutes",
            "estimatedIntervalSize": 300000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "f018389b-8dfa-3146-bc13-251609d5a88f",
            "intvlSizeType": "HOUR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Hours",
            "estimatedIntervalSize": 3600000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "2e2276aa-8db7-3985-a023-f47950e44c7a",
            "intvlSizeType": "DAY",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Days",
            "estimatedIntervalSize": 86400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "0b12fb96-271e-39b1-9845-89f71b431bc5",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Months",
            "estimatedIntervalSize": 2678400000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "d3badeb7-5b6f-3ad9-bb3e-7e119ea671d0",
            "intvlSizeType": "MONTH",
            "description": "  ",
            "numSizeTypesPerIntvl": 3,
            "name": "Quarters",
            "estimatedIntervalSize": 7776000000,
            "timeZoneId": ""
          },
          {
            "cycle_range": [
             
            ],
            "referenceDate": "2012-01-01T00:00:00",
            "uid": "01fd66e0-8ecf-3e3d-b9a4-37560e730326",
            "intvlSizeType": "YEAR",
            "description": "  ",
            "numSizeTypesPerIntvl": 1,
            "name": "Years",
            "estimatedIntervalSize": 31536000000,
            "timeZoneId": ""
          }
        ],
        "selectedCycleUid": "",
        "componentUid": "0e95694d-91ce-3034-92bf-4e724dd18882",
        "constraints": {
          "min": 0,
          "minMaxHandlerType": "NO_MIN_MAX",
          "max": 0,
          "rollupPercentSetToGap": 100,
          "time_filter": {
            "uid": "",
            "name": ""
          }
        },
        "devicePermType": "NONE",
        "endDate": 1333302000000,
        "gap_filling": {
          "maxGapsToFill": 3,
          "gapFillType": "AVG"
        },
        "delete_profile": {
          "uid": "",
          "name": ""
        },
        "id": "",
        "unit": {
          "uid": "86768787-9158-3c67-817b-1d9cce262c4b",
          "symbol": "F",
          "numberFormat": "000,000.00",
          "name": "Fahrenheit  (000,000.00F)",
          "booleanStyle": "TRUE_FALSE",
          "symbolLocation": "AFTER"
        },
        "rollupMethod": "AVG",
        "completedDate": 1333302000000,
        "componentName": "Garage Temperature and Light Sensor",
        "streamDerivationType": "FROM_EXPRESSION",
        "description": "",
        "name": "temperature - F",
        "valueType": "FLOAT",
        "visuals": {
          "defaultChartType": "LINE_CHART",
          "hasAxisMinMax": false,
          "chartAxisMax": 0,
          "offset": 0,
          "multiplier": 1,
          "chartAxisMin": 0
        },
        "selectedCycleName": "",
        "timeZoneId": "US/Central"
      }
    ]
  },
  "success": true
}