Skip to main content
Participating Frequently
February 10, 2011
Question

admin api from the fms server

  • February 10, 2011
  • 1 reply
  • 749 views

Hi,

i've never had to do this before so i guess i didn't realize that it's this hard, but is true that you can't call the admin api from the server-side?

even from the Client object??

also, i have objects in my cache from two different applications on my server and yet my info.data object in the result is coming back

without any values.

can someone explain how this is supposed to work...below is my code

nc_admin.connect("rtmp://localhost/admin:1111/", "admin", "admin");

onStatus(info){

    

     function onGetCacheStats(){

          this.onResult = function(info){

           

               if(info.code == "NetConnection.Call.Success"){

                    for(var prop in info.data.objects){

                         trace("data object props: "+ info.data.objects[prop] + " prop: " + prop );

                         for(var dat in info.data.objects[prop] ){

                              trace("data pbj value: "+ info.data.objects[prop][dat] + " dat: "+ dat);

                         }

                    }

               }

          }

     }//onGetCacheStats

     if(info.code == "NetConnection.Connect.Success"){

          this.call("getFileCacheStats", new onGetCacheStats, true);

     }

}

thanks much!

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    February 10, 2011

    It needs to be nc.onStatus not just onStatus

    Participating Frequently
    February 10, 2011

    you are correct, but in the real code it is that way

    Participating Frequently
    February 22, 2011

    Is your code not working? I mean what errors do you get - is your connection succeding but call is not working?