OKILA | اوکیلا
سامانه یکپارچه ۶۲ ابزار مهندسی IT و شبکه
اتصال به سامانه... ۰٪
برقراری ارتباط با هسته اوکیلا
📡

مستندات ای‌پی‌آی ابزارهای اوکیلا (API Documentation)

دسترسی برنامه‌نویسی و خط فرمان به تمام ۶۲ ابزار تخصصی IT

توسعه‌دهندگان و ادمین‌های سرور می‌توانند از تمامی ابزارهای پردازشی و استعلامی OKILA TOOLS مستقیماً در خط فرمان لینوکس (cURL) یا اسکریپت‌های پایتون، نودجی‌اس و PHP بدون نیاز به ثبت‌نام یا پرداخت هزینه استفاده نمایند.

آدرس پایه ای‌پی‌آی (Base Endpoint):
POST https://tools.okila.ir/api/index.php?tool={slug}

۱. اجرای ابزار از طریق خط فرمان (cURL)

نمونه تست آنلاین پینگ، کانفیگ Nginx، ساب‌نت یا Dockerfile در ترمینال لینوکس یا ویندوز:

# ۱. استعلام پینگ یک دامنه
curl -X POST https://tools.okila.ir/api/index.php?tool=ping \
     -H "Content-Type: application/json" \
     -d '{"target": "google.com"}'

# ۲. تولید کانفیگ وب‌سرور Nginx
curl -X POST https://tools.okila.ir/api/index.php?tool=nginx-config-generator \
     -H "Content-Type: application/json" \
     -d '{"type": "reverse_proxy", "domain": "api.mydomain.com", "options": {"proxy_pass": "http://127.0.0.1:8000", "ssl": true}}'

# ۳. محاسبه و تخصیص VLSM شبکه
curl -X POST https://tools.okila.ir/api/index.php?tool=vlsm-calculator \
     -H "Content-Type: application/json" \
     -d '{"major_network": "192.168.0.0/24", "subnets": [{"name": "Web", "hosts": 50}, {"name": "DB", "hosts": 20}]}'

۲. نمونه کد در پایتون (Python Requests)

import requests

url = "https://tools.okila.ir/api/index.php?tool=subnet-calculator"
payload = {"cidr": "172.16.0.0/22"}

response = requests.post(url, json=payload)
data = response.json()

print(f"Network: {data['data']['network']}")
print(f"Usable Hosts: {data['data']['usable_hosts']}")

۳. نمونه کد در جاوااسکریپت (JavaScript Fetch)

const res = await fetch("https://tools.okila.ir/api/index.php?tool=password-generator", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ length: 24, uppercase: true, lowercase: true, numbers: true, symbols: true })
});
const result = await res.json();
console.log("Secure Password:", result.data.password);
محدودیت نرخ درخواست (Rate Limit): هر کلاینت می‌تواند تا ۶۰ درخواست در دقیقه به صورت رایگان ارسال نماید. هدرهای امنیتی و استانداردهای Zero-Retention روی تمام ارتباطات ای‌پی‌آی اعمال شده است.