SDMX 3.0 data query URL syntax support in Tomcat
Revision as of 07:24, 4 August 2022 by Glenn (talk | contribs) (Glenn moved page SDMX 3.0 data query syntax support in Tomcat to SDMX 3.0 data query URL syntax support in Tomcat without leaving a redirect)
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='[]|{}^\`"<>'