Hi, the documentation for that operation seems a bit off, I open an issue for this: https://github.com/GeoWebCache/geowebcache/issues/785 As far I can tell this is the correct way of truncating a layer via GWC REST API: curl -v -u admin:geoserver --request POST \ --url http://localhost:8080/geoserver/gwc/rest/masstruncate \ --header 'content-type: text/xml' \ --data '<truncateLayer><layerName>BASE:LAND</layerName></truncateLayer>' Anyway, to avoid the error you are getting you need to explicitly use text\xml for the content type. Hope it helps, Nuno Oliveira On Thu, 2019-08-08 at 19:48 +0300, Artem Groznykh wrote: > Hi. > > I tried to truncate cache for a layer and to create seeding tasks for > a layer (GeoServer 2.15.2 on Windows 7). And I have errors > > > 1. Truncate (via /masstruncate) > > Request: > > POST - http://localhost:8080/geoserver/gwc/rest/masstruncate?requestT > ype=truncateLayer&layer=workspace_name:layergroup_name > > Response: > > org.geowebcache.rest.exception.RestException 400 BAD_REQUEST: Format > extension unknown or not specified: application/json > > What does it mean? > In documentation there are no other params > > > 2. Seed > > Request: > > GET - http://localhost:8080/geoserver/gwc/rest/seed/workspace_name:la > yergroup_name.json > > Headers: > {"Content-Type": "application/json"} > Body: > { > "name": "workspace_name:layergroup_name", > "bounds": { > "coords": {"minX":-111319.49079327358,"minY":- > 111325.14286638453,"maxX":11339882.520180937,"maxY":8245444.279401028 > 5} > }, > "gridSetId": "EPSG:900913", > "zoomStart": 5, > "zoomStop": 9, > "type": "seed", > "tileFormat": "image/png8", > "threadCount": 4, > "parameters": { > "entry": {} > } > } > > Response: > > Chunk [{"name": > "workspace_name:layergroup_name","bounds":{"coords":{"minX":- > 111319.49079327358,"minY":- > 111325.14286638453,"maxX":11339882.520180937,"maxY":8245444.279401028 > 5}},"gridSetId":"EPSG:900913","zoomStart":5,"zoomStop":9,"type":"trun > cate","threadCount":2,"format":"image/png8","parameters":{"entry":{}} > }] is not a valid entry > > So, what is the valid entry? > I tried to remove "bounds" and "parameters", change "gridSetId" to > 900913, even to post XML body - nothing changed > > > Any suggestions? > > Thanks in advance > > Без вирусов. www.avast.ru > _______________________________________________ > 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://w > ww.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: http://geoserver.org/co > mm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: ht > tps://github.com/geoserver/geoserver/wiki/Successfully-requesting- > and-integrating-new-features-and-improvements-in-GeoServer > > > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Regards, Nuno Oliveira == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. ==
Nuno Miguel Carvalho Oliveira @nmcoliveira Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.
_______________________________________________ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
