Querying Web Services

This notebook describes how to query web services in RAW.

There are two RAW features that help when querying web services:

As an illustration, we look at a complex WHO public web service which outputs a complex XML, e.g.:

<GHO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Created="2021-01-10T15:09:49Z" xsi:schemaLocation="ghodata.xsd">
<QueryParameter Name="format" Value="xml"/>
<QueryParameter Name="baseurl" Value="https://apps.who.int/gho/athena/api/"/>
<QueryParameter Name="filter" Value="COUNTRY:-;REGION:*"/>
<QueryParameter Name="asof" Value="2021-01-10 10:01:26.0"/>
<QueryParameter Name="metadata" Value="active"/>
<QueryParameter Name="target" Value="GHO/WHOSIS_000001"/>
<Copyright>
<Display>(c) World Health Organization</Display>
</Copyright>
<Disclaimer>
<Display>
The information in this database is provided as a service to our users. Any use of information in the web site should be accompanied by an acknowledgment of WHO as the source. The responsibility for the interpretation and use of the material lies with the user. In no event shall the World Health Organization be liable for any damages arising from the use of the information linked to this section.
</Display>
</Disclaimer>
<Metadata>
<Dataset Label="CYCU">
<Display>COUNTRY_YEARLY_CORE_UNITS</Display>
</Dataset>
<Attribute Label="CATEGORY" EntityType="CORE_DIMENSION" Entity="GHO">
<Display>Category</Display>
</Attribute>
...

In fact, querying this data in RAW is as simple as executing a single query. We set cache duration to null, so that data is cached indefinitely.

We may now do a specific query:

Next: Creating Web Services