Web API in Version 11.1
Moderator: Moderators
Web API in Version 11.1
Are there any changes to the Web API in the titan version 11.1 ?
-
- Posts: 1089
- Joined: 02 Jul 2010, 10:29
- Location: Siegen, Germany
- Contact:
Re: Web API in Version 11.1
Compared to which version?
I am noz in the position to answer this, but in the past any changes from one version to another were that more was possible - I don't know of things which haven't worked in newer versions which had in older.
T'here might however be some little changes like the changed titanIds for masters (which aren't fixed anyway but would default to some values), see http://www.avolites.de/wiki/macros:identifier:titanid
I am noz in the position to answer this, but in the past any changes from one version to another were that more was possible - I don't know of things which haven't worked in newer versions which had in older.
T'here might however be some little changes like the changed titanIds for masters (which aren't fixed anyway but would default to some values), see http://www.avolites.de/wiki/macros:identifier:titanid
Re: Web API in Version 11.1
I try to control "SetList FireTrack (trackHandleID)" via WebAPI.
So far without success.
http://api.avolites.com/11.0/SetList.FireTrack.html
The macro works.
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
<macro id="wiki.macros.fire.1840" name="sb fire track 1840">
<sequence>
<step>SetList.FireTrack("trackHandleID=1840")</step>
</sequence>
</macro>
</avolites.macros>
So far without success.
http://api.avolites.com/11.0/SetList.FireTrack.html
The macro works.
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
<macro id="wiki.macros.fire.1840" name="sb fire track 1840">
<sequence>
<step>SetList.FireTrack("trackHandleID=1840")</step>
</sequence>
</macro>
</avolites.macros>
- sideshowbond
- Posts: 182
- Joined: 18 Nov 2016, 20:58
Re: Web API in Version 11.1
can you post the exact code of the API command you are using? Hard to tell what could be wrong without knowing what you do
Re: Web API in Version 11.1
Titan Mobile
129.168.11.134
http://192.168.11.134:4430/titan/script ... tanId=1895
Console log:
GET: http://192.168.11.134:4430/titan/get/Sy ... areVersion Open
IP stored: 192.168.11.134
"11.1"
GET: http://192.168.11.134:4430/titan/script ... tanId=1895 Open
Error: 500
129.168.11.134
http://192.168.11.134:4430/titan/script ... tanId=1895
Console log:
GET: http://192.168.11.134:4430/titan/get/Sy ... areVersion Open
IP stored: 192.168.11.134
"11.1"
GET: http://192.168.11.134:4430/titan/script ... tanId=1895 Open
Error: 500
- sideshowbond
- Posts: 182
- Joined: 18 Nov 2016, 20:58
Re: Web API in Version 11.1
I am somewhat surprised that the macro works as the chance of a exemplary TitanID actually matching real life is as big as winning the lottery.
Anyhow you should read the notes in the Wiki page
http://www.avolites.de/wiki/macros:example:firesetlisttrack
There also is a link to Sebastians Showfile Parser that will find the TitanIDs for your setlist track.
There is described what the difficulty with Set List items is. Basically the clue is to find how is meant to be used in an API command. I've tried a few ways but no success so far I'm afraid.
Anyhow you should read the notes in the Wiki page
http://www.avolites.de/wiki/macros:example:firesetlisttrack
There also is a link to Sebastians Showfile Parser that will find the TitanIDs for your setlist track.
There is described what the difficulty with Set List items is. Basically the clue is to find how
Code: Select all
trackHandleID
Re: Web API in Version 11.1
I adjusted the TitanID in the Macro.
ID=4916 Setlist 1, Track 01
Console log:
GET: http://192.168.11.134:4430/titan/script ... tanId=4916 Open
Error: 500
Error: 500
![Very Happy :D](./images/smilies/icon_biggrin.gif)
ID=4916 Setlist 1, Track 01
Console log:
GET: http://192.168.11.134:4430/titan/script ... tanId=4916 Open
Error: 500
Error: 500
- sideshowbond
- Posts: 182
- Joined: 18 Nov 2016, 20:58
Re: Web API in Version 11.1
fair enough
As I said the API syntax is not quite clear and I am not sure how to format the titanId for API. It is somewhere to do with trackId, trackHandleID but I haven't figured out how to format that. I hope Greg reads this and lets us know.
![Smile :)](./images/smilies/icon_smile.gif)
As I said the API syntax is not quite clear and I am not sure how to format the titanId for API. It is somewhere to do with trackId, trackHandleID but I haven't figured out how to format that. I hope Greg reads this and lets us know.
Re: Web API in Version 11.1
WebAPI tries to determine the correct type (of handle) based on the context of the function being called. Unfortunately in the case of SetList functions it is unable to determine what type of handle is required as it could be either a set list or a track. In the FireTrack function even though parameter name is trackHandle this does not help as the name doesn't necessarily relate to the type for example SelectSetList and AddMacroLink both have a parameter called handle one which is supposed to be a set list and the other a macro. If you were able to pass a string as the parameter you might be able to reference the handle in the same way as the macro i.e. trackHandleID=1840 however either it will try to parse the whole thing as a Titan ID or user number or everything beyond the equals sign will be ignored due to it being a separator in URL strings (even if it is escaped).
The best alternative would be to include macros in your show file to do the actual triggering of the set list tracks and then trigger those via WebAPI. As the Titan IDs will be dependent on the show file this may not be such a bad thing and you could potentially use the same macro user numbers across your different show files so that the WebAPI commands would work regardless of the show file.
The best alternative would be to include macros in your show file to do the actual triggering of the set list tracks and then trigger those via WebAPI. As the Titan IDs will be dependent on the show file this may not be such a bad thing and you could potentially use the same macro user numbers across your different show files so that the WebAPI commands would work regardless of the show file.
Re: Web API in Version 11.1
I have the following macros in my folder:
C:\Users\\Documents\Titan\Macros
For example, how can I start the macro "UserMacro.fire1" via API?
Titan Mobile
Titan PC Suite V.11.1
Win10 64 Bit
C:\Users\\Documents\Titan\Macros
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
<!-- V1.0 by movingart 14/12/2018 -->
<macro id="UserMacro.fire1" name="fire track 1">
<sequence>
<step>SetList.FireTrack("trackHandleID=4923")</step>
</sequence>
</macro>
<macro id="UserMacro.fire2" name="fire track 2">
<sequence>
<step>SetList.FireTrack("trackHandleID=7924")</step>
</sequence>
</macro>
<macro id="UserMacro.fire3" name="fire track 3">
<sequence>
<step>SetList.FireTrack("trackHandleID=4916")</step>
</sequence>
</macro>
<macro id="UserMacro.fire4" name="fire track 4">
<sequence>
<step>SetList.FireTrack("trackHandleID=4930")</step>
</sequence>
</macro>
<macro id="UserMacro.fire5" name="fire track 5">
<sequence>
<step>SetList.FireTrack("trackHandleID=4925")</step>
</sequence>
</macro>
<macro id="UserMacro.fire6" name="fire track 6">
<sequence>
<step>SetList.FireTrack("trackHandleID=4922")</step>
</sequence>
</macro>
<macro id="UserMacro.fire7" name="fire track 7">
<sequence>
<step>SetList.FireTrack("trackHandleID=4926")</step>
</sequence>
</macro>
<macro id="UserMacro.fire8" name="fire track 8">
<sequence>
<step>SetList.FireTrack("trackHandleID=4919")</step>
</sequence>
</macro>
<macro id="UserMacro.fire9" name="fire track 9">
<sequence>
<step>SetList.FireTrack("trackHandleID=4927")</step>
</sequence>
</macro>
<macro id="UserMacro.fire10" name="fire track 10">
<sequence>
<step>SetList.FireTrack("trackHandleID=4924")</step>
</sequence>
</macro>
<macro id="UserMacro.fire11" name="fire track 11">
<sequence>
<step>SetList.FireTrack("trackHandleID=3745")</step>
</sequence>
</macro>
<macro id="UserMacro.fire12" name="fire track 12">
<sequence>
<step>SetList.FireTrack("trackHandleID=4928")</step>
</sequence>
</macro>
<macro id="UserMacro.fire13" name="fire track 13">
<sequence>
<step>SetList.FireTrack("trackHandleID=4918")</step>
</sequence>
</macro>
<macro id="UserMacro.fire14" name="fire track 14">
<sequence>
<step>SetList.FireTrack("trackHandleID=7922")</step>
</sequence>
</macro>
<macro id="UserMacro.fire15" name="fire track 15">
<sequence>
<step>SetList.FireTrack("trackHandleID=7923")</step>
</sequence>
</macro>
<macro id="UserMacro.fire16" name="fire track 16">
<sequence>
<step>SetList.FireTrack("trackHandleID=4921")</step>
</sequence>
</macro>
<macro id="UserMacro.fire17" name="fire track 17">
<sequence>
<step>SetList.FireTrack("trackHandleID=4929")</step>
</sequence>
</macro>
<macro id="UserMacro.fire18" name="fire track 18">
<sequence>
<step>SetList.FireTrack("trackHandleID=4917")</step>
</sequence>
</macro>
</avolites.macros>
For example, how can I start the macro "UserMacro.fire1" via API?
Titan Mobile
Titan PC Suite V.11.1
Win10 64 Bit
- sideshowbond
- Posts: 182
- Joined: 18 Nov 2016, 20:58
Re: Web API in Version 11.1
http://api.avolites.com/11.0/UserMacros.RecallMacroById.html
MacroId references to the macro id in your custom macros (e.g. UserMacro.fire18)
MacroId references to the macro id in your custom macros (e.g. UserMacro.fire18)
- sideshowbond
- Posts: 182
- Joined: 18 Nov 2016, 20:58
Re: Web API in Version 11.1
oops, I think I might know why this is, I cannot tell for sure though. Greg please correct me if I'm wrong.
To my knowledge API is treated like another console (which is why you cannot bring a fixture selection into the programmer on the actual console via API) and as such API probably uses another handle world than the one on your console. Just a guess though.
What would work is to build single cue cuelists (or 2 cue with a release cue at the end) that trigger the setlist macros and trigger those cuelists via API. Not ideal but this should work.
To my knowledge API is treated like another console (which is why you cannot bring a fixture selection into the programmer on the actual console via API) and as such API probably uses another handle world than the one on your console. Just a guess though.
What would work is to build single cue cuelists (or 2 cue with a release cue at the end) that trigger the setlist macros and trigger those cuelists via API. Not ideal but this should work.
Re: Web API in Version 11.1
Alex is basically correct, as WebAPI runs effectively as a multi-user console/remote changes to the UI such as pages and workspaces do not have any affect on what you can see. In this particular case the command fails as the WebAPI has no UI to set the page or workspace of.
Who is online
Users browsing this forum: No registered users and 9 guests