2 Replies Latest reply on Jan 12, 2015 1:15 PM by babaltz

    IoT Analytics API?

    stephencwelch

      Hello,

       

           I am working with the Intel IoT cloud, and having trouble finding the documentation I need.

       

           I'm creating a new component in python following this example: https://github.com/enableiot/iotkit-samples/blob/master/api/python/iotkit_client.py

       

           When I register a component (like temperature, or humidity), the datatype defaults to integer, and I need it to be float.

       

           The relevant code is below, I just need to know what other values are possible to pass into the component dictionary, I tried "format": "Integer" and a few other shots in the dark with no luck.

       

           Can anyone point me in the direction of more relevant documentation?

       

      Thank you!

       

        url = "{0}/accounts/{1}/devices/{2}/components".format(base_url, account_id, device_id)
        component = {
         "type": component_type_name,
         "name": name,
         "cid": str(uuid.uuid4())
        }
        data = json.dumps(component)
        resp = requests.post(url, data=data, headers=get_device_headers(), proxies=proxies, verify=verify)
        check(resp, 201)
        js = resp.json()
         return js["cid"]