1. Home
  2. API Guide
  3. Special Cases

How to Retrieve Time Series Results

Some Altitude analyses support a generateTimeSeries parameter. When enabled, retrieving both the standard results and the time series results requires six API calls total, completing the standard create-poll-retrieve cycle twice: once for the main analysis and once for the time series results.

Parameter Value
method "GetAltitudeData"
serviceName "dna-altitude-general"
functionName One of "createQueryJob", "cancelQueryJob", "getJobStatus", or "getQueryResults".

Some Altitude analyses support a generateTimeSeries parameter. When enabled, retrieving both the standard results and the time series results requires six API calls total, completing the standard create-poll-retrieve cycle twice: once for the main analysis and once for the time series results.

Step 1: Running your analysis with time series enabled

Add generateTimeSeries: true to the analysis request and complete the standard create-poll-retrieve cycle.

Add generateTimeSeries: true to the functionParameters when creating the job. Everything else follows the standard pattern.

{
  "method": "GetAltitudeData",
  "params": {
    "serviceName": "dna-altitude-stop-analytics",
    "functionName": "createQueryJob",
    "functionParameters": {
      "queryType": "getStopAnalytics",
      "generateTimeSeries": true,
      ...
    }
  }
}

Poll with getJobStatus and retrieve with getQueryResults as usual. Save the jobId returned from this analysis. This value is required in Steps 2-4 as the analysisJobId.

Step 2: Creating the time series job

Once the main analysis is complete, create a new job to generate the time series results.

Once the main analysis is complete, create a new job using serviceName: "dna-altitude-general" and queryType: "getSavedResults". Pass the parent job ID as analysisJobId and the time series variant of the original query type as the analysisType.

{
  "method": "GetAltitudeData",
  "params": {
    "serviceName": "dna-altitude-general",
    "functionName": "createQueryJob",
    "functionParameters": {
      "queryType": "getSavedResults",
      "analysisJobId": "<parent-job-id>",
      "analysisType": "<originalQueryType>TimeSeries"
    }
  }
}

This returns a new jobId for the time series job. Track this separately from the parent job ID.

Step 3: Polling until complete

Monitor the time series job status until the job is complete.

Check the status of the time series job using the job ID returned from Step 2.

{
  "method": "GetAltitudeData",
  "params": {
    "serviceName": "dna-altitude-general",
    "functionName": "getJobStatus",
    "functionParameters": {
      "jobId": "<time-series-job-id>"
    }
  }
}

Repeat until the job status indicates completion.

Step 4: Retrieving the time series results

Retrieve the time series results using the job ID returned in Step 2.

Once the job is complete, fetch the results.

{
  "method": "GetAltitudeData",
  "params": {
    "serviceName": "dna-altitude-general",
    "functionName": "getQueryResults",
    "functionParameters": {
      "jobId": "<time-series-job-id>"
    }
  }
}

Origin-destination matrix: time series walkthrough

This topic provides a worked example of retrieving time series results for getOriginDestinationMatrix.

This example uses getOriginDestinationMatrix with generateTimeSeries: true. The analysis returns jobId: "1234".

To retrieve the time series results, create a new job (Step 2):

{
  "method": "GetAltitudeData",
  "params": {
    "serviceName": "dna-altitude-general",
    "functionName": "createQueryJob",
    "functionParameters": {
      "queryType": "getSavedResults",
      "analysisJobId": "1234",
      "analysisType": "getOriginDestinationMatrixTimeSeries"
    }
  }
}

Then poll for completion (Step 3) using the new job ID returned from Step 2:

{
  "method": "GetAltitudeData",
  "params": {
    "serviceName": "dna-altitude-general",
    "functionName": "getJobStatus",
    "functionParameters": {
      "jobId": "<time-series-job-id>"
    }
  }
}

Repeat until the job status indicates completion. Then retrieve the results (Step 4):

{
  "method": "GetAltitudeData",
  "params": {
    "serviceName": "dna-altitude-general",
    "functionName": "getQueryResults",
    "functionParameters": {
      "jobId": "<time-series-job-id>"
    }
  }
}

Supported time series types

This topic lists the query types that support time series retrieval and their corresponding analysisType values.

The following query types support time series retrieval. Pass the corresponding analysisType value when creating the time series job in Step 2.

queryType analysisType for time series
getCorridorOriginDestinationMatrix getCorridorOriginDestinationMatrixTimeSeries
getDemandGeneration getDemandGenerationTimeSeries
getIdleMetrics getIdleMetricsTimeSeries
getOriginDestinationMatrix getOriginDestinationMatrixTimeSeries
getFuelPointAnalytics getFuelPointAnalyticsTimeSeries
getModeledVehicleDistanceTraveled getModeledVehicleDistanceTraveledTimeSeries
getStopAnalytics getStopAnalyticsTimeSeries
getVehicleDistanceTraveled getVehicleDistanceTraveledTimeSeries
getZoneClosedOriginDestinationMatrix getZoneClosedOriginDestinationMatrixTimeSeries
Previous
API Requests Examples

On this page

Logo Footer
Logo Footer

Altitude

Log into Altitude PortalAltitude.geotab.comAltitude Help Center

Learn Altitude

Altitude User GuideAltitude API GuideData DictionaryWhat's New

Support

FAQContact Us
Privacy PolicyTerms & Conditions
© Geotab 2010-2026
Altitude LogoHelp Center
User GuideAPI GuideData DictionaryFAQContact Us
Handling Special CasesAPI Requests ExamplesHow to Retrieve Time Series Results