pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

Allow adding/updating/removing servers via RESTful API (RM #5796)

Open dpage opened this issue 5 years ago • 4 comments

Issue migrated from Redmine: https://redmine.postgresql.org/issues/5796 Originally created by Stephan Austermühle at 2020-09-01 17:45:42 UTC.

Please consider adding a RESTful interface to pgAdmin that allows the addition, removal, and updating of Postgres server connections.

While there is a way to import/export servers and provide password files, this is a hard way when running pgAdmin in a Kubernetes cluster orchestrated and managed by Ansible. Shelling into the container and copying data into the container is not really considered best practice. REST calls would make it easy to maintain the server connections from CI/CD pipelines, too.

dpage avatar Sep 01 '20 17:09 dpage

Comment migrated from Redmine: https://redmine.postgresql.org/issues/5796#note-1 Originally created by Dave Page at 2020-09-02 08:10:17 UTC.

No objection to adding RESTful (well, technically they'd be REST-like I suspect) APIs for this.

However, the container will automatically load server definitions when it's instantiated, and they can be stored on a mapped file on the host. See the /pgadmin4/servers.json entry in https://www.pgadmin.org/docs/pgadmin4/4.25/container_deployment.html#mapped-files-and-directories. Maybe that will make things easier for you in the meantime?

dpage avatar Sep 02 '20 08:09 dpage

Comment migrated from Redmine: https://redmine.postgresql.org/issues/5796#note-2 Originally created by Stephan Austermühle at 2020-09-02 10:09:05 UTC.

I've already reviewed /pgadmin4/servers.json but that is really of limited used in a highly dynamic environment where database instances come and go.

And, well, yes, I had REST-like in my mind.

dpage avatar Sep 02 '20 10:09 dpage

Comment migrated from Redmine: https://redmine.postgresql.org/issues/5796#note-3 Originally created by Pradip Parkale at 2020-09-11 10:46:52 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed Ready

dpage avatar Sep 11 '20 10:09 dpage

This would be a very useful feature to have.

sumanthkumarc avatar May 03 '24 11:05 sumanthkumarc