Alberto,

the canonical way to discover resources via OGC web services is with a 
GetCapabilities request. In the case of WCS, you can discover the names 
of all enabled coverages. Use curl or any other HTTP client to retrieve 
the capabilities document, then parse it as XML with your language or 
tool of choice to extract the coverage names.

For example, for the release configuration of GeoServer, with curl 
output piped into the xpath tool (from the libxml-xpath-perl package on 
Debian; what is your platform?):

curl -s 
"http://localhost:8080/geoserver/wcs?service=WCS&version=2.0.1&request=GetCapabilities";
 
| xpath -q -e '//wcs:CoverageId/text()'

Output:

nurc__Arc_Sample
nurc__Img_Sample
nurc__mosaic
sf__sfdem

Filter this output to obtain a list of coverages whose names end in 
"RGB". You can do exactly the same thing in Java, Python, or any other 
general purpose language with HTTP and XML parsing support.

Kind regards,
Ben.

On 16/04/16 04:43, Alberto Callejas Delgado wrote:
> Dear GeoServer users,
>
> I am working with the rest api and I need to get a list of coverages from
> GeoServer via cURL but just those which are RGB products (layer name ending
> in "RGB")
>
> I read in here that almost everything you can do in the GUI can be done
> using cURL.
>
> Please, could anybody point me to the right way to find out a solution?
>
> Thank you very much,
>
> Alberto
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>
>
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>

-- 
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to