or event better if you're willing or can use a scripting language like PHP you could check this examples https://geoserver.geo-solutions.it/edu/fr/rest/php_rest_examples.html
This way you could call the php script from javascript (ajax/XMLHttpRequest) not worrying about hiding the GS authentication details, and parse the XML response... in your case you're looking for the key value of: *<datastore><connectionParameters><entry key="url"><value></entry>* in the response xml Vitor Fonseca <vfonse...@gmail.com> escreveu no dia quinta, 23/01/2020 à(s) 12:44: > I would use the rest API. > > doesn't refer javascript but you could start here > > https://docs.geoserver.org/stable/en/user/rest/stores.html#listing-store-details > > to access geoserver rest API you will also need to deal with > authentication in client side (maybe using ajax/XMLHttpRequest) > > then you could fetch the store details rest endpoint > e.g. > http://localhost:8080/geoserver/rest/workspaces/acme/datastores/roads.xml > > and parse the response with a xml parser to find what you're looking for > > Vikram <vikram.es...@fleetroute.com> escreveu no dia quinta, 23/01/2020 > à(s) 12:26: > >> Hi all, >> >> is there a way to get the connection parameters for ex, the location of >> a shapefile of a data store in Geoserver ? >> >> I want to get this through a URL request from a client (javascript >> preferably. if not, Java). >> >> Regards, >> >> Vikram >> >> >> >> _______________________________________________ >> Geoserver-users mailing list >> >> Please make sure you read the following two resources before posting to >> this list: >> - Earning your support instead of buying it, but Ian Turton: >> http://www.ianturton.com/talks/foss4g.html#/ >> - The GeoServer user list posting guidelines: >> http://geoserver.org/comm/userlist-guidelines.html >> >> If you want to request a feature or an improvement, also see this: >> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer >> >> >> Geoserver-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > > > -- > > www.vfonsecaz.pt > > -- www.vfonsecaz.pt
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users