Programmatic access to the catalog (CSW)

In addition to Catalog service web interface, the FMI catalog service provides an API for accessing the metadata records. It implements the OGC Catalog Service for Web (CSW) open standard interface, and it supports CSW version 2.0.2 and the INSPIRE Discovery Service requirements.

Unlike the FMI View and Download Service APIs, using the Catalog service does not require registration and using the API key. The service metadata for the FMI catalog service itself can be accessed at address http://catalog.fmi.fi/geonetwork/srv/en/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities

In addition to the GetCapabilities operation above, the following standard operations are available:

  • DescribeRecord returns the XML Schemas for different metadata responses,
  • GetDomain describes value ranges for query parameters and properties,
  • GetRecords return a set of metadata records selected by the given query expression, and
  • GetRecordsById returns at most one metadata record with the given identifier (UUID)

Only HTTP binding with KVP request encoding (HTTP Get) is currently supported.

The results are returned as an XML document, the structure of which depends on given the outputSchema and elementSetName parameters.

Example CSW queries

GetRecords request with no filtering, full ISO 19139 response format. Note that the long URL is broken into several lines for clarity, the backslashes at the end of the lines are not part of the URL:

http://http://catalog.fmi.fi/geonetwork/srv/csw?\
service=CSW\
&version=2.0.2\
&request=GetRecords\
&resultType=results\
&outputSchema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd\
&NAMESPACE=xmlns(gmd=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd)\
&typeNames=gmd:MD_Metadata\
CONSTRAINTLANGUAGE=CQL_TEXT\
&elementSetName=full\
&startPosition=10\
&maxRecords=10

Try this query

GetRecords CQL query: some element must contain text 'air temperature', full ISO 19139 response format :

http://http://catalog.fmi.fi/geonetwork/srv/csw?\
service=CSW\
&version=2.0.2\
&request=GetRecords\
&resultType=results\
&outputSchema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd\
&NAMESPACE=xmlns(gmd=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd)\
&typeNames=gmd:MD_Metadata\
CONSTRAINTLANGUAGE=CQL_TEXT\
&CONSTRAINT=AnyText%20=%20'air%20temperature'\
&CONSTRAINT_LANGUAGE_VERSION=1.1.0\
&elementSetName=full

Try this query

GetRecordById request for metadata record 'c5a9dbf9-cd66-49f1-9481-bc0dbfb65bbf', full ISO 19139 response format:

http://http://catalog.fmi.fi/geonetwork/srv/csw?\
service=CSW\
&version=2.0.2\
&request=GetRecordById\
&ID=c5a9dbf9-cd66-49f1-9481-bc0dbfb65bbf\
&resultType=results\
&outputSchema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd\
&NAMESPACE=xmlns(gmd=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd)\
&typeNames=gmd:MD_Metadata\
&elementSetName=full

Try this query

GetRecordById request for metadata record 'c5a9dbf9-cd66-49f1-9481-bc0dbfb65bbf', brief ISO 19139 response format:

http://http://catalog.fmi.fi/geonetwork/srv/csw?\
service=CSW\
&version=2.0.2\
&request=GetRecordById\
&ID=c5a9dbf9-cd66-49f1-9481-bc0dbfb65bbf\
&resultType=results\
&outputSchema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd\
&NAMESPACE=xmlns(gmd=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd)\
&typeNames=gmd:MD_Metadata\
&elementSetName=brief

Try this query

31.5.2013