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:
Parameter | Description | Status |
dataflow | Id of dataset | Mandatory |
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
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®ion=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" ?> < CompactData xmlns = "http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message" xmlns:message = "http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://www.SDMX.org/resources/SDMXML/schemas/v2_0/message https://registry.sdmx.org/schemas/v2_0/SDMXMessage.xsd http://www.SDMX.org/resources/SDMXML/schemas/v2_0/structure https://registry.sdmx.org/schemas/v2_0/SDMXStructure.xsd" > < 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 > |