1.7 KiB
Implementation Notes
API Endpoint Compatibility
This library is built based on the Omada Controller REST API specification. However, the actual API endpoints may vary slightly between Omada Controller versions. The following adjustments may be needed:
Authentication Endpoint
The authentication endpoint used is /api/v2/login. If your Omada Controller uses a different endpoint, you may need to adjust the Authentication.ts file.
Common alternatives:
/api/v2/oauth/token(OAuth2 token endpoint)/api/v1/login(v1 API)
API Path Structure
The library assumes the API follows REST conventions:
/sites/{siteId}/devices/{deviceId}/sites/{siteId}/vlans/{vlanId}- etc.
If your Omada Controller uses a different path structure, you may need to adjust the service classes accordingly.
SSL Certificate Handling
The library supports self-signed certificates by setting verifySSL: false. However, when using native fetch in Node.js 18+, SSL certificate handling may work differently than with node-fetch.
If you encounter SSL certificate issues:
- Option 1: Use
node-fetchpackage instead of native fetch - Option 2: Set
NODE_TLS_REJECT_UNAUTHORIZED=0environment variable (development only) - Option 3: Install proper SSL certificates on the Omada Controller
Testing with Actual Omada Controller
Before using in production, test with your actual Omada Controller to verify:
- Authentication endpoint and request format
- API response structure
- Error code meanings
- Required vs optional parameters
Contributing Improvements
If you discover API endpoint differences or need additional features, please update the service classes accordingly.