Get timeseries list (filtered)

This endpoint returns timeseries data filtered by datasetId and a combination of dimension values.

Input: GET

With input as just the datasetId we obtain a list of all timeseries data listed in the dataset.

Input: POST

The StartDate and EndDate act as filters between which if data is found, a timeseries result is given as output. Similarly only data which matches the filter will be sent as output. By default if not Frequeny is given. All frequencies will be given as output. If not start and enddate is given..data from all time ranges will be given as output.

  • DimensionRequest :Dimension Filter Items
    • DimensionId : DimensionId to filter
    • Members : Members of the respective dimension Id which are required.
  • Frequency: Array of required Frequencies. values can be 'A' -Annual ,'Q' -Quarterly, 'M' -Monthly ,'W' -Weekly 
  • StartDate: StartDate from which data is required.
  • EndDate: EndDate before which data is required.

Result

Array of Observation Data details in JSON format:

  • DatasetId : unique dataset identifier
  • TimeSeriesKey : Timeseries identification number
  • frequency :Inverval of time between which observation data has been recorded.Can take the following values: annual, semiannual, quarterly, monthly, weekly, daily.
  • metadata : Lists out associated dimensions values for the given timeseries.
    • dim:Dimension Id
    • key: Unique Dimension key.
    • name: Value of the dimension
  • startDate: First observation value's date.
  • endDate: Last observation value's date.

Example

GET : http://data.gov.om/api/1.0/data/dataset/OMINF2016
   
POST: http://data.gov.om/api/1.0/data/dataset/OMINF2016
{
   "DimensionRequest": [
      {
         "DimensionId": "region",
         "Members": [
            1000000
         ]
      },
      {
         "DimensionId": "indicator",
         "Members": [
            1000010
         ]
      }
   ],
   "Frequency": [
      "A"
   ],
   "StartDate": "2002-01-01",
   "EndDate": "2016-01-01"
}
[
   {
      "datasetId":"OMINF2016",
      "timeseriesKey":1000000,
      "frequency":"Annual",
      "metadata":[
         {
            "dim":"region",
            "key":"1000000",
            "name":"Oman"
         },
         {
            "dim":"indicator",
            "key":"1000010",
            "name":"Grand Total - Transmission & Broadcasting Hours :Daily - No"
         },
         {
            "dim":"periodic-release",
            "key":"1000000",
            "name":"Total"
         },
         {
            "dim":"program-quality",
            "key":"1000000",
            "name":"Total"
         }
      ],
      "startDate":"01/01/2002 00:00:00",
      "endDate":"01/01/2016 00:00:00"
   }
]