Difference between revisions of "SDMX 3.0 data query URL syntax support in Tomcat"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Created page with "The SDMX 3.0 REST API (API version 2) data query specification allows component predicates as an alternative to the series key patterns supported in SDMX 2.1 (API version 1)....")
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[Category:How_To]]
 
The SDMX 3.0 REST API (API version 2) data query specification allows component predicates as an alternative to the series key patterns supported in SDMX 2.1 (API version 1).
 
The SDMX 3.0 REST API (API version 2) data query specification allows component predicates as an alternative to the series key patterns supported in SDMX 2.1 (API version 1).
  
Line 23: Line 24:
 
* Add the following attributes to the relevant Connector element
 
* Add the following attributes to the relevant Connector element
 
  relaxedPathChars='[]|'
 
  relaxedPathChars='[]|'
  relaxedQueryChars='[]|{}^\`"<>'
+
  relaxedQueryChars='[]|{}^\`"<>'

Latest revision as of 23:54, 10 September 2023

The SDMX 3.0 REST API (API version 2) data query specification allows component predicates as an alternative to the series key patterns supported in SDMX 2.1 (API version 1).

Example:

https://demo11.metadatatechnology.com/FusionRegistry/sdmx/v2/data/dataflow/ECB/EXR/1.0/?c[CURRENCY]=BRL&c[EXR_TYPE]=SP00&format=sdmx-compact-2.1

The component predicates are:

c[CURRENCY]=BRL
c[EXR_TYPE]=SP00

Issue

The square brackets [] are reserved characters in the URL specification requiring generally that they are URL-encoded to avoid misinterpretation.

c%5BCURRENCY%5D=BRL&c%5BEXR_TYPE%5D=SP00

%5B = [
%5D = ]

Some Fusion Registry deployment configurations will reject calls to the data query REST API unless the square brackets are URL-encoded

Relaxing URL reserved character checking in Apache Tomcat

Apache Tomcat can be configured to relax its checks for reserved characters and allow square brackets in URLs.

  • Under the Tomcat 'conf' directory, locate the server.xml file
  • Add the following attributes to the relevant Connector element
relaxedPathChars='[]|'
relaxedQueryChars='[]|{}^\`"<>'