How to retrieve data

Knoema platform supports data retrieval in Compact SDMX format (SDMX 2.0) and Structure Specific Data format (SDMX 2.1). To retrieve data from specific dataset HTTP GET request should be made to http://data.gov.om/api/1.0/sdmx/data/{dataflow}/{key}{filter} endpoint. This endpoint supports the following parameters:

ParameterDescriptionStatus
dataflowId of datasetMandatory
key

The key of the artefact to be returned as specified in SDMX 2.1 format description

Mandatory
filter

The query string that is used to further filter desired results. Parameters "startPeriod", "endPeriod" represent the start and end period for which results should be supplied.

Optional

 

SDMX 2.1 - Response will contain data in StructureSpecificData SDMX format encapsulate into Structure message

GET https://data.gov.om/api/1.0/sdmx/data/OMPOP2016/17553263.17112113+17112133.17112283.17112973.17115903.A?startPeriod=2007&endPeriod=2017
 
<StructureSpecificData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"xmlns:com="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common" xsi:schemaLocation="https://registry.sdmx.org/schemas/v2_1/SDMXMessage.xsd https://registry.sdmx.org/schemas/v2_1/SDMXStructure.xsd">
<Header>
<ID>none</ID>
<Test>false</Test>
<Prepared>2018-02-08T06:16:06</Prepared>
<Sender id="Knoema"/>
<Receiver id="unknown"/>
<Structure structureID="Knoema_OMPOP2016_1_0" dimensionAtObservation="TIME_PERIOD"namespace="urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=Knoema:OMPOP2016(1.0):ObsLevelDim:TIME_PERIOD">
<common:Structure xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common">
<Ref agencyID="Knoema" id="OMPOP2016" version="1.0"/>
</common:Structure>
</Structure>
</Header>
<DataSet>
<Series REGIONS="17553263" INDICATORS="17112113" NATIONALITY="17112283" SEX="17112973" AGE_GROUPS="17115903" FREQ="A">
<Obs TIME_PERIOD="2007" OBS_VALUE="52500"/>
<Obs TIME_PERIOD="2008" OBS_VALUE="58250"/>
<Obs TIME_PERIOD="2009" OBS_VALUE="64631"/>
<Obs TIME_PERIOD="2010" OBS_VALUE="64730"/>
<Obs TIME_PERIOD="2011" OBS_VALUE="67922"/>
<Obs TIME_PERIOD="2012" OBS_VALUE="72867"/>
<Obs TIME_PERIOD="2013" OBS_VALUE="79417"/>
<Obs TIME_PERIOD="2014" OBS_VALUE="82981"/>
<Obs TIME_PERIOD="2015" OBS_VALUE="86286"/>
<Obs TIME_PERIOD="2016" OBS_VALUE="88346"/>
</Series>
<Series REGIONS="17553263" INDICATORS="17112133" NATIONALITY="17112283" SEX="17112973" AGE_GROUPS="17115903" FREQ="A">
<Obs TIME_PERIOD="2007" OBS_VALUE="6810"/>
<Obs TIME_PERIOD="2008" OBS_VALUE="7415"/>
<Obs TIME_PERIOD="2009" OBS_VALUE="7101"/>
<Obs TIME_PERIOD="2010" OBS_VALUE="7414"/>
<Obs TIME_PERIOD="2011" OBS_VALUE="7667"/>
<Obs TIME_PERIOD="2012" OBS_VALUE="7884"/>
<Obs TIME_PERIOD="2013" OBS_VALUE="7669"/>
<Obs TIME_PERIOD="2014" OBS_VALUE="7819"/>
<Obs TIME_PERIOD="2015" OBS_VALUE="8167"/>
<Obs TIME_PERIOD="2016" OBS_VALUE="8828"/>
</Series>
</DataSet>
</StructureSpecificData>
 

SDMX 2.0 - Response will contain data in Compact SDMX format encapsulated into Structure message.

GET http://data.gov.om/api/1.0/sdmx/get?id=OMINF2016&region=1000000&indicator=1000010,1000020&periodic-release=1000000&program-quality=1000000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="UTF-8"?>
   <Header>
      <ID>none</ID>
      <Test>false</Test>
      <Truncated>false</Truncated>
      <Prepared>2017-09-25T12:35:55</Prepared>
      <Sender id="Knoema">
         <Name xml:lang="en">Knoema</Name>
      </Sender>
   </Header>
      <Series REGIONS="1" INDICATORS="17166863" PERIODIC_RELEASE="17166693" PROGRAM_QUALITY="17166783" UNIT_MEASURE="0" UNIT_MULT="0" FREQ="A" TIME_FORMAT="P1Y">
         <Obs TIME_PERIOD="2002" OBS_VALUE="65" />
         <Obs TIME_PERIOD="2003" OBS_VALUE="80" />
         <Obs TIME_PERIOD="2004" OBS_VALUE="85" />
         <Obs TIME_PERIOD="2005" OBS_VALUE="102" />
         <Obs TIME_PERIOD="2006" OBS_VALUE="101" />
         <Obs TIME_PERIOD="2007" OBS_VALUE="117" />
         <Obs TIME_PERIOD="2008" OBS_VALUE="111" />
         <Obs TIME_PERIOD="2009" OBS_VALUE="111" />
         <Obs TIME_PERIOD="2010" OBS_VALUE="111" />
         <Obs TIME_PERIOD="2011" OBS_VALUE="129" />
         <Obs TIME_PERIOD="2012" OBS_VALUE="140" />
         <Obs TIME_PERIOD="2013" OBS_VALUE="143" />
         <Obs TIME_PERIOD="2014" OBS_VALUE="158" />
         <Obs TIME_PERIOD="2015" OBS_VALUE="187" />
         <Obs TIME_PERIOD="2016" OBS_VALUE="0" />
      </Series>
      <Series REGIONS="1" INDICATORS="17166873" PERIODIC_RELEASE="17166693" PROGRAM_QUALITY="17166783" UNIT_MEASURE="0" UNIT_MULT="0" FREQ="A" TIME_FORMAT="P1Y">
         <Obs TIME_PERIOD="2002" OBS_VALUE="24" />
         <Obs TIME_PERIOD="2003" OBS_VALUE="31" />
         <Obs TIME_PERIOD="2004" OBS_VALUE="31" />
         <Obs TIME_PERIOD="2005" OBS_VALUE="48" />
         <Obs TIME_PERIOD="2006" OBS_VALUE="48" />
         <Obs TIME_PERIOD="2007" OBS_VALUE="57" />
         <Obs TIME_PERIOD="2008" OBS_VALUE="33" />
         <Obs TIME_PERIOD="2009" OBS_VALUE="33" />
         <Obs TIME_PERIOD="2010" OBS_VALUE="33" />
         <Obs TIME_PERIOD="2011" OBS_VALUE="34" />
         <Obs TIME_PERIOD="2012" OBS_VALUE="40" />
         <Obs TIME_PERIOD="2013" OBS_VALUE="43" />
         <Obs TIME_PERIOD="2014" OBS_VALUE="48" />
         <Obs TIME_PERIOD="2015" OBS_VALUE="72" />
         <Obs TIME_PERIOD="2016" OBS_VALUE="0" />
      </Series>
   </DataSet>
</CompactData>