Use REST API for configure proxy host #3265
Replies: 7 comments 7 replies
-
Hey, I have been investigating solutions for adding custom domain functionality to my hobby project app and came across the possibility of using NGINX Proxy Manager for this purpose. Since I've been using proxy manager for years and already was using it to forward the main domain I thought I'd take a closer look. Basically, it seems like even though there is an API available for use it is undocumented. Essentially, after a bit of tinkering and feeding the schemas from https://github.com/NginxProxyManager/nginx-proxy-manager/tree/develop/backend/schema to chatGPT, I was able to get a basic integration between the backend of my app and a running instance of the Proxy Manager. I also used Insomnia to learn about how to interact with the API through POST and GET requests. Essentially, you will need to submit {"identity": "[email protected]", "secret": "yoUrPassWord1!"} to http://nginxaddress:PORT/api/tokens . That will return a Bearer token. If you are in insomnia, you can insert this token via the Auth > bearer token tab. If you're writing a node app like I am you might need to use Axios to first post to get the bearer token, and then another post to actually create a new proxy host. Hope this helps you get started. Would love to hear how other people are approaching integrating NGINX Proxy Manager into their apps, and whether or not it seems like a good solution at higher scale. |
Beta Was this translation helpful? Give feedback.
-
There's an OpenApi available |
Beta Was this translation helpful? Give feedback.
-
FYI you can create a token that will last as long as you want, (so you dont have to keep using you actually password) |
Beta Was this translation helpful? Give feedback.
-
How can you do that ? |
Beta Was this translation helpful? Give feedback.
-
I'd like to know too since I'm writing a tool using this API lol |
Beta Was this translation helpful? Give feedback.
-
i have done a bash script for that ;) Verify and manage token validation and also managing NPM settings via API https://github.com/Erreur32/nginx-proxy-manager-API Let me know ;) |
Beta Was this translation helpful? Give feedback.
-
Thanks @kmanwar89 . Your idea is good to have a file locally ;) Good luck |
Beta Was this translation helpful? Give feedback.
-
How it use REST API for configure proxy host. Can it possible?
Beta Was this translation helpful? Give feedback.
All reactions