How to using unset command throught RouterOS API

Dear All

I am using the API to develop an control software as ‘Mini-winbox’, now i face an trouble with the api.
when i want to issuse the command like ‘/ip/router/unset .id=*2 routing-mark’
,‘/ip/firewall/nat/unset .id=*24 src-address’ , i get get an argument error.

How to using unset command through RouterOS API?

Thank u very much~!

did sentence

/ip/router/unset
.id=*2
=routing-mark=

not work?

Dear Chupaka:
I am using the same command as below:

/ip/route/unset
=.id=*2
=routing-mark=



/ip/route/unset
=.id=*2
=routing-mark

but , doesn’t work, RouterOS replay

!trap
message=argument error

I am using RouterOS v3.0 or v3.9, has the same thing.
Would you like to test this? thanks you very much

hmmm… the same thing =)

Janis?

normis ? would you like to help us on this topic?

Anybody can help me on this? please~!

Also looking for this, after searching I found in another thread you have to use the value-name field.
So in this thread case that would be :

/ip/route/unset
=.id=*2
=value-name=routing-mark

A response 10 years late :slight_smile:

10 years later, and another 3 before I read it, but it still solved my problem today. Thank you forum!