Community discussions

MikroTik App

Search found 10 matches

by pafflootiy
Wed Jun 06, 2018 9:08 am
Forum: Scripting
Topic: Help me with fetch
Replies: 2
Views: 2721

Re: Help me with fetch

Have you tried: /tool fetch http-method=post http-data="payload={\"username\":\"someuser\"\n\"password\":\"somepass\"}" url="https://provider.ltd/path-to-script.php" ? Or maybe: /tool fetch http-method=post http-data="username=someuse...
by pafflootiy
Tue Jun 05, 2018 2:07 pm
Forum: Scripting
Topic: Help me with fetch
Replies: 2
Views: 2721

Help me with fetch

My ISP activate / deactivate services when you push the button on their webpage. I wanna do it by using "fetch" on my mikrotik. I get data of request from my browser Summary URL: https://provider.ltd/path-to-script.php Status: 200 OK Source: Network Address: 1.1.1.1:443 Request POST /path-...
by pafflootiy
Thu Apr 19, 2018 7:25 pm
Forum: Scripting
Topic: POST Request with fetch
Replies: 83
Views: 141699

Re: POST Request with fetch

:local chann dude-1 :local notification "Time: [Time]\nAddress: [Device.CustomField2]\nIP: [Device.FirstAddress]\nPing: [Service.Status]" :local iconurl https://wiki.mikrotik.com/images/5/54/Dude-icon3.png :local pload "payload={\"channel\": \"#$chann\", \"us...
by pafflootiy
Wed Dec 07, 2016 9:30 am
Forum: Scripting
Topic: such item (4)
Replies: 12
Views: 8596

Re: such item (4)

That is the message printed on error
Thanks a lot! I'll try it.
by pafflootiy
Tue Dec 06, 2016 3:48 pm
Forum: Scripting
Topic: such item (4)
Replies: 12
Views: 8596

Re: such item (4)

Please forgive my ignorance.
But what does mean "xxx" in:
  } on-error={ :put "xxx"};
 
Or should I leave it as is?
Thanks!
by pafflootiy
Tue Dec 06, 2016 2:11 pm
Forum: Scripting
Topic: such item (4)
Replies: 12
Views: 8596

Re: such item (4)

Use foreach loop which enumerate results of [find list=redirect] and for each element call remove command using exception handling (:do/on-error). Прошу простить мое невежество. А это как? Я про "луп". Т.е. делаю в скрипте несколько строк с одним тем же кодом (/ip firewall address-list re...
by pafflootiy
Tue Dec 06, 2016 12:47 pm
Forum: Scripting
Topic: Mikrotik backup tool
Replies: 5
Views: 2312

Re: Mikrotik backup tool

Is there any solution with API connection?
by pafflootiy
Tue Dec 06, 2016 10:57 am
Forum: Scripting
Topic: such item (4)
Replies: 12
Views: 8596

Re: such item (4)

Error occurs in cases if command tries to remove an item that does not exist any more (dynamic entries that already was removed, other script or user manually is modifying address list at the same time when command is executed)
Is there any solution?
by pafflootiy
Mon Dec 05, 2016 1:56 pm
Forum: Scripting
Topic: such item (4)
Replies: 12
Views: 8596

Re: such item (4)

Try
/ip firewall address-list remove [find where list=redirect]
Thanks, i'll try. And will it work the same with:
/ip proxy access remove number=[find action=deny]
?
by pafflootiy
Mon Dec 05, 2016 1:44 pm
Forum: Scripting
Topic: such item (4)
Replies: 12
Views: 8596

such item (4)

I have 26k enteris in address-list. And with this code:
/ip firewall address-list remove number=[find list=redirect]
i randomly resieve "no such item (4)" error
This is 1st row of *.auto.rsc script. Next goes updated address-list.