Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Change/set block size and position programmatically
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Change/set block size and position programmatically

by Senspix on Wed May 26, 2021 3:33 am

Hi,

I'm creating dashboards and blocks programmatically using the Arduino API. It works "sort of".
I would like to control the placement (row,column) of a block but I have not been successful.

I've experimented with the http-api but PATCHing a block does not seem to work so I'm desperately looking for a detailed example of a working http-request.
See http://adafruit.github.io/io-api/#operation/updateBlock

Cheers
/Anders

Senspix
 
Posts: 2
Joined: Fri Oct 09, 2015 10:21 am

Re: Change/set block size and position programmatically

by jwcooper on Wed May 26, 2021 11:20 am

It looks like you're linking to our old api documentation.

Here is the current documentation on manipulating a dashboard:
https://io.adafruit.com/api/docs/#dashboards

In particular, modifying the column, row, size_x, and size_y values should get you what you're looking for using PUT rather than PATCH.

jwcooper
 
Posts: 784
Joined: Tue May 01, 2012 9:08 pm

Please be positive and constructive with your questions and comments.