Ubidots Reading Data into Spark

@aguspg This one is for you since Ubidots does not appear to have a forum. What I was hoping for is a basic example of how to GET data from ubidots and set it as a variable I can manipulate in Spark Core.

I am currently passing data to ubidots so how do I get a value back and set it as a var? Specifically using the ubidots ‘switch’ Thanks for helping a newb to Spark / Ubidots

request.path = "/api/v1.6/variables/"VARIABLE_ID"/values";
 request.body = "{\"value\":" + String(tempF) + "}";
 http.post(request, response, headers);

Hi @Herner, yes you can get data from a variable using the API endpoint described here:


The request path would be the same: “/api/v1.6/variables/“VARIABLE_ID”/values” , but the request would be an HTTP GET.

By the way, our community portal is: http://community.ubidots.com/

Best, aguspg

1 Like