Community discussions

MikroTik App
 
shaiesh
just joined
Topic Author
Posts: 6
Joined: Fri Mar 01, 2013 10:37 am

Edit Simple Queue, Using Denis Basta's php api, plz help me

Tue Mar 05, 2013 8:46 am

i am currently using the PHP API by Denis Basta...
and i successfully implemented this API to add and delete Simple Queue...

Now i need to edit the added queue ;
i am using following code to add simple queue
$ARRAY = $this->api_model->comm("/queue/simple/add", array(
                          "name"     => $somedata['name'],
                          "target-addresses"     => $ips,
                          "max-limit"=>$somedata['rx_max_limit']."/".$somedata['tx_max_limit'],
                          "parent"=>$parent_name,
        )); 
how can i edit the simple queue by supplying queue name and its new parameters, i only need to update bandhwith of that specific simple queue, i only need to edit max limits of a simple queue;
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Edit Simple Queue, Using Denis Basta's php api, plz help

Tue Mar 05, 2013 7:07 pm

Use the "set" command, and use the "numbers" argument to specify the name of the queue. All other arguments reflect the new values you wish said queue to have.
 
ryvan
just joined
Posts: 3
Joined: Thu Jul 04, 2013 9:28 am

Re: Edit Simple Queue, Using Denis Basta's php api, plz help

Thu Jul 04, 2013 10:10 am

shaiesh...can you help with the php api queue connector .I wanna accomplish exactly same thing as you do..and i cant add rule to queue from my php..my code is something like this

I am trying to add a rule to queue simple and i am using php api to do that as follows:

example:
$API->comm("/queue/simple/add", array(
    "target-address="=> "10.10.10.16",
);
and its throwing error on the debug page :
Connected...
<<< [17] /queue/simple/add
<<< [28] =target-address==10.10.10.16
>>> [5/5] bytes read.
>>> [5, 35]!trap
>>> [26/26] bytes read.
>>> [26, 8]=message=unknown parameter
>>> [5/5] bytes read.
>>> [5, 1]!done
while all other api works just fine..thanks in advance.

Who is online

Users browsing this forum: No registered users and 15 guests