Hi, I don't know about the REST API but a few years ago for some obscure reason I needed to move a whole bunch of layer definitions from one workspace (id) to another. Cooked a quick python script for that ( https://gist.github.com/tkardi/97ef9bc6b0cde411bfb85feccdb9b7ed). It will not suite your exact needs but most probably as a general idea it would still hold.
The very fine print in bold letters: Do pay attention: this approach is an absolutely sure way of messing up the whole datastore - that is basically breaking all your geoserver services. So caution is advised (and a backup of your data dir). The REST API solution would be the correct solution here but if all else fails and you feel like walking on the edge then ... :) All the best, (and sorry for the bad advice) Tõnis -- @tkardi Kontakt Bar-On, Itay (<itay.ba...@vlaardingen.nl>) kirjutas kuupäeval E, 3. juuni 2019 kell 14:37: > Hi there, > > > > I am currently searchning for a way to update ca. 280 layers with new > keywords. The reason I would like to do this is to be able to harvest the > getcapabilities documents of the services and set up a services catalog. > > > > After googling it for a while and searching the users group the only post > that comes anywhere near is from 2011: > > > http://osgeo-org.1560.x6.nabble.com/automating-layer-metadata-update-td3790274.html > > > > Naturally the obvious choice would be to use the REST API to update the > layer using the /layers/{layerName} endpoint with a POST, but I am not sure > if this is possible for keywords. > > > > Does anybody have any experiance with this endpoint ? and can share some > wisdom on how to update layers keywords via the REST API (if at all > possible…) > > > > If the REST API endpoint is not a possibility is there maybe another way I > can do it programmatically? > > > > Thanks in advance > > > > > > Met vriendelijke groet, > > Itay Bar-On > *Geo Informatie Specialist* > > [image: Gemeente Vlaardingen] > > *Informatie en Facilitaire Voorzieningen* > Westnieuwland 6, 3131VX Vlaardingen, Nederland > > *T* 06 10173309 > *E *itay.ba...@vlaardingen.nl > *W *www.vlaardingen.nl > > > > De gemeente Vlaardingen stuurt privacygevoelige e-mail berichten via een > beveiligde verbinding van KPN Zorg Messenger. Meer informatie vindt u op > www.vlaardingen.nl/veiligmailen. > _______________________________________________ > 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 >
_______________________________________________ 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