REST multi valued parameters Menu Widget

Blynk REST Api using Python

Here is a more complete question. Note that the Menu Widget “labels” parameter is supposed to set up the list of items in the Menu, not a single line.

I’m trying to use a MENU Widget via the REST API. I am sending values for the drop down menu lines. For example, Test1 and Test2 below. They both show up on one line in the Menu widget on an iPhone. How do I send a set of individual menu items so they show up on separate lines for selection?

    get_body="?labels=\"Test1\",\"Test2\""

    myRequest= config.BLYNK_URL+config.BLYNK_AUTH+'/update/V45'+get_body
    print("myRequest=", myRequest)
    r = requests.get(myRequest)

Here is the complete request sent to Blynk (with the authorization code removed). It returns a 200, but all of the line arguments (Test1, Test2) are on one line, rather than on multiple menu lines as it should be.

‘’’
myRequest= http://blynk-cloud.com/daf…12/update/V45?labels=“Test1”,“Test2”
updateStaticBlynk:V45 Labels:r.status_code: 200

‘’’

I’m not familiar with the syntax of the language you’re using on your RPI (Nodejs?), so what I’m going to say may not be helpful :crazy_face:

As far as I know, the menus can only be updated via the set property process.
The API documentation only refers to the ‘Set Widget Property via GET’ method, so using PUT isn’t an option, although a guess that you’re simply referring to ‘put_body’ as a variable name and nothing else.

The ‘Set Widget Property via GET’ method has a different syntax to what you’re using, you seem to be missing the ‘property’ part of the API call…
http://blynk-cloud.com/auth_token/update/pin?property=value

Full documentation for this method here:
https://blynkapi.docs.apiary.io/#reference/0/write-pin-value-via-get/set-widget-property-via-get

Hope this helps.

Pete…

Blynk REST Api using Python

Here is a more complete question. Note that the Menu Widget “labels” parameter is supposed to set up the list of items in the Menu, not a single line.

I’m trying to use a MENU Widget via the REST API. I am sending values for the drop down menu lines. For example, Test1 and Test2 below. They both show up on one line in the Menu widget on an iPhone. How do I send a set of individual menu items so they show up on separate lines for selection?

    get_body="?labels=\"Test1\",\"Test2\""

    myRequest= config.BLYNK_URL+config.BLYNK_AUTH+'/update/V45'+get_body
    print("myRequest=", myRequest)
    r = requests.get(myRequest)

Here is the complete request sent to Blynk (with the authorization code removed). It returns a 200, but all of the line arguments (Test1, Test2) are on one line, rather than on multiple menu lines as it should be.

‘’’
myRequest= http://blynk-cloud.com/daf…12/update/V45?labels=“Test1”,“Test2”
updateStaticBlynk:V45 Labels:r.status_code: 200

‘’’

@switchdoc I’ve merged your two topics, as they are regarding the same issue. Please don’t create multiple topics for the same issue.

Pete.

Thank you for the response, but that doesn’t answer my question about how to post a REST command that gives multi values for ONE parameter (such as setting up the menu in in Menu Widget).

Any answers out there?

SDL

Bump.