nginx-proxy-manager
nginx-proxy-manager copied to clipboard
API Support
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like A way to create API tokens that are perm. I have been making a js API for nginx proxy manager. Its all going good and works but having to use the user token that resets every 24 - 48hours.
Describe alternatives you've considered None at the moment. Token automatically resets every 24 - 48hours. Only way i can see around this for now is to automatically login and fetch the new token
You can api post the logins to get a new token, if you post {secret and identity} to ...api/tokens it'll return a new token
I added it as part of my script
BUT api keys would be cool too
Do anyone have an example on this matter/issue ? Like lets say i have the npm running locally on my machine and just then i wanna make a local call to the npm to change a proxy and stuff.
Do anyone have an example on this matter/issue ? Like lets say i have the npm running locally on my machine and just then i wanna make a local call to the npm to change a proxy and stuff.
Not sure if you're monitoring this issue still, but I'd be happy to show you how the API can be used. I'm working on expanding the documentation on it, since the developer hasn't responded to the multiple issue requests for API documentation.
I'm not a web developer, however, so it may be a slow venture..
Do anyone have an example on this matter/issue ? Like lets say i have the npm running locally on my machine and just then i wanna make a local call to the npm to change a proxy and stuff.
Not sure if you're monitoring this issue still, but I'd be happy to show you how the API can be used. I'm working on expanding the documentation on it, since the developer hasn't responded to the multiple issue requests for API documentation.
I'm not a web developer, however, so it may be a slow venture..
Thats great! if you started something you can share it with the contributors...
I did manage to get this working. but API tokens are temp. so i must fetch a new one every x hours to make sure it stays updated. Would be nice to have a perm API key that could be generated once logged in, maybe under the user section. I'd be happy helping with API Docs too. as iv played a ton with NPM and know a lot about how to use the API :)
Do anyone have an example on this matter/issue ? Like lets say i have the npm running locally on my machine and just then i wanna make a local call to the npm to change a proxy and stuff.
Not sure if you're monitoring this issue still, but I'd be happy to show you how the API can be used. I'm working on expanding the documentation on it, since the developer hasn't responded to the multiple issue requests for API documentation. I'm not a web developer, however, so it may be a slow venture..
Thats great! if you started something you can share it with the contributors...
I've never submitted a PR, so I may do that, but the gist of it is this (I use ThunderClient within Visual Studio Code instead of Postman). At this point, really what I've discovered is just:
- Using basic auth, send a GET to <npm server IP>/api/tokens to get a Bearer Auth token
- Using the token in the next request, perform whatever commands you want to do
Unfortunately, not all functions are documented - for instance, once you click on a host and want to, say, modify some advanced settings, I don't see anywhere in the API docs where that endpoint is exposed. If I find time, I may end up reading through the source code and figuring it out myself, but I see the author (@jc21) is still active/contributing to other projects. Perhaps they can chime in and help us along in this endeavour?
any update?
any update?
Assuming this is directed at me - afraid not, life got in the way as it always does :) No promises to make here - maybe one day myself or someone else will get around to documenting it. Hopefully the author of the program does it before the community does!
Issue is now considered stale. If you want to keep it open, please comment :+1: