API - make the local environment available by default #911
Replies: 3 comments 4 replies
-
|
Oh and also the ability to rename the local environment to something other than "Local Docker" |
Beta Was this translation helpful? Give feedback.
-
|
The local environment is ID 0 , there's technically no API support yet, but eventually I can maybe add it. I guess I'm curious why you want to use the API to change stuff vs just use the UI ? Maybe I'm confused. And you can now rename the local one in 1.9.0. |
Beta Was this translation helpful? Give feedback.
-
|
I finally got aorund to the API stuff, its merged into the main branch now, and available via the |
Beta Was this translation helpful? Give feedback.






Uh oh!
There was an error while loading. Please reload this page.
-
Firstly - there's no API docs so forgive me if anything I put here is misinformed.
I love this project and I feel it will replace the dreaded portainer for me.
However, it doesn't have the ability to use the API to modify the local environment that I can tell (i.e. the environment the non-headless container accesses through the socket binding). You can currently manage remote environments through the api via /api/environments/uuid/dostuffhere but not the local environment itself.
I've resorted to running the main container and an additional agent container on the same machine. I don't use the agent when I'm in the UI because I have the main container, its only for modifying the "local" environment over the API.
I don't feel I should have to do this...
I feel like you can keep the remote environments on their UUID but perhaps make the local environment available on /api/environments/local or something.
Of course, you then need some machine-to-machine auth like a known API key... this is fine for the remote envs of course, since you can use the agent bootstrap token, but the local environment never needed such a token... so you would need to implement generating API keys for users or even an app-wide admin key...
Give it some thought, thats all I ask.
Beta Was this translation helpful? Give feedback.
All reactions