Difference between revisions of "Publication Table Web Services"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Publication Table Variable Availability)
(Excel Output Format)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:WebService]]
 
[[Category:WebService]]
 +
 +
@see [[Publication_Table|Publication Table]]
  
 
= Publication Table  Definition =
 
= Publication Table  Definition =
Line 6: Line 8:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
|style="background-color:#eaecf0"|<b>Entry Point</b>|| <b> /sdmxapi/v2/publicationtable</b>
+
|style="background-color:#eaecf0"|<b>Entry Point</b>|| <b> /sdmxapi/v2/structure/publicationtable/{agency id}/{id}/{version}</b>
 
|-
 
|-
 
|style="background-color:#eaecf0"|<b>Http Method</b>|| GET  
 
|style="background-color:#eaecf0"|<b>Http Method</b>|| GET  
 
|}
 
|}
  
 +
Example 1 - Get all publication tables
 +
http(s)://myregistry/'''sdmxapi/v2/structure/publicationtable/all/all/all'''
 +
 +
Example 2 - Get specific publication table
 +
http(s)://myregistry/sdmxapi/v2/structure/publicationtable/'''MY_AGENCY/MY_TABLE_ID/1.0.0'''
 +
 +
Example 2 - Get specific publication table and all descendants (Dataflow, DSD, Codelists, Concepts)
 +
http(s)://myregistry/sdmxapi/v2/structure/publicationtable/MY_AGENCY/MY_TABLE_ID/1.0.0'''?references=descendants'''
  
 
= Materialise Publication Table  =
 
= Materialise Publication Table  =
Line 22: Line 32:
 
|}
 
|}
  
'''Query pararmeters'''  
+
 
 +
== JSON Output Format ==
 +
[[File:Publication Table Excel.png|thumb|Publication Table output in Excel]]
 +
The default format for a materialised publication table is JSON, to explicitly request JSON set use the query parameter '''format=json'''
 +
 
 +
https://demo11.metadatatechnology.com/FusionRegistry/sdmx/v2/table/ECB.DISS/EXR/1.0?CURRENCY=CAD
 +
 
 +
== Excel Output Format ==
 +
The default format for a materialised publication table is JSON, to explicitly request JSON set use the query parameter '''format=xlsx'''
 +
 
 +
https://demo11.metadatatechnology.com/FusionRegistry/sdmx/v2/table/ECB.DISS/EXR/1.0?CURRENCY=CAD&format=xlsx
 +
 
 +
== Query pararmeters ==
 
Set variable Dimension Values: The parameter is the Dimension ID and the parameter value is the Dimension Value to set it to. For example, if TIME_PERIOD and REF_AREA are both variable Dimensions in the Publication Table definition, their values can be passed like this.
 
Set variable Dimension Values: The parameter is the Dimension ID and the parameter value is the Dimension Value to set it to. For example, if TIME_PERIOD and REF_AREA are both variable Dimensions in the Publication Table definition, their values can be passed like this.
  
  http(s)://myregistry/sdmx/v2/table/MY_AGENCY/MY_TABLE_D/1.0.0?TIME_PERIOD=2019&REF_AREA=UK
+
  http(s)://myregistry/sdmx/v2/table/MY_AGENCY/MY_TABLE_D/1.0.0'''?TIME_PERIOD=2019&REF_AREA=UK'''
  
 
Include Time Range: It is possible to include the time range in the Publication Table response using the '''includePeriod''' query parameter. This provides the earliest possible data and latest possible date for which there is data for the given Table (taking into account Dimension varaible values).  This is an opt-in parameter as this information requires a secondary data query to the data store.
 
Include Time Range: It is possible to include the time range in the Publication Table response using the '''includePeriod''' query parameter. This provides the earliest possible data and latest possible date for which there is data for the given Table (taking into account Dimension varaible values).  This is an opt-in parameter as this information requires a secondary data query to the data store.
Line 44: Line 66:
  
 
Example 1 - No variable parameters are passed, the response contains all variable values that have data  
 
Example 1 - No variable parameters are passed, the response contains all variable values that have data  
  http(s)://myregistry/sdmx/v2/table/MY_AGENCY/MY_TABLE_D/1.0.0
+
  http(s)://myregistry/'''sdmx/v2/tableavailability/MY_AGENCY/MY_TABLE_D/1.0.0'''
  
 
Example 2 - Time Period set to 2019, variable values in the response are only included if they have data for this time period
 
Example 2 - Time Period set to 2019, variable values in the response are only included if they have data for this time period
  http(s)://myregistry/sdmx/v2/table/MY_AGENCY/MY_TABLE_D/1.0.0?TIME_PERIOD=2019
+
  http(s)://myregistry/sdmx/v2/tableavailability/MY_AGENCY/MY_TABLE_D/1.0.0'''?TIME_PERIOD=2019'''
 +
 
 +
https://demo11.metadatatechnology.com/FusionRegistry/sdmx/v2/tableavailability/ECB.DISS/EXR/1.0

Latest revision as of 00:43, 24 January 2023


@see Publication Table

Publication Table Definition

Get the Publication Table metadata, which is the definition of a Publication Table. A Publication Table definition is obtained via the standard SDMX web service for structural metadata, and as such the standard SDMX query syntax can be used to filter the results.

Entry Point /sdmxapi/v2/structure/publicationtable/{agency id}/{id}/{version}
Http Method GET

Example 1 - Get all publication tables

http(s)://myregistry/sdmxapi/v2/structure/publicationtable/all/all/all

Example 2 - Get specific publication table

http(s)://myregistry/sdmxapi/v2/structure/publicationtable/MY_AGENCY/MY_TABLE_ID/1.0.0

Example 2 - Get specific publication table and all descendants (Dataflow, DSD, Codelists, Concepts)

http(s)://myregistry/sdmxapi/v2/structure/publicationtable/MY_AGENCY/MY_TABLE_ID/1.0.0?references=descendants

Materialise Publication Table

Builds an instance of a Publication Table from the metadata and variables passed in. A materialised Publication Table has the variables replaced with text, and the Observation Keys are replaced with the observation values from the data store.

Entry Point /sdmx/v2/table/{agency}/{id}/{version}
Http Method GET


JSON Output Format

Publication Table output in Excel

The default format for a materialised publication table is JSON, to explicitly request JSON set use the query parameter format=json

https://demo11.metadatatechnology.com/FusionRegistry/sdmx/v2/table/ECB.DISS/EXR/1.0?CURRENCY=CAD

Excel Output Format

The default format for a materialised publication table is JSON, to explicitly request JSON set use the query parameter format=xlsx

https://demo11.metadatatechnology.com/FusionRegistry/sdmx/v2/table/ECB.DISS/EXR/1.0?CURRENCY=CAD&format=xlsx

Query pararmeters

Set variable Dimension Values: The parameter is the Dimension ID and the parameter value is the Dimension Value to set it to. For example, if TIME_PERIOD and REF_AREA are both variable Dimensions in the Publication Table definition, their values can be passed like this.

http(s)://myregistry/sdmx/v2/table/MY_AGENCY/MY_TABLE_D/1.0.0?TIME_PERIOD=2019&REF_AREA=UK

Include Time Range: It is possible to include the time range in the Publication Table response using the includePeriod query parameter. This provides the earliest possible data and latest possible date for which there is data for the given Table (taking into account Dimension varaible values). This is an opt-in parameter as this information requires a secondary data query to the data store.

http(s)://myregistry/sdmx/v2/table/MY_AGENCY/MY_TABLE_D/1.0.0?TIME_PERIOD=2019&REF_AREA=UK&includePeriod=true

Publication Table Variable Availability

Defines the list of valid varaible values based on the current query. This query is based on the SDMX Data Availability Query and as such the response type is the same. The references parameter in the SDMX Data Availability Query has the same behaviour in the Publication Table Variable Availability Query.

Note, that the Time Period variable is not part of this response. The Time range can be obtained when materialising a table.

Entry Point /sdmx/v2/tableavailability/{agency}/{id}/{version}
Http Method GET

Example 1 - No variable parameters are passed, the response contains all variable values that have data

http(s)://myregistry/sdmx/v2/tableavailability/MY_AGENCY/MY_TABLE_D/1.0.0

Example 2 - Time Period set to 2019, variable values in the response are only included if they have data for this time period

http(s)://myregistry/sdmx/v2/tableavailability/MY_AGENCY/MY_TABLE_D/1.0.0?TIME_PERIOD=2019

https://demo11.metadatatechnology.com/FusionRegistry/sdmx/v2/tableavailability/ECB.DISS/EXR/1.0