vMix Forums
»
General
»
General Discussion
»
Correct syntax for DataSourceSelectRow Web API/Script?
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2014(UTC) Posts: 1,837 Location: Stockholm
Thanks: 144 times Was thanked: 297 time(s) in 250 post(s)
|
I am trying to find the correct call for Web Scripting for DataSourceSelectRow. Using a regular shortcut with the Value "matcher-odds,,0" (to select Index 0 with no table specified for a DataSource named "matcher-odds" works just fine. But a web API to http://192.168.1.xx:8088/?Function=DataSourceSelectRow&Value=matcher-odds,,0 does not. Neither does Web Script Function=DataSourceSelectRow&Value=matcher-odds,,0 Looking into https://www.vmix.com/help20/DeveloperAPI.html there is no mention of DataSourceSelectRow in the "Value", "SelectedName", "SelectedIndex" sections. And if any of those would be applicable there is no corresponding "SelectedTable" section. Any ideas? Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/20/2014(UTC) Posts: 388
Thanks: 29 times Was thanked: 80 time(s) in 51 post(s)
|
From memory but the table name is required....
127.0.0.1:8088/API/?Function=DataSourceSelectRow&Value=gsheets,Sheet1,2
This one drove me nuts a few months ago.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/13/2010(UTC) Posts: 5,214 Location: Gold Coast, Australia Was thanked: 4301 time(s) in 1523 post(s)
|
Be careful when using web addresses with symbols like , # etc as these need to be correctly "encoded" to work as a url value. This is not only the case with vMix, but with any web based APIs. This is a handy tool that can be used to encode the values correctly: https://meyerweb.com/eric/tools/dencoder/Type in just the text you want to set as the Value, not the whole url. So "Excel/CSV,Sheet1,5" would become Excel%2FCSV%2CSheet1%2C5 And in turn the whole URL would be: http://localhost:8088/API/?Function=DataSourceSelectRow&Value=Excel%2FCSV%2CSheet1%2C5
|
3 users thanked admin for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/20/2014(UTC) Posts: 388
Thanks: 29 times Was thanked: 80 time(s) in 51 post(s)
|
Thanks-- this explains why with unencoded urls it works on some browsers but not others-- which was confusing.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2014(UTC) Posts: 1,837 Location: Stockholm
Thanks: 144 times Was thanked: 297 time(s) in 250 post(s)
|
admin wrote:Be careful when using web addresses with symbols like , # etc as these need to be correctly "encoded" to work as a url value. Thanks! I forgot that for the Web API call but missed it was necessary for values when using Scripts too. Put differently, that comma was a "special character".
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Correct syntax for DataSourceSelectRow Web API/Script?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close