.Stat RESTful Web Service Cheat Sheet
Table of Content
- Structural metadata queries
- Examples of structural metadata queries
- Data queries
- Examples of data queries
- Supported formats
This cheat sheet is a quick reference description of the syntax and parameters for the .Stat RESTful API. It is adapted from the cheat sheet for the full SDMX RESTful API with examples added for the .Stat context and the unsupported elements removed.
You can also download this document as a .docx file.
Structural metadata queries
Each a .Stat space has a different web service entry point which should- replace
http[s]://.Stat space WS/resource in the above syntax.
More options are available in the full SDMX REST API standard but are not present or have not been fully tested in the .Stat web service, and do not appear here.
Examples of structural metadata queries
These examples use an entry point of http://nsi-staging-oecd.redpelicans.com/ This may be swapped out for your target space.
Note that with the
detail=referencepartial query parameter, the server automatically applies the allowed content constraint on the codelists (and other ItemSchemes) and returns only partial (and thus shorter) codelists.
Using the query with the
references=actualconstraint parameter (with or without the
detail=referencepartial parameter) returns a content constraint of type actual within the response if data was already uploaded. If such a content constraint is not returned by a .Stat Suite SDMX web service, then data was not yet uploaded or the underlying dataflow has not yetr been initialised.
Each a .Stat space has a different web service entry point which should replace https://ws-entry-point in the above syntax.
Examples of data queries
These examples use an entry point of http://nsi-staging-oecd.redpelicans.com. This may be swapped out for your target space.
|Use case||Example querystring|
|All data for a Dataflow, time series view||http://nsi-staging-oecd.redpelicans.com/rest/data/OECD.CFE,DF_DOMESTIC_TOURISM,5.0|
|All data for a partial key (Total Visitors measure), time series view||http://nsi-staging-oecd.redpelicans.com/rest/data/OECD.CFE,DF_DOMESTIC_TOURISM,5.0/..TOTAL_VISITORS........|
|All data for a partial key (Argentina, Total Visitors measure, Annual frequency), time series view||http://nsi-staging-oecd.redpelicans.com/rest/data/OECD.CFE,DF_DOMESTIC_TOURISM,5.0/AR..TOTAL_VISITORS........A|
|Annual data for period 2010-2020 in a flat view||http://nsi-staging-oecd.redpelicans.com/rest/data/OECD.CFE,DF_DOMESTIC_TOURISM,5.0/.........A?startPeriod=2010&endPeriod=2020&dimensionAtObservation=AllDimensions|
“Parameter” in the tables below is used with the Accept HTTP header (see the Useful HTTP headers above)**