Download the PHP package a909m/routeros-php-sdk without Composer
On this page you can find all versions of the php package a909m/routeros-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download a909m/routeros-php-sdk
More information about a909m/routeros-php-sdk
Files in a909m/routeros-php-sdk
Package routeros-php-sdk
Short Description RouterOS REST API v7.23.1 SDK - A PHP SDK for MikroTik RouterOS built with Saloon
License MIT
Homepage https://github.com/a909m/routeros-php-sdk
Informations about the package routeros-php-sdk
RouterOS PHP SDK
Note: This package is under active development. The API may change between minor versions until a stable release.
A PHP SDK for the MikroTik RouterOS REST API, built with Saloon.
This SDK was auto-generated from the RouterOS v7.23.1 OpenAPI specification and covers all available REST API endpoints.
Requirements
- PHP 8.2 or higher
- Composer
Installation
Install the package via Composer:
Usage
Basic Usage
Initialize the SDK with your RouterOS credentials:
Authentication
The SDK uses HTTP Basic Authentication by default. For HTTPS connections, pass useHttps: true (the REST API typically runs on port 443):
Timeouts
Default timeouts: 60s connection, 120s request. To customize, extend the RouterOS class:
Error Handling
The SDK throws Saloon exceptions when requests fail. Wrap calls in try/catch to handle errors gracefully:
Available Resources
The SDK provides access to all RouterOS REST API resources:
| Resource | Method | Description |
|---|---|---|
app() |
App management | Manage RouterOS apps |
capsMan() |
CapsMan | Wireless CAPsMAN management |
certificate() |
Certificates | Certificate management |
console() |
Console | Console settings |
container() |
Containers | Container management |
disk() |
Disk | Disk management |
dude() |
Dude | The Dude network monitoring |
environment() |
Environment | Environment variables |
file() |
Files | File management |
interfaceResource() |
Interfaces | Network interfaces |
iot() |
IoT | IoT configurations |
ip() |
IP | IP address, routes, firewall |
ipv6() |
IPv6 | IPv6 configurations |
log() |
Logs | System logs |
mpls() |
MPLS | MPLS configurations |
openflow() |
OpenFlow | OpenFlow settings |
port() |
Ports | Port management |
ppp() |
PPP | PPP configurations |
queue() |
Queues | Queue management |
radius() |
RADIUS | RADIUS settings |
root() |
Root | Root-level operations |
routing() |
Routing | Routing protocols |
safeMode() |
Safe Mode | Safe mode operations |
snmp() |
SNMP | SNMP settings |
specialLogin() |
Special Login | Special login methods |
system() |
System | System settings |
task() |
Tasks | Task management |
terminal() |
Terminal | Terminal access |
tool() |
Tools | Various tools |
tr069client() |
TR-069 | TR-069 client settings |
user() |
Users | User management |
userManager() |
User Manager | User manager settings |
Examples
Get System Information
Manage IP Addresses
Firewall Rules
Wireless Configuration
Working with Proplists
You can specify which properties to return using the proplist parameter:
Testing
Run the test suite:
Run static analysis:
Format code:
API Documentation
This SDK was generated from the RouterOS OpenAPI specification. For detailed API documentation, refer to the MikroTik Wiki.
Credits
- Saloon - The PHP HTTP client library used to build this SDK
- Saloon SDK Generator - The tool used to generate this SDK from the OpenAPI specification
- RouterOS OpenAPI Spec - The OpenAPI specification source
Changelog
See CHANGELOG.md for a list of changes and release notes.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see LICENSE for more information.