Omada SDN Controller API Manage TP-Link Omada SDN Controllers via the Open API (OpenAPI 3.0.1). Compatibility The Open API is available in Omada SDN Controller v5.9 and later (both the Software Controller and Cloud-Based Controller). Earlier versions only have an undocumented internal API that uses cookie-based session auth — this skill does not cover that legacy API. The Open API feature must be explicitly enabled by an administrator before use. Environment Setup Before making any API calls, you need three environment variables. If the user has not provided these or a file does not exist, wa…

| xargs)\nfi\n\nfor var in OMADA_URL OMADA_CLIENT OMADA_SECRET; do\n if [[ -z \"${!var:-}\" ]]; then\n echo \"Error: ${var} is not set. Add it to .env\" >&2\n exit 1\n fi\ndone\n\n# --- Health check (no args) ---\n\nif [[ $# -eq 0 ]]; then\n RESPONSE=$(curl -sk \"${OMADA_URL}/api/info\")\n ERROR_CODE=$(echo \"$RESPONSE\" | jq -r '.errorCode')\n if [[ \"$ERROR_CODE\" != \"0\" ]]; then\n echo \"Error: Cannot reach controller at ${OMADA_URL}\" >&2\n exit 1\n fi\n OMADAC_ID=$(echo \"$RESPONSE\" | jq -r '.result.omadacId')\n echo \"Controller reachable at ${OMADA_URL}\"\n echo \"Controller ID: ${OMADAC_ID}\"\n echo \"Controller name: $(echo \"$RESPONSE\" | jq -r '.result.controllerName // \"N/A\"')\"\n exit 0\nfi\n\n# --- Parse arguments ---\n\nMETHOD=\"${1:?Usage: omada-api.sh \u003cMETHOD> \u003cPATH> [JSON_BODY] [--raw]}\"\nAPI_PATH=\"${2:?Usage: omada-api.sh \u003cMETHOD> \u003cPATH> [JSON_BODY] [--raw]}\"\nBODY=\"\"\nRAW=false\nJQ_FILTER=\".\"\n\n# Parse optional flags and body from remaining args\nshift 2\nwhile [[ $# -gt 0 ]]; do\n case \"$1\" in\n --raw) RAW=true; shift ;;\n --jq) JQ_FILTER=\"${2:?--jq requires a filter argument}\"; shift 2 ;;\n *) [[ -z \"$BODY\" ]] && BODY=\"$1\"; shift ;;\n esac\ndone\n\n# --- Authenticate ---\n\nOMADAC_ID=$(curl -sk \"${OMADA_URL}/api/info\" | jq -r '.result.omadacId')\nif [[ -z \"$OMADAC_ID\" || \"$OMADAC_ID\" == \"null\" ]]; then\n echo \"Error: Failed to get omadacId from ${OMADA_URL}/api/info\" >&2\n exit 1\nfi\n\nTOKEN_RESPONSE=$(curl -sk -X POST \\\n \"${OMADA_URL}/openapi/authorize/token?grant_type=client_credentials\" \\\n -H \"Content-Type: application/json\" \\\n -d \"{\\\"omadacId\\\":\\\"${OMADAC_ID}\\\",\\\"client_id\\\":\\\"${OMADA_CLIENT}\\\",\\\"client_secret\\\":\\\"${OMADA_SECRET}\\\"}\")\n\nERROR_CODE=$(echo \"$TOKEN_RESPONSE\" | jq -r '.errorCode')\nif [[ \"$ERROR_CODE\" != \"0\" ]]; then\n echo \"Error: Auth failed — $(echo \"$TOKEN_RESPONSE\" | jq -r '.msg')\" >&2\n exit 1\nfi\n\nACCESS_TOKEN=$(echo \"$TOKEN_RESPONSE\" | jq -r '.result.accessToken')\n\n# --- Build URL ---\n\n# /v3/api-docs is a special case — no auth prefix\nif [[ \"$API_PATH\" == /v3/* ]]; then\n FULL_URL=\"${OMADA_URL}${API_PATH}\"\n# /v2 endpoints use /openapi/v2/{omadacId}\nelif [[ \"$API_PATH\" == /v2/* ]]; then\n FULL_URL=\"${OMADA_URL}/openapi/v2/${OMADAC_ID}${API_PATH#/v2}\"\n# Everything else uses /openapi/v1/{omadacId}\nelse\n FULL_URL=\"${OMADA_URL}/openapi/v1/${OMADAC_ID}${API_PATH}\"\nfi\n\n# --- Make request ---\n\nCURL_ARGS=(-sk -X \"$METHOD\" -H \"Authorization: AccessToken=${ACCESS_TOKEN}\")\n\nif [[ -n \"$BODY\" ]]; then\n CURL_ARGS+=(-H \"Content-Type: application/json\" -d \"$BODY\")\nfi\n\nRESPONSE=$(curl \"${CURL_ARGS[@]}\" \"$FULL_URL\")\n\nif [[ \"$JQ_FILTER\" != \".\" ]]; then\n echo \"$RESPONSE\" | jq \"$JQ_FILTER\"\nelif [[ \"$RAW\" == true ]]; then\n echo \"$RESPONSE\"\nelse\n echo \"$RESPONSE\" | jq .\nfi\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":3977,"content_sha256":"370e23031c29e876e9af116350257e11594d97c865a2db9fd326f3b7b3b81e6a"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Omada SDN Controller API","type":"text"}]},{"type":"paragraph","content":[{"text":"Manage TP-Link Omada SDN Controllers via the Open API (OpenAPI 3.0.1).","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Compatibility","type":"text"}]},{"type":"paragraph","content":[{"text":"The Open API is available in ","type":"text"},{"text":"Omada SDN Controller v5.9 and later","type":"text","marks":[{"type":"strong"}]},{"text":" (both the Software Controller and Cloud-Based Controller). Earlier versions only have an undocumented internal API that uses cookie-based session auth — this skill does not cover that legacy API.","type":"text"}]},{"type":"paragraph","content":[{"text":"The Open API feature must be explicitly enabled by an administrator before use.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Environment Setup","type":"text"}]},{"type":"paragraph","content":[{"text":"Before making any API calls, you need three environment variables. If the user has not provided these or a ","type":"text"},{"text":".env","type":"text","marks":[{"type":"code_inline"}]},{"text":" file does not exist, walk them through the setup:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Find the controller URL","type":"text","marks":[{"type":"strong"}]},{"text":" — Ask the user for their Omada Controller address. This is typically ","type":"text"},{"text":"https://\u003chost>:8043","type":"text","marks":[{"type":"code_inline"}]},{"text":" for the Software Controller. The port may differ if customized during installation.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Create API credentials","type":"text","marks":[{"type":"strong"}]},{"text":" — Guide the user to:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Log into the Omada Controller web UI","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Navigate to ","type":"text"},{"text":"Global View > Settings > Platform Integration > Open API","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Click ","type":"text"},{"text":"Add New App","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Set the type to ","type":"text"},{"text":"Client","type":"text","marks":[{"type":"strong"}]},{"text":" (not Gateway)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Copy the generated ","type":"text"},{"text":"Client ID","type":"text","marks":[{"type":"strong"}]},{"text":" and ","type":"text"},{"text":"Client Secret","type":"text","marks":[{"type":"strong"}]}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Create the ","type":"text","marks":[{"type":"strong"}]},{"text":".env","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" file","type":"text","marks":[{"type":"strong"}]},{"text":" — Have the user create a ","type":"text"},{"text":".env","type":"text","marks":[{"type":"code_inline"}]},{"text":" file in the project root:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"OMADA_URL=https://omada.example.com:8043\nOMADA_CLIENT=your-client-id\nOMADA_SECRET=your-client-secret","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Never commit ","type":"text","marks":[{"type":"strong"}]},{"text":".env","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" to git.","type":"text","marks":[{"type":"strong"}]},{"text":" Ensure ","type":"text"},{"text":".gitignore","type":"text","marks":[{"type":"code_inline"}]},{"text":" includes it.","type":"text"}]},{"type":"paragraph","content":[{"text":"Load variables before making requests:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"export $(grep -v '^#' .env | xargs)","type":"text"}]},{"type":"paragraph","content":[{"text":"Do NOT use ","type":"text"},{"text":"source .env","type":"text","marks":[{"type":"code_inline"}]},{"text":" — variables won't propagate to subshells or curl.","type":"text"}]},{"type":"paragraph","content":[{"text":"If auth fails, common causes are:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The Open API feature is not enabled on the controller","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The client app type is set to Gateway instead of Client","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The controller URL is wrong or missing the port","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The client secret was rotated in the UI but not updated in ","type":"text"},{"text":".env","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Locating the Wrapper Script","type":"text"}]},{"type":"paragraph","content":[{"text":"The API wrapper script is at ","type":"text"},{"text":"scripts/omada-api.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":" relative to this skill's directory. On first use in a session, find the script path using Glob to search for ","type":"text"},{"text":"**/omada-controller/scripts/omada-api.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":". Use the discovered absolute path for all subsequent calls. For example, if the skill is installed at ","type":"text"},{"text":".claude/skills/omada-controller/","type":"text","marks":[{"type":"code_inline"}]},{"text":", the script path is ","type":"text"},{"text":".claude/skills/omada-controller/scripts/omada-api.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Making API Calls","type":"text"}]},{"type":"paragraph","content":[{"text":"Always use the wrapper script","type":"text","marks":[{"type":"strong"}]},{"text":" for all Omada API calls. It handles env loading, authentication, and URL construction automatically.","type":"text"}]},{"type":"paragraph","content":[{"text":"Anti-patterns:","type":"text","marks":[{"type":"strong"}]},{"text":" Any command beyond ","type":"text"},{"text":"bash \u003cscript> ...","type":"text","marks":[{"type":"code_inline"}]},{"text":" triggers extra permission prompts. NEVER pipe, chain, or post-process script output with other commands. Use ","type":"text"},{"text":"--jq FILTER","type":"text","marks":[{"type":"code_inline"}]},{"text":" for filtering and read the JSON output yourself for anything else. NEVER use curl, prefix assignments, or shell variables. Common anti-patterns:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"bash \u003cscript> ... | jq ...","type":"text","marks":[{"type":"code_inline"}]},{"text":" — use ","type":"text"},{"text":"--jq FILTER","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag instead","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"bash \u003cscript> ... | python3 -c \"...\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" — use ","type":"text"},{"text":"--jq","type":"text","marks":[{"type":"code_inline"}]},{"text":" or read the output yourself","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"cat saved-response.txt | python3 -c \"...\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" — read the JSON yourself, do not shell out","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"curl -sk \"${OMADA_URL}/api/info\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" — use the script, not curl","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"SITE=\"123\" && bash \u003cscript> ...","type":"text","marks":[{"type":"code_inline"}]},{"text":" — inline the value directly in the path","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"SITE=\"123\"; for mac in ...","type":"text","marks":[{"type":"code_inline"}]},{"text":" — no shell variables or loops","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"On first use in a session","type":"text","marks":[{"type":"strong"}]},{"text":", run the health check with no arguments. This verifies connectivity and lets the user approve the script once for all subsequent calls:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash \u003cscript>","type":"text"}]},{"type":"paragraph","content":[{"text":"Then make API calls:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash \u003cscript> \u003cMETHOD> \u003cPATH> [JSON_BODY] [--raw] [--jq FILTER]","type":"text"}]},{"type":"paragraph","content":[{"text":"The path is relative to ","type":"text"},{"text":"/openapi/v1/{omadacId}","type":"text","marks":[{"type":"code_inline"}]},{"text":" — no need to construct full URLs or manage tokens.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Examples","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# List sites\nbash \u003cscript> GET \"/sites?page=1&pageSize=100\"\n\n# List devices at a site\nbash \u003cscript> GET \"/sites/{siteId}/devices?page=1&pageSize=100\"\n\n# Reboot a device\nbash \u003cscript> POST /sites/{siteId}/cmd/devices/reboot '{\"deviceMacs\":[\"AA-BB-CC-DD-EE-FF\"]}'\n\n# v2 endpoints — prefix path with /v2\nbash \u003cscript> GET /v2/sites/{siteId}/setting/firewall/rules\n\n# Fetch the OpenAPI spec for endpoint discovery\nbash \u003cscript> GET /v3/api-docs --raw\n\n# Filter API paths by keyword (use --jq, NEVER pipe)\nbash \u003cscript> GET /v3/api-docs --raw --jq '[.paths | keys[] | select(test(\"port\"; \"i\"))]'\n\n# Extract just the data array from a paginated response\nbash \u003cscript> GET \"/sites/{siteId}/clients?page=1&pageSize=100\" --jq '.result.data'","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Path Routing","type":"text"}]},{"type":"paragraph","content":[{"text":"The script routes paths automatically:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/sites/...","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"/openapi/v1/{omadacId}/sites/...","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/v2/sites/...","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"/openapi/v2/{omadacId}/sites/...","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"/v3/api-docs","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"{OMADA_URL}/v3/api-docs","type":"text","marks":[{"type":"code_inline"}]},{"text":" (no auth prefix)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Recommended Permission","type":"text"}]},{"type":"paragraph","content":[{"text":"Users should add this to their Claude Code settings to allow the script without repeated prompts:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"Bash(bash *omada-api.sh *)","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"API Discovery","type":"text"}]},{"type":"paragraph","content":[{"text":"The controller hosts its own full OpenAPI 3.0.1 spec (~1,507 endpoints). Use it to discover any endpoint at runtime rather than hard-coding paths.","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Swagger UI","type":"text","marks":[{"type":"strong"}]},{"text":" (browser): ","type":"text"},{"text":"{OMADA_URL}/swagger-ui/index.html","type":"text","marks":[{"type":"code_inline"}]},{"text":" — no auth required","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"OpenAPI spec","type":"text","marks":[{"type":"strong"}]},{"text":" (JSON):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash \u003cscript> GET /v3/api-docs --raw --jq '.paths | keys[]'","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Common Patterns","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Site ID","type":"text"}]},{"type":"paragraph","content":[{"text":"Most endpoints are site-scoped. Get the site ID first:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash \u003cscript> GET \"/sites?page=1&pageSize=100\"","type":"text"}]},{"type":"paragraph","content":[{"text":"Then use it in subsequent paths: ","type":"text"},{"text":"/sites/{siteId}/devices","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"/sites/{siteId}/clients","type":"text","marks":[{"type":"code_inline"}]},{"text":", etc.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Pagination","type":"text"}]},{"type":"paragraph","content":[{"text":"Paginated endpoints accept ","type":"text"},{"text":"page","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"pageSize","type":"text","marks":[{"type":"code_inline"}]},{"text":" query parameters and return:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"json"},"content":[{"text":"{\n \"errorCode\": 0,\n \"result\": {\n \"totalRows\": 7,\n \"currentPage\": 1,\n \"currentSize\": 100,\n \"data\": [...]\n }\n}","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"API Versions","type":"text"}]},{"type":"paragraph","content":[{"text":"Some endpoints use ","type":"text"},{"text":"/v2/","type":"text","marks":[{"type":"code_inline"}]},{"text":" instead of the default ","type":"text"},{"text":"/v1/","type":"text","marks":[{"type":"code_inline"}]},{"text":". The swagger spec includes both — prefix the path with ","type":"text"},{"text":"/v2","type":"text","marks":[{"type":"code_inline"}]},{"text":" when needed.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Authentication Details","type":"text"}]},{"type":"paragraph","content":[{"text":"The wrapper script handles auth automatically, but for reference:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Controller ID","type":"text","marks":[{"type":"strong"}]},{"text":": Fetched from ","type":"text"},{"text":"GET {OMADA_URL}/api/info","type":"text","marks":[{"type":"code_inline"}]},{"text":" (outside the OpenAPI spec)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Token","type":"text","marks":[{"type":"strong"}]},{"text":": OAuth2 client credentials via ","type":"text"},{"text":"POST {OMADA_URL}/openapi/authorize/token?grant_type=client_credentials","type":"text","marks":[{"type":"code_inline"}]},{"text":" with ","type":"text"},{"text":"omadacId","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"client_id","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"client_secret","type":"text","marks":[{"type":"code_inline"}]},{"text":" in the JSON body (","type":"text"},{"text":"grant_type","type":"text","marks":[{"type":"code_inline"}]},{"text":" is a query param, not body)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Header format","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"Authorization: AccessToken=\u003ctoken>","type":"text","marks":[{"type":"code_inline"}]},{"text":" (NOT ","type":"text"},{"text":"Bearer","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Expiry","type":"text","marks":[{"type":"strong"}]},{"text":": Tokens last 2 hours (7200 seconds) — the script re-authenticates each call","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Gotchas","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Quoting","type":"text","marks":[{"type":"strong"}]},{"text":": Always quote paths containing ","type":"text"},{"text":"&","type":"text","marks":[{"type":"code_inline"}]},{"text":" (e.g., ","type":"text"},{"text":"\"/sites?page=1&pageSize=100\"","type":"text","marks":[{"type":"code_inline"}]},{"text":"). Unquoted ","type":"text"},{"text":"&","type":"text","marks":[{"type":"code_inline"}]},{"text":" is a shell background operator.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"TLS","type":"text","marks":[{"type":"strong"}]},{"text":": The controller typically uses a self-signed cert. Always use ","type":"text"},{"text":"curl -k","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"MAC format","type":"text","marks":[{"type":"strong"}]},{"text":": The API uses ","type":"text"},{"text":"AA-BB-CC-DD-EE-FF","type":"text","marks":[{"type":"code_inline"}]},{"text":" (uppercase, dashes).","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Error handling","type":"text","marks":[{"type":"strong"}]},{"text":": Always check ","type":"text"},{"text":"errorCode","type":"text","marks":[{"type":"code_inline"}]},{"text":" in responses. ","type":"text"},{"text":"0","type":"text","marks":[{"type":"code_inline"}]},{"text":" = success, negative = error.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Token header","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"Authorization: AccessToken=\u003ctoken>","type":"text","marks":[{"type":"code_inline"}]},{"text":", NOT ","type":"text"},{"text":"Bearer \u003ctoken>","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"References","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"scripts/omada-api.sh","type":"text","marks":[{"type":"link","attrs":{"href":"scripts/omada-api.sh","title":null}}]},{"text":" — API wrapper (handles env, auth, and requests)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/api-categories.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/api-categories.md","title":null}}]},{"text":" — API endpoint categories and counts","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/external-resources.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/external-resources.md","title":null}}]},{"text":" — Links to docs, examples, and integrations","type":"text"}]}]}]}]},"metadata":{"date":"2026-11-02","name":"omada-controller","author":"@skillopedia","source":{"stars":5,"repo_name":"omada-controller-skill","origin_url":"https://github.com/jakeasmith/omada-controller-skill/blob/HEAD/skills/omada-controller/SKILL.md","repo_owner":"jakeasmith","body_sha256":"de60bbb5a78926513bd3bd35d51990673c6cf098d2300d9285a99d5ae3a3f898","cluster_key":"00bd74856ef823c0c2b845bf2416ff0538d1149fb6fa74b3d5e0e38d0dfa26b3","clean_bundle":{"format":"clean-skill-bundle-v1","source":"jakeasmith/omada-controller-skill/skills/omada-controller/SKILL.md","text_bytes":6610,"source_commit":"750b85530f9adbfd57ab80358b046abf4b96bc3c","skills_sh_rank":14168,"attachment_count":3,"text_attachments":3,"attachment_storage":"skill_attachments","binary_attachments":0},"cluster_size":1,"skill_md_path":"skills/omada-controller/SKILL.md","import_metadata":{"date":"2026-11-02","author":"@skillopedia","version":"v1","category":"integrations-apis","category_label":"Integrations"},"exact_dupes_collapsed_into_this":0},"license":"MIT","version":"v1","category":"integrations-apis","metadata":{"author":"jakeasmith","version":"1.9"},"import_tag":"skills-sh-top20k-2026-11","description":"Interact with TP-Link Omada SDN Controller Open API. Use when querying or managing Omada network devices, clients, sites, access points, switches, gateways, VLANs, firewall rules, VPNs, or any Omada controller configuration. Also use when the user mentions Omada, SDN controller, or needs to authenticate against the Omada API.","compatibility":"Requires curl and network access to an Omada SDN Controller. The controller must have Open API enabled with client credentials configured."}},"renderedAt":1793671375494}

Omada SDN Controller API Manage TP-Link Omada SDN Controllers via the Open API (OpenAPI 3.0.1). Compatibility The Open API is available in Omada SDN Controller v5.9 and later (both the Software Controller and Cloud-Based Controller). Earlier versions only have an undocumented internal API that uses cookie-based session auth — this skill does not cover that legacy API. The Open API feature must be explicitly enabled by an administrator before use. Environment Setup Before making any API calls, you need three environment variables. If the user has not provided these or a file does not exist, wa…