SlideShare a Scribd company logo
www.glcnetworks.com
API
(Application Programming Interface)
GLC webinar, 29 December 2016
Achmad Mardiansyah
achmad@glcnetworks.com
GLC Networks, Indonesia
www.glcnetworks.com
Agenda
● Introduction
● API intro
● Mikrotik API
● Demo
● Q & A
2
www.glcnetworks.com
What is GLC?
● Garda Lintas Cakrawala (www.glcnetworks.com)
● An Indonesian company
● Located in Bandung
● Areas: Training, IT Consulting
● Mikrotik Certified Training Partner
● Mikrotik Certified Consultant
● Mikrotik distributor
3
www.glcnetworks.com
About GLC webinar?
● First webinar: january 1, 2010 (title:
tahun baru bersama solaris - new
year with solaris OS)
● As a sharing event with various
topics: linux, networking, wireless,
database, programming, etc
● Regular schedule: every 2 weeks
● Irregular schedule: as needed
● Checking schedule:
http://www.glcnetworks.com/main/sc
hedule
● You are invited to be a presenter
○ No need to be an expert
○ This is a forum for sharing: knowledge,
experiences, information
4
www.glcnetworks.com
Trainer Introduction
● Name: Achmad Mardiansyah
● Base: bandung, Indonesia
● Linux user since 1999
● Mikrotik user since 2007
● Certified Trainer (MTCNA/RE/WE/UME/INE/TCE)
● Mikrotik Certified Consultant
● Work: Telco engineer, Sysadmin, PHP programmer,
and Lecturer
● Personal website: http://achmadjournal.com
● More info:
http://au.linkedin.com/in/achmadmardiansyah
5
www.glcnetworks.com
Please introduce yourself
● Your name
● Your company/university?
● Your networking experience?
● Your mikrotik experience?
● Your expectation from this course?
6
www.glcnetworks.com
What is Mikrotik?
● Name of a company
● A brand
● A program (e.g. mikrotik academy)
● Headquarter: Riga, Latvia
7
www.glcnetworks.com
What are mikrotik products?
● Router OS
○ The OS. Specialized for networking
○ Website: www.mikrotik.com/download
● RouterBoard
○ The hardware
○ RouterOS installed
○ Website: www.routerboard.com
8
www.glcnetworks.com
What Router OS can do?
● Go to www.mikrotik.com
○ Download: what_is_routeros.pdf
○ Download: product catalog
○ Download: newsletter
9
www.glcnetworks.com
What are Mikrotik training & certifications?
10
Certificate validity is 3 years
www.glcnetworks.com
API intro
11
www.glcnetworks.com
What is API?
● API: Application Programming Interface
● a set of subroutine definitions, protocols, and tools for building application
software.
● defined methods of communication between various software components
● API implementation are varied:
○ web-based system - using HTTP (popular)
○ operating system based - e.g. when developing daemon (apache, nginx)
○ Hardware based - e.g. when accessing microcontroller
○ etc..
12
www.glcnetworks.com
Why use API?
● For machine to machine communication (e.g. exchange rate, provisioning,
single sign on, etc)
● For automation (e.g. facebook login, twitter login, etc)
● To develop advanced services (uber, gojek, etc. they use google map API)
● For security. Limitation of access rights
● Many other reasons...
13
www.glcnetworks.com
Mikrotik API
14
www.glcnetworks.com
Mikrotik API
● Available since version 3
● Running on TCP port 8728 (http), or TCP
port 8729 (https)
● API service is disabled by default
● API is intended for machines, not human
15
Without API
With API
www.glcnetworks.com
Why use Mikrotik API?
● Security: define more fine-grained security, indirect access to the devices
● Provisioning: add/delete/update user
● Monitoring
● Customised access for user
● Develop a new service (fb login, single-sign-on, etc)
● Communicate with external application (e.g. billing system, monitoring,
self-service application)
● API is more rigid and consistent (suitable for machines). Unlike ssh (ssh is for
human interface)
● etc...
1616
Accessing
mikrotik API
www.glcnetworks.com
How to access mikrotik API?
● You need to understand programming language. E.g. PHP
● You need to provide a middle server that connects to mikrotik devices
● Make sure no firewall is blocking the mikrotik API
● API service need to be activated
● Make sure the user has api privileges
● Tips: only allow specific IP address that can access mikrotik API
17
www.glcnetworks.com
DEMO
18
www.glcnetworks.com
Using Mikrotik API
In this example we will use:
● PHP programming language
● Mikrotik PHP class by BenMenking
(https://github.com/BenMenking/routeros-api)
● A webserver that can access mikrotik devices
191919
Accessing
mikrotik API
www.glcnetworks.com
Example script (setup initial connection)
require('routeros_api.class.php'); //include api class
define('MIKROTIK_IP', '192.168.88.1'); //mikrotikIP address
define('MIKROTIK_USERNAME', 'admin'); //mikrotik username
define('MIKROTIK_PASSWORD', 'secret'); //mikrotik password
$API = new routeros_api(); //create a new instance
$API->debug = true; //activate debug
$API->connect(MIKROTIK_IP, MIKROTIK_USERNAME,
MIKROTIK_PASSWORD); // connect to mikrotik device
20
www.glcnetworks.com
add hotspot user using API (prepare user)
$user = array(1 => array('name' => 'user1', 'password' => 'pass1'),
2 => array('name' => 'user2', 'password' => 'pass2'),
3 => array('name' => 'user3', 'password' => 'pass3'),
4 => array('name' => 'user4', 'password' => 'pass4'),
5 => array('name' => 'user5', 'password' => 'pass5'),
);
foreach($user as $tmp) {
$username="=name=";
$username.=$tmp['name'];
$pass="=password=";
$pass.=$tmp['password'];
$server="=server=";
$server.=SERVER;$profile="=profile=";
$profile.=PROFILE;
21
www.glcnetworks.com
add hotspot user using API (add user)
$API->write('/ip/hotspot/user/add',false); //execute add command
$API->write($username, false); //insert username
$API->write($pass, false); // insert password
$API->write($server, false); //insert server
$API->write($profile); //insert profile name
$ARRAY = $API->read(); // this is for debug
echo "<pre>";
print_r($ARRAY);
echo "</pre>";
}
$API->disconnect(); //disconnect API
22
www.glcnetworks.com
Interested?
Just come to our
training...
Special price for webinar
attendees...
23
www.glcnetworks.com
End of slides
● Thank you for your attention
● Please submit your feedback: http://bit.ly/glcfeedback
● Like our facebook page: “GLC networks”
● Stay tune with our schedule
24

More Related Content

What's hot

MTCNA Intro to routerOS
MTCNA Intro to routerOSMTCNA Intro to routerOS
MTCNA Intro to routerOS
GLC Networks
 
Network Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and WhatsappNetwork Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and Whatsapp
GLC Networks
 
ISP load balancing with mikrotik nth
ISP load balancing with mikrotik nthISP load balancing with mikrotik nth
ISP load balancing with mikrotik nth
Achmad Mardiansyah
 
BGP on mikrotik
BGP on mikrotikBGP on mikrotik
BGP on mikrotik
Achmad Mardiansyah
 
Mikrotik firewall raw table
Mikrotik firewall raw tableMikrotik firewall raw table
Mikrotik firewall raw table
Achmad Mardiansyah
 
HOTSPOT on MikroTik Router
HOTSPOT on MikroTik RouterHOTSPOT on MikroTik Router
HOTSPOT on MikroTik Router
KHNOG
 
MUM Melbourne : Build Enterprise Wireless with CAPsMAN
MUM Melbourne : Build Enterprise Wireless with CAPsMANMUM Melbourne : Build Enterprise Wireless with CAPsMAN
MUM Melbourne : Build Enterprise Wireless with CAPsMAN
GLC Networks
 
Layer 7 Firewall on Mikrotik
Layer 7 Firewall on MikrotikLayer 7 Firewall on Mikrotik
Layer 7 Firewall on Mikrotik
GLC Networks
 
Voice Services, From Circuit Switch to VoIP
Voice Services, From Circuit Switch to VoIPVoice Services, From Circuit Switch to VoIP
Voice Services, From Circuit Switch to VoIP
GLC Networks
 
Using Mikrotik Switch Features to Improve Your Network
Using Mikrotik Switch Features to Improve Your Network Using Mikrotik Switch Features to Improve Your Network
Using Mikrotik Switch Features to Improve Your Network
GLC Networks
 
Software Defined Datacenter with Proxmox
Software Defined Datacenter with ProxmoxSoftware Defined Datacenter with Proxmox
Software Defined Datacenter with Proxmox
GLC Networks
 
Mikrotik link redundancy solution
Mikrotik link redundancy solution Mikrotik link redundancy solution
Mikrotik link redundancy solution
S M Tipu
 
BGP Services IP Transit vs IP Peering
BGP Services  IP Transit vs IP PeeringBGP Services  IP Transit vs IP Peering
BGP Services IP Transit vs IP Peering
GLC Networks
 
Mikrotik the dude
Mikrotik the dudeMikrotik the dude
Mikrotik the dude
Achmad Mardiansyah
 
Mikrotik fastpath
Mikrotik fastpathMikrotik fastpath
Mikrotik fastpath
Achmad Mardiansyah
 
BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1
GLC Networks
 
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
Rofiq Fauzi
 
Ebook Belajar Perangkat Cisco
Ebook Belajar Perangkat CiscoEbook Belajar Perangkat Cisco
Ebook Belajar Perangkat Cisco
Walid Umar
 
Fools your enemy with MikroTik
Fools your enemy with MikroTikFools your enemy with MikroTik
Fools your enemy with MikroTik
Didiet Kusumadihardja
 
Mikrotik Bridge Deep Dive
Mikrotik Bridge Deep DiveMikrotik Bridge Deep Dive
Mikrotik Bridge Deep Dive
GLC Networks
 

What's hot (20)

MTCNA Intro to routerOS
MTCNA Intro to routerOSMTCNA Intro to routerOS
MTCNA Intro to routerOS
 
Network Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and WhatsappNetwork Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and Whatsapp
 
ISP load balancing with mikrotik nth
ISP load balancing with mikrotik nthISP load balancing with mikrotik nth
ISP load balancing with mikrotik nth
 
BGP on mikrotik
BGP on mikrotikBGP on mikrotik
BGP on mikrotik
 
Mikrotik firewall raw table
Mikrotik firewall raw tableMikrotik firewall raw table
Mikrotik firewall raw table
 
HOTSPOT on MikroTik Router
HOTSPOT on MikroTik RouterHOTSPOT on MikroTik Router
HOTSPOT on MikroTik Router
 
MUM Melbourne : Build Enterprise Wireless with CAPsMAN
MUM Melbourne : Build Enterprise Wireless with CAPsMANMUM Melbourne : Build Enterprise Wireless with CAPsMAN
MUM Melbourne : Build Enterprise Wireless with CAPsMAN
 
Layer 7 Firewall on Mikrotik
Layer 7 Firewall on MikrotikLayer 7 Firewall on Mikrotik
Layer 7 Firewall on Mikrotik
 
Voice Services, From Circuit Switch to VoIP
Voice Services, From Circuit Switch to VoIPVoice Services, From Circuit Switch to VoIP
Voice Services, From Circuit Switch to VoIP
 
Using Mikrotik Switch Features to Improve Your Network
Using Mikrotik Switch Features to Improve Your Network Using Mikrotik Switch Features to Improve Your Network
Using Mikrotik Switch Features to Improve Your Network
 
Software Defined Datacenter with Proxmox
Software Defined Datacenter with ProxmoxSoftware Defined Datacenter with Proxmox
Software Defined Datacenter with Proxmox
 
Mikrotik link redundancy solution
Mikrotik link redundancy solution Mikrotik link redundancy solution
Mikrotik link redundancy solution
 
BGP Services IP Transit vs IP Peering
BGP Services  IP Transit vs IP PeeringBGP Services  IP Transit vs IP Peering
BGP Services IP Transit vs IP Peering
 
Mikrotik the dude
Mikrotik the dudeMikrotik the dude
Mikrotik the dude
 
Mikrotik fastpath
Mikrotik fastpathMikrotik fastpath
Mikrotik fastpath
 
BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1
 
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
 
Ebook Belajar Perangkat Cisco
Ebook Belajar Perangkat CiscoEbook Belajar Perangkat Cisco
Ebook Belajar Perangkat Cisco
 
Fools your enemy with MikroTik
Fools your enemy with MikroTikFools your enemy with MikroTik
Fools your enemy with MikroTik
 
Mikrotik Bridge Deep Dive
Mikrotik Bridge Deep DiveMikrotik Bridge Deep Dive
Mikrotik Bridge Deep Dive
 

Viewers also liked

Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750
Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750 Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750
Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750
Arif Wahyudi
 
Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...
Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...
Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...
Rudy Hendrawan
 
Setting mikrotik warnet i
Setting mikrotik warnet iSetting mikrotik warnet i
Setting mikrotik warnet i
Denny Hotspot
 
SETING DAN KONFIGURASI ROUTERBOARD MIKROTIK RB 750 METODE TEX
SETING DAN KONFIGURASI ROUTERBOARD  MIKROTIK RB 750 METODE TEXSETING DAN KONFIGURASI ROUTERBOARD  MIKROTIK RB 750 METODE TEX
SETING DAN KONFIGURASI ROUTERBOARD MIKROTIK RB 750 METODE TEX
Kadek Kamastika
 
IPv6 on Mikrotik
IPv6 on MikrotikIPv6 on Mikrotik
IPv6 on Mikrotik
Achmad Mardiansyah
 
GLC webinar: limiting bandwidth using mikrotik
GLC webinar: limiting bandwidth using mikrotikGLC webinar: limiting bandwidth using mikrotik
GLC webinar: limiting bandwidth using mikrotik
Achmad Mardiansyah
 
Setting mikrotik untuk game online campur browsing
Setting mikrotik untuk game online campur browsingSetting mikrotik untuk game online campur browsing
Setting mikrotik untuk game online campur browsing
imanariepin24
 
cara membuat hotspot dengan MikroTik di VirtualBox
cara membuat hotspot dengan MikroTik di VirtualBoxcara membuat hotspot dengan MikroTik di VirtualBox
cara membuat hotspot dengan MikroTik di VirtualBox
ariweda2323
 
Limiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address listLimiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address list
Achmad Mardiansyah
 
Konfigurasi mikrotik (virtualbox)
Konfigurasi mikrotik (virtualbox) Konfigurasi mikrotik (virtualbox)
Konfigurasi mikrotik (virtualbox)
Mas Tobel
 
Mikrotik metarouter
Mikrotik metarouterMikrotik metarouter
Mikrotik metarouter
Achmad Mardiansyah
 
Langkah langkah membuat hotspot MikroTik di virtualbox
Langkah langkah membuat hotspot MikroTik di virtualboxLangkah langkah membuat hotspot MikroTik di virtualbox
Langkah langkah membuat hotspot MikroTik di virtualbox
rizky dk
 
WIRELESS SECURITY ON MIKROTIK TUGAS 1 KOMUNIKASI NIRKABEL
WIRELESS SECURITY ON MIKROTIK TUGAS  1  KOMUNIKASI NIRKABELWIRELESS SECURITY ON MIKROTIK TUGAS  1  KOMUNIKASI NIRKABEL
WIRELESS SECURITY ON MIKROTIK TUGAS 1 KOMUNIKASI NIRKABEL
Sutni_Wulan_Sari_Puasa
 
Konfigurasi mikrotik-dasar-hotspot-dan-warnet
Konfigurasi mikrotik-dasar-hotspot-dan-warnetKonfigurasi mikrotik-dasar-hotspot-dan-warnet
Konfigurasi mikrotik-dasar-hotspot-dan-warnet
R Arju Damar
 
Routing fundamentals with mikrotik
Routing fundamentals with mikrotikRouting fundamentals with mikrotik
Routing fundamentals with mikrotik
Achmad Mardiansyah
 
7 superchannel mikrotik sutiyo
7 superchannel mikrotik sutiyo7 superchannel mikrotik sutiyo
7 superchannel mikrotik sutiyo
Ade Tamin
 
Laporan PRAKERIN MIKROTIK
Laporan PRAKERIN MIKROTIKLaporan PRAKERIN MIKROTIK
Laporan PRAKERIN MIKROTIK
Bayu Febry Valentino
 
10.1. perjanjian sewa menyewa
10.1. perjanjian sewa menyewa10.1. perjanjian sewa menyewa
10.1. perjanjian sewa menyewa
Denny Hotspot
 

Viewers also liked (18)

Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750
Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750 Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750
Sistem Keamanan dan Optimalisasi Bandwidth menggunakan MikroTik RB750
 
Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...
Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...
Jurnal manajemen bandwidth internet dengan router mikrotik di sma negeri sari...
 
Setting mikrotik warnet i
Setting mikrotik warnet iSetting mikrotik warnet i
Setting mikrotik warnet i
 
SETING DAN KONFIGURASI ROUTERBOARD MIKROTIK RB 750 METODE TEX
SETING DAN KONFIGURASI ROUTERBOARD  MIKROTIK RB 750 METODE TEXSETING DAN KONFIGURASI ROUTERBOARD  MIKROTIK RB 750 METODE TEX
SETING DAN KONFIGURASI ROUTERBOARD MIKROTIK RB 750 METODE TEX
 
IPv6 on Mikrotik
IPv6 on MikrotikIPv6 on Mikrotik
IPv6 on Mikrotik
 
GLC webinar: limiting bandwidth using mikrotik
GLC webinar: limiting bandwidth using mikrotikGLC webinar: limiting bandwidth using mikrotik
GLC webinar: limiting bandwidth using mikrotik
 
Setting mikrotik untuk game online campur browsing
Setting mikrotik untuk game online campur browsingSetting mikrotik untuk game online campur browsing
Setting mikrotik untuk game online campur browsing
 
cara membuat hotspot dengan MikroTik di VirtualBox
cara membuat hotspot dengan MikroTik di VirtualBoxcara membuat hotspot dengan MikroTik di VirtualBox
cara membuat hotspot dengan MikroTik di VirtualBox
 
Limiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address listLimiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address list
 
Konfigurasi mikrotik (virtualbox)
Konfigurasi mikrotik (virtualbox) Konfigurasi mikrotik (virtualbox)
Konfigurasi mikrotik (virtualbox)
 
Mikrotik metarouter
Mikrotik metarouterMikrotik metarouter
Mikrotik metarouter
 
Langkah langkah membuat hotspot MikroTik di virtualbox
Langkah langkah membuat hotspot MikroTik di virtualboxLangkah langkah membuat hotspot MikroTik di virtualbox
Langkah langkah membuat hotspot MikroTik di virtualbox
 
WIRELESS SECURITY ON MIKROTIK TUGAS 1 KOMUNIKASI NIRKABEL
WIRELESS SECURITY ON MIKROTIK TUGAS  1  KOMUNIKASI NIRKABELWIRELESS SECURITY ON MIKROTIK TUGAS  1  KOMUNIKASI NIRKABEL
WIRELESS SECURITY ON MIKROTIK TUGAS 1 KOMUNIKASI NIRKABEL
 
Konfigurasi mikrotik-dasar-hotspot-dan-warnet
Konfigurasi mikrotik-dasar-hotspot-dan-warnetKonfigurasi mikrotik-dasar-hotspot-dan-warnet
Konfigurasi mikrotik-dasar-hotspot-dan-warnet
 
Routing fundamentals with mikrotik
Routing fundamentals with mikrotikRouting fundamentals with mikrotik
Routing fundamentals with mikrotik
 
7 superchannel mikrotik sutiyo
7 superchannel mikrotik sutiyo7 superchannel mikrotik sutiyo
7 superchannel mikrotik sutiyo
 
Laporan PRAKERIN MIKROTIK
Laporan PRAKERIN MIKROTIKLaporan PRAKERIN MIKROTIK
Laporan PRAKERIN MIKROTIK
 
10.1. perjanjian sewa menyewa
10.1. perjanjian sewa menyewa10.1. perjanjian sewa menyewa
10.1. perjanjian sewa menyewa
 

Similar to Mikrotik API

Using mikrotik with radius
Using mikrotik with radiusUsing mikrotik with radius
Using mikrotik with radius
Achmad Mardiansyah
 
Building Web Server with Linux
Building Web Server with LinuxBuilding Web Server with Linux
Building Web Server with Linux
GLC Networks
 
Using Control-Webpanel for Hosting Service - Part 1
Using Control-Webpanel for Hosting Service - Part 1Using Control-Webpanel for Hosting Service - Part 1
Using Control-Webpanel for Hosting Service - Part 1
GLC Networks
 
Using protocol analyzer on mikrotik
Using protocol analyzer on mikrotikUsing protocol analyzer on mikrotik
Using protocol analyzer on mikrotik
Achmad Mardiansyah
 
Choosing Mikrotik Platform x86 vs chr
Choosing Mikrotik Platform x86 vs chrChoosing Mikrotik Platform x86 vs chr
Choosing Mikrotik Platform x86 vs chr
GLC Networks
 
SSL certificate with mikrotik
SSL certificate with mikrotikSSL certificate with mikrotik
SSL certificate with mikrotik
Achmad Mardiansyah
 
Your Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes
Your Application Deserves Better than Kubernetes Ingress: Istio vs. KubernetesYour Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes
Your Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes
Mirantis
 
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
WSO2
 
Using Kubernetes to Provide Services
Using Kubernetes to Provide ServicesUsing Kubernetes to Provide Services
Using Kubernetes to Provide Services
GLC Networks
 
GIT as Mikrotik Configuration Management
GIT as Mikrotik Configuration ManagementGIT as Mikrotik Configuration Management
GIT as Mikrotik Configuration Management
GLC Networks
 
Dynamic Website with Python
Dynamic Website with PythonDynamic Website with Python
Dynamic Website with Python
GLC Networks
 
Using Docker Platform to Provide Services
Using Docker Platform to Provide ServicesUsing Docker Platform to Provide Services
Using Docker Platform to Provide Services
GLC Networks
 
IPsec on Mikrotik
IPsec on MikrotikIPsec on Mikrotik
IPsec on Mikrotik
GLC Networks
 
Building API with PHP
Building API with PHPBuilding API with PHP
Building API with PHP
GLC Networks
 
Introduction to Jhipster
Introduction to JhipsterIntroduction to Jhipster
Introduction to Jhipster
Knoldus Inc.
 
Using an API Gateway for Microservices
Using an API Gateway for MicroservicesUsing an API Gateway for Microservices
Using an API Gateway for Microservices
NGINX, Inc.
 
Socket Programming with Python
Socket Programming with PythonSocket Programming with Python
Socket Programming with Python
GLC Networks
 
EOIP Deep Dive
EOIP Deep DiveEOIP Deep Dive
EOIP Deep Dive
GLC Networks
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API Management
Nuwan Dias
 
Manage Your Router with Dynamic Public IP
Manage Your Router with Dynamic Public IPManage Your Router with Dynamic Public IP
Manage Your Router with Dynamic Public IP
GLC Networks
 

Similar to Mikrotik API (20)

Using mikrotik with radius
Using mikrotik with radiusUsing mikrotik with radius
Using mikrotik with radius
 
Building Web Server with Linux
Building Web Server with LinuxBuilding Web Server with Linux
Building Web Server with Linux
 
Using Control-Webpanel for Hosting Service - Part 1
Using Control-Webpanel for Hosting Service - Part 1Using Control-Webpanel for Hosting Service - Part 1
Using Control-Webpanel for Hosting Service - Part 1
 
Using protocol analyzer on mikrotik
Using protocol analyzer on mikrotikUsing protocol analyzer on mikrotik
Using protocol analyzer on mikrotik
 
Choosing Mikrotik Platform x86 vs chr
Choosing Mikrotik Platform x86 vs chrChoosing Mikrotik Platform x86 vs chr
Choosing Mikrotik Platform x86 vs chr
 
SSL certificate with mikrotik
SSL certificate with mikrotikSSL certificate with mikrotik
SSL certificate with mikrotik
 
Your Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes
Your Application Deserves Better than Kubernetes Ingress: Istio vs. KubernetesYour Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes
Your Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes
 
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
 
Using Kubernetes to Provide Services
Using Kubernetes to Provide ServicesUsing Kubernetes to Provide Services
Using Kubernetes to Provide Services
 
GIT as Mikrotik Configuration Management
GIT as Mikrotik Configuration ManagementGIT as Mikrotik Configuration Management
GIT as Mikrotik Configuration Management
 
Dynamic Website with Python
Dynamic Website with PythonDynamic Website with Python
Dynamic Website with Python
 
Using Docker Platform to Provide Services
Using Docker Platform to Provide ServicesUsing Docker Platform to Provide Services
Using Docker Platform to Provide Services
 
IPsec on Mikrotik
IPsec on MikrotikIPsec on Mikrotik
IPsec on Mikrotik
 
Building API with PHP
Building API with PHPBuilding API with PHP
Building API with PHP
 
Introduction to Jhipster
Introduction to JhipsterIntroduction to Jhipster
Introduction to Jhipster
 
Using an API Gateway for Microservices
Using an API Gateway for MicroservicesUsing an API Gateway for Microservices
Using an API Gateway for Microservices
 
Socket Programming with Python
Socket Programming with PythonSocket Programming with Python
Socket Programming with Python
 
EOIP Deep Dive
EOIP Deep DiveEOIP Deep Dive
EOIP Deep Dive
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API Management
 
Manage Your Router with Dynamic Public IP
Manage Your Router with Dynamic Public IPManage Your Router with Dynamic Public IP
Manage Your Router with Dynamic Public IP
 

More from Achmad Mardiansyah

01 introduction to mpls
01 introduction to mpls 01 introduction to mpls
01 introduction to mpls
Achmad Mardiansyah
 
Solaris 10 Container
Solaris 10 ContainerSolaris 10 Container
Solaris 10 Container
Achmad Mardiansyah
 
Backup & Restore (BR) in Solaris OS
Backup & Restore (BR) in Solaris OSBackup & Restore (BR) in Solaris OS
Backup & Restore (BR) in Solaris OS
Achmad Mardiansyah
 
Mikrotik User Meeting Manila: bgp vs ospf
Mikrotik User Meeting Manila: bgp vs ospfMikrotik User Meeting Manila: bgp vs ospf
Mikrotik User Meeting Manila: bgp vs ospf
Achmad Mardiansyah
 
PHPID online Learning #6 Migration from procedural to OOP
PHPID online Learning #6 Migration from procedural to OOPPHPID online Learning #6 Migration from procedural to OOP
PHPID online Learning #6 Migration from procedural to OOP
Achmad Mardiansyah
 
Troubleshooting load balancing
Troubleshooting load balancingTroubleshooting load balancing
Troubleshooting load balancing
Achmad Mardiansyah
 
Mikrotik firewall mangle
Mikrotik firewall mangleMikrotik firewall mangle
Mikrotik firewall mangle
Achmad Mardiansyah
 
Wireless CSMA with mikrotik
Wireless CSMA with mikrotikWireless CSMA with mikrotik
Wireless CSMA with mikrotik
Achmad Mardiansyah
 
BGP filter with mikrotik
BGP filter with mikrotikBGP filter with mikrotik
BGP filter with mikrotik
Achmad Mardiansyah
 
Mikrotik VRRP
Mikrotik VRRPMikrotik VRRP
Mikrotik VRRP
Achmad Mardiansyah
 
Mikrotik fasttrack
Mikrotik fasttrackMikrotik fasttrack
Mikrotik fasttrack
Achmad Mardiansyah
 
Jumpstart your router with mikrotik quickset
Jumpstart your router with mikrotik quicksetJumpstart your router with mikrotik quickset
Jumpstart your router with mikrotik quickset
Achmad Mardiansyah
 
Mikrotik firewall NAT
Mikrotik firewall NATMikrotik firewall NAT
Mikrotik firewall NAT
Achmad Mardiansyah
 
VPN on Mikrotik
VPN on MikrotikVPN on Mikrotik
VPN on Mikrotik
Achmad Mardiansyah
 

More from Achmad Mardiansyah (14)

01 introduction to mpls
01 introduction to mpls 01 introduction to mpls
01 introduction to mpls
 
Solaris 10 Container
Solaris 10 ContainerSolaris 10 Container
Solaris 10 Container
 
Backup & Restore (BR) in Solaris OS
Backup & Restore (BR) in Solaris OSBackup & Restore (BR) in Solaris OS
Backup & Restore (BR) in Solaris OS
 
Mikrotik User Meeting Manila: bgp vs ospf
Mikrotik User Meeting Manila: bgp vs ospfMikrotik User Meeting Manila: bgp vs ospf
Mikrotik User Meeting Manila: bgp vs ospf
 
PHPID online Learning #6 Migration from procedural to OOP
PHPID online Learning #6 Migration from procedural to OOPPHPID online Learning #6 Migration from procedural to OOP
PHPID online Learning #6 Migration from procedural to OOP
 
Troubleshooting load balancing
Troubleshooting load balancingTroubleshooting load balancing
Troubleshooting load balancing
 
Mikrotik firewall mangle
Mikrotik firewall mangleMikrotik firewall mangle
Mikrotik firewall mangle
 
Wireless CSMA with mikrotik
Wireless CSMA with mikrotikWireless CSMA with mikrotik
Wireless CSMA with mikrotik
 
BGP filter with mikrotik
BGP filter with mikrotikBGP filter with mikrotik
BGP filter with mikrotik
 
Mikrotik VRRP
Mikrotik VRRPMikrotik VRRP
Mikrotik VRRP
 
Mikrotik fasttrack
Mikrotik fasttrackMikrotik fasttrack
Mikrotik fasttrack
 
Jumpstart your router with mikrotik quickset
Jumpstart your router with mikrotik quicksetJumpstart your router with mikrotik quickset
Jumpstart your router with mikrotik quickset
 
Mikrotik firewall NAT
Mikrotik firewall NATMikrotik firewall NAT
Mikrotik firewall NAT
 
VPN on Mikrotik
VPN on MikrotikVPN on Mikrotik
VPN on Mikrotik
 

Recently uploaded

LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
SelfMade bd
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
janagijoythi
 
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
OnBoard
 
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Zilliz
 
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
bellared2
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
Zilliz
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
Google Developer Group - Harare
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
Razin Mustafiz
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
BrainSell Technologies
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
DianaGray10
 
Intel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdfIntel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdf
Tech Guru
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
SubhamMandal40
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Nicolás Lopéz
 
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
AimanAthambawa1
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
FIDO Alliance
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
Priyanka Aash
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 

Recently uploaded (20)

LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
 
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
 
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
 
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
 
Intel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdfIntel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdf
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
 
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 

Mikrotik API

  • 1. www.glcnetworks.com API (Application Programming Interface) GLC webinar, 29 December 2016 Achmad Mardiansyah achmad@glcnetworks.com GLC Networks, Indonesia
  • 2. www.glcnetworks.com Agenda ● Introduction ● API intro ● Mikrotik API ● Demo ● Q & A 2
  • 3. www.glcnetworks.com What is GLC? ● Garda Lintas Cakrawala (www.glcnetworks.com) ● An Indonesian company ● Located in Bandung ● Areas: Training, IT Consulting ● Mikrotik Certified Training Partner ● Mikrotik Certified Consultant ● Mikrotik distributor 3
  • 4. www.glcnetworks.com About GLC webinar? ● First webinar: january 1, 2010 (title: tahun baru bersama solaris - new year with solaris OS) ● As a sharing event with various topics: linux, networking, wireless, database, programming, etc ● Regular schedule: every 2 weeks ● Irregular schedule: as needed ● Checking schedule: http://www.glcnetworks.com/main/sc hedule ● You are invited to be a presenter ○ No need to be an expert ○ This is a forum for sharing: knowledge, experiences, information 4
  • 5. www.glcnetworks.com Trainer Introduction ● Name: Achmad Mardiansyah ● Base: bandung, Indonesia ● Linux user since 1999 ● Mikrotik user since 2007 ● Certified Trainer (MTCNA/RE/WE/UME/INE/TCE) ● Mikrotik Certified Consultant ● Work: Telco engineer, Sysadmin, PHP programmer, and Lecturer ● Personal website: http://achmadjournal.com ● More info: http://au.linkedin.com/in/achmadmardiansyah 5
  • 6. www.glcnetworks.com Please introduce yourself ● Your name ● Your company/university? ● Your networking experience? ● Your mikrotik experience? ● Your expectation from this course? 6
  • 7. www.glcnetworks.com What is Mikrotik? ● Name of a company ● A brand ● A program (e.g. mikrotik academy) ● Headquarter: Riga, Latvia 7
  • 8. www.glcnetworks.com What are mikrotik products? ● Router OS ○ The OS. Specialized for networking ○ Website: www.mikrotik.com/download ● RouterBoard ○ The hardware ○ RouterOS installed ○ Website: www.routerboard.com 8
  • 9. www.glcnetworks.com What Router OS can do? ● Go to www.mikrotik.com ○ Download: what_is_routeros.pdf ○ Download: product catalog ○ Download: newsletter 9
  • 10. www.glcnetworks.com What are Mikrotik training & certifications? 10 Certificate validity is 3 years
  • 12. www.glcnetworks.com What is API? ● API: Application Programming Interface ● a set of subroutine definitions, protocols, and tools for building application software. ● defined methods of communication between various software components ● API implementation are varied: ○ web-based system - using HTTP (popular) ○ operating system based - e.g. when developing daemon (apache, nginx) ○ Hardware based - e.g. when accessing microcontroller ○ etc.. 12
  • 13. www.glcnetworks.com Why use API? ● For machine to machine communication (e.g. exchange rate, provisioning, single sign on, etc) ● For automation (e.g. facebook login, twitter login, etc) ● To develop advanced services (uber, gojek, etc. they use google map API) ● For security. Limitation of access rights ● Many other reasons... 13
  • 15. www.glcnetworks.com Mikrotik API ● Available since version 3 ● Running on TCP port 8728 (http), or TCP port 8729 (https) ● API service is disabled by default ● API is intended for machines, not human 15 Without API With API
  • 16. www.glcnetworks.com Why use Mikrotik API? ● Security: define more fine-grained security, indirect access to the devices ● Provisioning: add/delete/update user ● Monitoring ● Customised access for user ● Develop a new service (fb login, single-sign-on, etc) ● Communicate with external application (e.g. billing system, monitoring, self-service application) ● API is more rigid and consistent (suitable for machines). Unlike ssh (ssh is for human interface) ● etc... 1616 Accessing mikrotik API
  • 17. www.glcnetworks.com How to access mikrotik API? ● You need to understand programming language. E.g. PHP ● You need to provide a middle server that connects to mikrotik devices ● Make sure no firewall is blocking the mikrotik API ● API service need to be activated ● Make sure the user has api privileges ● Tips: only allow specific IP address that can access mikrotik API 17
  • 19. www.glcnetworks.com Using Mikrotik API In this example we will use: ● PHP programming language ● Mikrotik PHP class by BenMenking (https://github.com/BenMenking/routeros-api) ● A webserver that can access mikrotik devices 191919 Accessing mikrotik API
  • 20. www.glcnetworks.com Example script (setup initial connection) require('routeros_api.class.php'); //include api class define('MIKROTIK_IP', '192.168.88.1'); //mikrotikIP address define('MIKROTIK_USERNAME', 'admin'); //mikrotik username define('MIKROTIK_PASSWORD', 'secret'); //mikrotik password $API = new routeros_api(); //create a new instance $API->debug = true; //activate debug $API->connect(MIKROTIK_IP, MIKROTIK_USERNAME, MIKROTIK_PASSWORD); // connect to mikrotik device 20
  • 21. www.glcnetworks.com add hotspot user using API (prepare user) $user = array(1 => array('name' => 'user1', 'password' => 'pass1'), 2 => array('name' => 'user2', 'password' => 'pass2'), 3 => array('name' => 'user3', 'password' => 'pass3'), 4 => array('name' => 'user4', 'password' => 'pass4'), 5 => array('name' => 'user5', 'password' => 'pass5'), ); foreach($user as $tmp) { $username="=name="; $username.=$tmp['name']; $pass="=password="; $pass.=$tmp['password']; $server="=server="; $server.=SERVER;$profile="=profile="; $profile.=PROFILE; 21
  • 22. www.glcnetworks.com add hotspot user using API (add user) $API->write('/ip/hotspot/user/add',false); //execute add command $API->write($username, false); //insert username $API->write($pass, false); // insert password $API->write($server, false); //insert server $API->write($profile); //insert profile name $ARRAY = $API->read(); // this is for debug echo "<pre>"; print_r($ARRAY); echo "</pre>"; } $API->disconnect(); //disconnect API 22
  • 23. www.glcnetworks.com Interested? Just come to our training... Special price for webinar attendees... 23
  • 24. www.glcnetworks.com End of slides ● Thank you for your attention ● Please submit your feedback: http://bit.ly/glcfeedback ● Like our facebook page: “GLC networks” ● Stay tune with our schedule 24