Browse

Metadata

Basics

All metadata can be retrieved using the query string below. Learn about the SDMX standard and SDMX metadata here.

protocol://wsEntryPoint/resource/agencyID/resourceID/version?detail=value&references=value

Syntax definition

Protocol

As of 28 January 2021 the web service is only available over https. http calls made via a browser will be automatically redirected to https.

wsEntryPoint

The web service entry point is available at the following location: 
https://data-api.ecb.europa.eu/service/

resource

The following resources (also known as artefacts) are supported by the web service, though not all of them are currently used: datastructure, metadatastructure, categoryscheme, Conceptscheme, codelist, hierarchicalcodelist, organisationscheme, agencyscheme, dataproviderscheme, dataconsumerscheme, organisationunitscheme, dataflow, metadataflow, reportingtaxonomy, provisionagreement, structureset, process, categorisation, contentconstraint, attachmentconstraint and structure.

agencyID (Identifying the maintainer)

Organisations defining metadata are known as agencies in SDMX. In order to retrieve an artefact, you should know the identifier of its maintainer.

resourceID (Identifying the artefact)

The identifier of the resource, such as CL_FREQ for the frequency codelist maintained by the ECB.

version (Getting the right version)

The version of the artefact to be returned. When the version number is not supplied, the latest version is returned.

detail (Defining the amount of detail)

Using the detail parameter, you can specify the desired amount of information to be returned. For example, it is possible to instruct the web service to return only basic information about the resource (i.e. its id, agency id, version and name. This is also known as a stub in SDMX). The allowed values are:

  • full: all available information for all artefacts will be returned. This is the default.

  • allstubs: all artefacts will be returned as stubs.

  • referencestubs: the referenced artefacts will be returned as stubs.

Caption

Using the references parameter, you can instruct the web service to return (or exclude) the artefacts that use or are referenced by the artefact matching the query. This includes, for example, the codelists and Concepts used by the DSD matching the query. You can also retrieve the artefacts that use the matching artefact, such as the Dataflows that use the DSD matching the query. Possible values are:

  • none: no references will be returned. This is the default.

  • parents: the artefacts that use the artefact matching the query (for example, the Dataflows that use the DSD matching the query) will be returned.

  • parentsandsiblings: the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts, will be returned.

  • children: the artefacts referenced by the matching artefact (for example, the Concept schemes and codelists used in a DSD) will be returned.

  • descendants: references of references, up to any level, will also be returned.

  • all: The combination of parentsandsiblings and descendants.

In addition, a concrete type of resource, may also be used (for example, References=Codelist).

Examples

Retrieve version 1.0 of the DSD with id ECB_EXR1 maintained by the ECB, as well as the codelists and the Concepts used in the DSD

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/datastructure/ECB/ECB_EXR1/1.0?references=children

Retrieve the latest version in production of the DSD with id ECB_EXR1 maintained by the ECB, without the codelists and Concepts of the DSD

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/datastructure/ECB/ECB_EXR1

You can also use the keyword latest:

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/datastructure/ECB/ECB_EXR1/latest

Retrieve all DSDs maintained by the ECB, as well as the Dataflows using these DSDs

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/datastructure/ECB?references=dataflow

You can also use the keywords all and latest:

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/datastructure/ECB/all/latest?references=dataflow

Retrieve the latest version in production of all codelists maintained by all maintenance agencies, but without the codes

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/codelist?detail=allstubs

You can also use the all and latest keywords:

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/codelist/all/all/latest?detail=allstubs

The structure keyword can be used to retrieve metadata regardless of their type (codelist, Concept scheme, etc.). For example, the following string retrieves the latest version in production of all maintainable artefacts maintained by the ECB as stubs:

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/structure/ECB?detail=allstubs

Again, you can also use the all and latest keywords:

wget -O md.xml --header 'authorization: Basic ZXV1c2VybmFtZTpwYXNzd29yZA==' https://data-api.ecb.europa.eu/service/structure/ECB/all/latest?detail=allstubs