Community discussions

MikroTik App
 
duke
just joined
Topic Author
Posts: 5
Joined: Mon Feb 01, 2010 3:15 pm

why? API delete PPPOE USER fali

Mon Feb 01, 2010 3:25 pm

mikrotik.Send("/ppp/sec/remove");
mikrotik.Send("=name=user1");

fail

mikrotik.Send("/ppp/sec/remove");
mikrotik.Send("=user1");

fail


api Not support?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7041
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: why? API delete PPPOE USER fali

Mon Feb 01, 2010 3:30 pm

there is no such submenu as "sec" :D
use full names, api does not support auto completion

correct syntax:
/ppp/secret/remove
=numbers=user1
 
duke
just joined
Topic Author
Posts: 5
Joined: Mon Feb 01, 2010 3:15 pm

Re: why? API delete PPPOE USER fali

Mon Feb 01, 2010 3:38 pm

/ppp/secret/remove
=name=user1

/ppp/secret/remove
=user1

Or failure

Tips are as follows
[color=#FF0000!trap=message=argument error
!done][/color]
 
duke
just joined
Topic Author
Posts: 5
Joined: Mon Feb 01, 2010 3:15 pm

Re: why? API delete PPPOE USER fali

Mon Feb 01, 2010 3:40 pm

OK!!!

=namebers=user1

thanks!!
 
cleciorodrigo
just joined
Posts: 1
Joined: Sun Aug 22, 2010 3:47 pm

Re: why? API delete PPPOE USER fali

Sun Aug 22, 2010 3:49 pm

my friend you could remove users from active connections ?

I'm searching more so far without success
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: why? API delete PPPOE USER fali

Mon Aug 23, 2010 5:21 pm

my friend you could remove users from active connections ?

I'm searching more so far without success
try like this:
/ppp/active/remove
=.id=my_username
 
inibir
Member Candidate
Member Candidate
Posts: 116
Joined: Thu Nov 25, 2010 2:25 pm
Location: lebanon
Contact:

Re: why? API delete PPPOE USER fali

Thu Oct 06, 2011 4:59 am

	$API->comm("/ppp/secret/set", array(
		".id"	   => "$id"	,
		"profile"  => "$prof"	,
		"comment"  => "$date"	,
		"caller-id"=> ""
	));									     <------Work Normal

	$API->comm("/ppp/active/remove", array(".id"=>"$id"));   <------Not Work  :? 
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: why? API delete PPPOE USER fali

Thu Oct 06, 2011 9:33 am

check with python API client to see if commands you are using actually work, and then debug your API implementation (it seems in PHP) to make it work correctly.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: why? API delete PPPOE USER fali

Thu Oct 06, 2011 12:32 pm

seems like you cannot use 'name' as .id in /ppp/active, because 'name' does not identify the item uniquely: there can be many entries with the same 'name' field. so you need to do /ppp/active/print, and then use received .ids to remove actual items

Who is online

Users browsing this forum: A9691 and 16 guests