Thanks, I did eventually find a POST example in the OGC documentation but at least one link to their site seemed to be broken in the documentation and it did add a bit more complexity to the work I was doing as I was issuing the request from FME and POST is more difficult to achieve than GET but there you go.
I would be useful if there was a POST example on the main documentation and here is an example of the post body I used in case it is helpful for others: <?xml version="1.0" encoding="UTF-8"?> <GetRecords service="CSW" version="2.0.2" maxRecords="2000" startPosition="1" resultType="results" outputFormat="application/xml" outputSchema="http://www.opengis.net/cat/csw/2.0.2" xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 ../../../csw/2.0.2/CSW-discovery.xsd"> <Query typeNames="csw:Record"> <ElementSetName typeNames="csw:Record">full</ElementSetName> <Constraint version="1.1.0"> <ogc:Filter> <ogc:PropertyIsLike wildCard="%" singleChar="_" escapeChar="\"> <ogc:PropertyName>dc:subject</ogc:PropertyName> <ogc:Literal>%QGIS%</ogc:Literal> </ogc:PropertyIsLike> </ogc:Filter> </Constraint> </Query> </GetRecords> The example above will return any layers with "QGIS" in a Keyword. Note the use of maxRecords but you can combine that with startPosition to page through the results as well of course. I did try maxRecords as a GET request but I don't believe it worked for me so I think it is POST only if your anything other than the first 10 results but I might be wrong on that. Thanks, Paul From: Brad Hards <[email protected]> Sent: 11 July 2019 11:33 To: Paul Wittle <[email protected]>; [email protected] Subject: RE: [Geoserver-users] Another CSW question The GeoServer docs (https://docs.geoserver.org/stable/en/user/services/csw/index.html) refer you out to the OGC CSW docs for this. You're probably looking for GetRecords (Section 10.8). It probably would have been nicer if they'd provided more KVP examples, but hopefully you can translate across. Brad From: Paul Wittle <[email protected]<mailto:[email protected]>> Sent: Thursday, 11 July 2019 7:44 PM To: '[email protected]' <[email protected]<mailto:[email protected]>> Subject: [Geoserver-users] Another CSW question Hi, This might be a silly question but perhaps the answer may help others trying to work this one out. How do I return all results (or the next 10) from the CSW endpoing using a GET (or POST) request? Might just be missing something obvious but I can't see an example in the GeoServer documentation. Cheers, Paul This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433<http://www.dorsetcouncil.gov.uk/416433> This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433
_______________________________________________ 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
