logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
richardgatarski  
#1 Posted : Friday, March 2, 2018 12:41:14 PM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,821
Location: Stockholm

Thanks: 138 times
Was thanked: 292 time(s) in 246 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.
kjones9999  
#2 Posted : Saturday, March 3, 2018 1:52:57 AM(UTC)
kjones9999

Rank: Advanced Member

Groups: Registered
Joined: 8/20/2014(UTC)
Posts: 388

Thanks: 29 times
Was thanked: 78 time(s) in 50 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.
admin  
#3 Posted : Saturday, March 3, 2018 2:14:36 AM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 5,162
Man
Location: Gold Coast, Australia

Was thanked: 4172 time(s) in 1498 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
thanks 3 users thanked admin for this useful post.
ask on 3/3/2018(UTC), kjones9999 on 3/3/2018(UTC), vijay6672 on 10/13/2018(UTC)
kjones9999  
#4 Posted : Saturday, March 3, 2018 8:13:06 PM(UTC)
kjones9999

Rank: Advanced Member

Groups: Registered
Joined: 8/20/2014(UTC)
Posts: 388

Thanks: 29 times
Was thanked: 78 time(s) in 50 post(s)
Thanks-- this explains why with unencoded urls it works on some browsers but not others-- which was confusing.
richardgatarski  
#5 Posted : Monday, March 5, 2018 7:21:14 AM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,821
Location: Stockholm

Thanks: 138 times
Was thanked: 292 time(s) in 246 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".
Users browsing this topic
Guest
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.