Skip to main content
Known Participant
October 26, 2012
Question

admin api - correct url syntax to getUsers for an event instance.

  • October 26, 2012
  • 1 reply
  • 2600 views

I'm trying to use the admin api to call the function getUsers() and I'm not sure of the correct URL syntax. I want to return the number of users currently connected to an event instance. Could someone provide an example of what the URL connection string would look like?

I tried the following syntax

http://localhost:1111/admin/getUsers?auser=USER&apswd=PASSWORD&appInst=livepkgr/_definst_/myEvent

but it returns this error message.

<?xml version="1.0" encoding="UTF-8"?>

-<result>

<level>error</level>

<code>NetConnection.Admin.CommandFailed</code>

<timestamp>10/26/2012 8:06:23 AM</timestamp>

</result>

>>>>>>>>>>>>>>>>>>>>>>>>

I can successfully use the ping command: http://localhost:1111/admin/ping?auser=USER&apswd=PASSWORD

<?xml version="1.0" encoding="UTF-8"?>

-<result>

<level>status</level>

<code>NetConnection.Call.Success</code>

<timestamp>10/26/2012 8:12:51 AM</timestamp>

</result>

In my FMS.ini file I do have  USERS.HTTPCOMMAND_ALLOW = true

In my USERS.xml file I have

<HTTPCommands>

            <Enable>${USERS.HTTPCOMMAND_ALLOW}</Enable>

            <Allow>ping,getUsers,getUserStats,getServerStats</Allow>

            <Deny></Deny>

            <Order>Deny,Allow</Order>

</HTTPCommands>

Thanks!

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    October 26, 2012

    The URI that you pasted in your query had got a space just after appInst. May be that’s the reason it’s not working.

    Also the syntax for appInst value is application_name/instance_name

    livepkgr/_definst_ should be enough. You need not specify the event name unless you are creating an instance of that name.

    Mr_DaveAuthor
    Known Participant
    October 26, 2012

    I found the problem. I wasn't putting quotes around the application/instance name value.

    http://localhost:1111/admin/getUsers?auser=USER&apswd=PASSWORD&appInst ="livepkgr/_definst_""

    Did the trick. Question though will this identify the number of client connections over http in addition to rtmp?

    Thanks Again!

    Petro_O__Bochan
    Inspiring
    October 26, 2012

    Hello, I doubt this would count HTTP connections. Use http://localhost:8134/server-status or http://localhost:8134/server-status?auto commands instead.