OECD.Stat SDMX web service
This service gives access to .Stat data and tries to be fully SDMX 2.0 compliant. However, the following additional rules are applied:
(1) .Stat provides currently only annual, bi-annual, quarterly, monthly and non-time-series data.
Independently from the presence of a FREQUENCY dimension, the requested time frequency should be specified using the TIME_FORMAT attribute as in this example:
<And>
<Attribute name="TIME_FORMAT">P1M</Attribute>
<Time>
<StartTime>1960-01</StartTime>
<EndTime>2005-10</EndTime>
</Time>
</And>
The TIME_FORMAT attribute should have the following value: 'P1Y' for annual, 'P6M' for bi-annual, 'P3M' for quarterly and 'P1M' for monthly data. This attribute is then also present in the resulting generic data message at the Series level of time-series data.
For non-time-series data, the TIME_PERIOD attribute and the 'Time' node should be omitted in the query message. In this case, the response messages use '9999' for the obligatory time periods.
(2) In the .Stat data warehouse each dataset (multidimensional cube) has its own Data Structure Definition.
(3) Structure your query by defining separate data 'cubes'. Each data cube must have a 'DataSet' node. This 'DataSet' node must be a direct child of one separate 'And' clause which must include all necessary dimension codes at any lower (child) level, and which itself must be a direct child of either of the clauses 'DataWhere' or 'Or'.
(4) For simplification reasons in this web service, the returned message headers only contain required information. As the 'message:ID' field is not (yet) used, its content is filled with a placeholder to conform to the standard.
(5) Our new SDMX web service version implements Streaming, and can therefore not set the 'Truncated' element in the response message. We are thus unable to take the 'defaultLimit' attribute in the Query message into account. To avoid errors, either implement streaming also at your (client) side to allow for greater-sized results or restrict the selection in the query message according to your limitation. In any case, please don't use the 'defaultLimit' attribute in the Query message.
The following operations are supported. For a formal definition, please review the Service Description.
-
GetCompactData
Use this method to retrieve data in Compact format from an .Stat dataset.
Note: As the requested input parameter is an xml document, you can not try the method using this webservice presentation page.
Input: SDMX QueryMessage (in SDMX-ML format)
Output: SDMX CompactDataMessage
When authenticated access is needed, then previously do the following steps:
Step n° 1: Get the current .Stat public encryption key:
/OECDStatWS_Authentication/OECDStatWS_Authentication.asmx?op=GetPublicKey
Step n° 2: RSA-encrypt your password using the public encryption key and authenticate yourself:
/OECDStatWS_Authentication/OECDStatWS_Authentication.asmx?op=AuthenticateWithLogonUpdate
The 'AuthenticateWithLogonUpdate' method returns a session ID and updates the username. Provide this session ID, your user name and the domain as URL options 'sessionid', 'login' and 'domain' to the GetDataStructureDefinition method.
Note: You can reuse the same session ID for several SDMX requests within a certain timeout. The authentication procedure might be modified in the future.
Our new SDMX web service version implements Streaming, and can therefore not set the 'Truncated' element in the response message. We are thus unable to take the 'defaultLimit' attribute in the Query message into account. To avoid errors, either implement streaming also at your (client) side to allow for greater-sized results or restrict the selection in the query message according to your limitation. In any case, please don't use the 'defaultLimit' attribute in the Query message. -
GetDataStructureDefinition
Use this method to retrieve the Data Structure Definitions (as well as Code lists and Concepts) from an .Stat dataset.
Note: As the requested input parameter is an xml document, you can not try the method using this webservice presentation page.
Input: SDMX QueryMessage (in SDMX-ML format)
Output: SDMX StructureMessage (in SDMX-ML format)
When authenticated access is needed, then previously do the following steps:
Step n° 1: Get the current .Stat public encryption key:
/OECDStatWS_Authentication/OECDStatWS_Authentication.asmx?op=GetPublicKey
Step n° 2: RSA-encrypt your password using the public encryption key and authenticate yourself:
/OECDStatWS_Authentication/OECDStatWS_Authentication.asmx?op=AuthenticateWithLogonUpdate
The 'AuthenticateWithLogonUpdate' method returns a session ID and updates the username. Provide this session ID, your user name and the domain as URL options 'sessionid', 'login' and 'domain' to the GetDataStructureDefinition method.
Note: You can reuse the same session ID for several SDMX requests within a certain timeout. The authentication procedure might be modified in the future.
-
GetDatasetMetadata
Use this method to retrieve the metadata associated with a dataset.
- Sample input
- Sample output
- Usage example (C# code)
-
GetDimensionMemberMetadata
Use this method to retrieve the metadata associated with a member of a dimension in a dataset.
- Sample input
- Sample output
- Usage example (C# code)
-
GetDimensionMetadata
Use this method to retrieve the metadata associated with a dimension in a dataset.
- Sample input
- Sample output
- Usage example (C# code)
-
GetGenericData
Use this method to retrieve data in Generic format from an .Stat dataset.
Note: As the requested input parameter is an xml document, you can not try the method using this webservice presentation page.
Input: SDMX QueryMessage (in SDMX-ML format)
Output: SDMX GenericDataMessage (in SDMX-ML format)
When authenticated access is needed, then previously do the following steps:
Step n° 1: Get the current .Stat public encryption key:
/OECDStatWS_Authentication/OECDStatWS_Authentication.asmx?op=GetPublicKey
Step n° 2: RSA-encrypt your password using the public encryption key and authenticate yourself:
/OECDStatWS_Authentication/OECDStatWS_Authentication.asmx?op=AuthenticateWithLogonUpdate
The 'AuthenticateWithLogonUpdate' method returns a session ID and updates the username. Provide this session ID, your user name and the domain as URL options 'sessionid', 'login' and 'domain' to the GetDataStructureDefinition method.
Note: You can reuse the same session ID for several SDMX requests within a certain timeout. The authentication procedure might be modified in the future.
Our new SDMX web service version implements Streaming, and can therefore not set the 'Truncated' element in the response message. We are thus unable to take the 'defaultLimit' attribute in the Query message into account. To avoid errors, either implement streaming also at your (client) side to allow for greater-sized results or restrict the selection in the query message according to your limitation. In any case, please don't use the 'defaultLimit' attribute in the Query message. -
GetMetadata
Use this method to retrieve a range of metadata in a dataset.
- Sample input
- Sample output
- Usage example (C# code)
-
GetMetadataStructure
Use this method to retrieve all strucural informations about a given dataset.
- Sample input
- Sample output
- Usage example (C# code)
- GetReferenceMetadata