Old 4th February 2011, 11:46   #1
helios399
Junior Member
 
Join Date: Jan 2011
Posts: 34
API getendpoints return...

Hi guys,

I'm starting with shoutcast API's and I would want to get informations about encoders. (and modify them after)

I run two instances of sc_trans (V2) with 2 differents endpoints /s1 & /s2 on the same sc_serv (V2) (sc_trans1.conf & sc_trans2.conf)
No problem to connect with API.

But when I want to retreive informations about encoders with 'getendpoints', I receive only information about the first encoder ” /s1”
I tried to specify a "name" like name="/s1" or name="/s2" I receive informations for /s1 but nothing for /s2
Result for /s2 = <response>...<endpoints></endpoint> …</response>

As it is written in sc_trans_ajax_api.txt, the parameter "name" isn't required, but I want to retreive information about one specific encoder

I don’t understand why ? Do I need specify something special in sc_trans.conf or sc_serv for the second encoder ? Something missing ?

Thanks for your help…

Here is my simpleAjax code :

Quote:
$.ajax({
type: "POST",
username: 'admin',
password: 'xxx',
url: 'http://localhost:8100/api',
data: {op:"getendpoints",seq:10},
success: function(xml2) { parseXml(xml2); },
error: function(XMLHttpRequest, textStatus, errorThrown) { },
async:false
});
helios399 is offline   Reply With Quote
Old 4th February 2011, 15:55   #2
helios399
Junior Member
 
Join Date: Jan 2011
Posts: 34
resolved

I have to put one different adminport for each encoder

adminport=8100 for endpointname=/s1
adminport=8101 for endpointname=/s2

thanks !
helios399 is offline   Reply With Quote
Old 4th February 2011, 17:05   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
well that's good to know the api is working now you've realised you need to query each instance of sc_trans separately . if you were only using one instance to provide both instances then you would have gotten the multiple response that you were expecting from the first post.

-daz
DrO is offline   Reply With Quote
Old 4th February 2011, 20:50   #4
helios399
Junior Member
 
Join Date: Jan 2011
Posts: 34
very helpful precision...
Thanks
helios399 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump