Can I GET All Variable Values with only one Curl?

Is there a way to get all variable values with only one curl instead of sending multiple curls and flooding the server or causing a timeout? Thank you

Example getting 1 value;
curl https://api.particle.io/v1/devices/e00fceXXXXXXXXXXXXXXX/some_variable?access_token=1234

No, you can’t get all variables.

But you can store multiple pieces of data in a single variable. Depending on the device, you can store between 622 and 1024 bytes of data in a single variable, so you can store all of your values in a single variable using a format such as CSV or JSON.

This is also beneficial because getting a variable uses one data operation of your limit of 100,000 data operations limit in the free plan. Putting all of your data in a single variable will reduce your data operations.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.