Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API URL for UDM Pro? #132

Closed
alisonjenkins opened this issue Apr 2, 2021 · 7 comments
Closed

API URL for UDM Pro? #132

alisonjenkins opened this issue Apr 2, 2021 · 7 comments

Comments

@alisonjenkins
Copy link
Contributor

Hey @paultyng ,

I am currently trying to get started using this provider but have been unable to figure out what the API URL should be set to for the UDM Pro.

I have tried a few iterations of:

UNIFI_API=https://192.168.1.1/
UNIFI_API=https://192.168.1.1/network/default

But had no success receiving errors such as:

panic: client not initialized: (499 unknown) for POST https://192.168.1.1/api/auth/login

Could you give me a hint of what the API URL should be set to? This also might be good to add to the Terraform documentation and the go-sdk docs to save anyone else asking in the future.

Thanks,

Alan Jenkins

@alisonjenkins
Copy link
Contributor Author

I realised that the web interface of the UDM control panel might be using the API so used Inspector's network requests to find out the URL. For UDM the API URL needs to be set to 'https:///proxy'.

I will submit a PR to get this added to the api_url's documentation.

@alisonjenkins
Copy link
Contributor Author

Opened PR #133 for adding an example of what the UDM's API URL should be. Not sure what the URL needs to be for standard UNMS but if you can give me an example I will get that added in too.

@paultyng
Copy link
Owner

paultyng commented Apr 5, 2021

Thanks for the PR, I do not have a UDM-Pro just the standard UDM so hard for me to figure this out without a hand!

For the UDM, cloud key, and docker controllers it should be just the root of / and I'd prefer the SDK just detect this appropriately, so I opened an issue over there to track that fix also.

@alisonjenkins
Copy link
Contributor Author

Hey @paultyng, FYI I have reworked the PR to include an example for the other types of controllers.

@alisonjenkins
Copy link
Contributor Author

Also if you want someone to test UDM Pro related changes poke me.

@chrishas35
Copy link
Contributor

I know we've gone through a few changes related to UnifiOS/UDMP support, but I do not need the /proxy path on my api_url using v 0.26.0 against a UMDP running firmware 1.8.6 and Network 6.0.43.

@joshuaspence
Copy link
Collaborator

I don't think this is valid anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants