Particle Set Variable. Why not?


Is there some historic reasoning behind why a Particle Variable is Readonly (Security issue or Not had time to implement, etc)? And cannot be set from the cloud (And can only be updated via a Particle Function)?


Presumably because the purpose of a Paritcle variable is so a Particle device can make a variable such as a sensor reading externally available to be read as required. A function by contrast is for doing things…


It matches the REST terminology wherein a GET request is only able to read resources, but not change them. A POST request however is meant to change resources on the receiving end.

If you Google ‘RESTful’, you’ll find a much nicer explanation than the one I can give you :wink:

1 Like

Yes, well where’s the equivalent PUT or POST then. But ok. I see the limitations and will use the call Function method as a hack.


Particle.function() calls are POSTed - PUT endpoints are not implemented (yet).