Open charlie-haley opened 11 months ago
When migrating to using the official API integration, we should document which versions of the exporter are supported. (e.g exporter v0.11.0 needs controller version v5.12+)
This would be nice to have. I tried making a client with the OpenAPI schema (http://omada/v3/api-docs/All) using openapi-generator and the results are a bit mixed.
It's possible to autogenerate a Go client, but there are some issues:
For 1 and 2 there are relatively straightforward workarounds, but 3 might be the biggest problem. Making one request every 15 seconds already means 5760 requests per day. Maybe I missed a setting to increase or remove this limit, but otherwise you'd need to create multiple "applications" to bypass the limit. And yes the API call limit is enforced unfortunately:
{"errorCode":-7132,"msg":"Our server is receiving too many requests now. Please try again later."}
There's some talk around the limits here https://community.tp-link.com/en/business/forum/topic/623376?replyId=1256526
this limitation will be removed in Controller 5.13
, I wonder if this means the API calls/day limit will be lifted?
So, I also attempted to generate from the Open API schema and a lot of the spec was wrong/invalid. I pulled the JSON down and fixed all the errors, it still doesn't solve the API request limit but it at least generates a Go package
Discussed in https://github.com/charlie-haley/omada_exporter/discussions/80