This page documents more advanced features for data queries. It is recommended to read first the page API data query.
This is the SDMX 2.1 REST request for data:
Each section of this page discusses further the filters that can be set in this syntax definition.
The key is constructed as a dot ('.') separated list of dimension filtered values.
To build the key:
Get the list of dataflows to identify a relevant dataflow.
Then download the data structure with references resolution for children for the relevant dataflow and check the list of dimensions.
Each dimension supports values set by the codelist definition.
For example, the data structure definition for NAMA_10_GDP lists 4 dimensions, in this order:
FREQ with values set by codelist FREQ
UNIT with values set by codelist UNIT
INDIC_NA with values set by codelist INDIC_NA
GEO with values set by codelist GEO
For NAMA_10_GDP the key [FREQ].[UNIT].[INDIC_NA].[GEO] in the exact order of dimensions set by the data structure definition can be for instance A.CP_MEUR.B1GQ.LU, where:
Data aggregated annually
Current prices, million euro
Gross domestic product at market prices
Dimensions which should not be filtered are left empty in the query. For NAMA_10_GDP the key without filter on dimension FREQ can be .CP_MEUR.B1GQ.LU
Logical conjuction is created using the plus '+' character. For NAMA_10_GDP the key can be A.CP_MEUR.B1GQ.BE+LU
This allows filtering data observations within a time series on start and end dates.
The start and end of the time period in the filter are determined as startPeriod and endPeriod. Following time periods are supported:
YYYY-A1 or YYYY
YYYY-M[01-12] or YYYY-[01-12]
as illustrated by
Filtering on NAMA_10_GDP annual observations from 2012 to 2015
This allows filtering data observations within a time series to limit the number of observations returned.
This filter may be applied to data which has been filtered by dimension and / or time.
First N Observations return the first N observations in the corresponding series
Last N Observations return the last N observations in the corresponding series
Both definitions may be applied e.g. to return the first and last observations in a series.
If the filter is wrong, then a response is returned with no observation results.
Filtering on NAMA_10_GDP for the last 5 annual observations
as illustrated by
NAMA_10_GDP with data only