queryType: getSavedAnalyses*
The getSavedAnalyses queryType is passed to the API to get a list of analyses that have been run on your database in the past.
Note:
See Special Case APIs for more information.
The data returned will be basic information about the analysis. Each record will have a jobId that you can then pass to getSavedResults to get the results/data for that analysis.
Parameters
These parameters should be passed to the functionParameters object regardless of which method you choose to make an API request.
| Parameter | Description | Type | Defined Value Set | Value Req'd |
|---|---|---|---|---|
| queryType | Must equal "getSavedAnalyses". | STRING | "getSavedAnalyses" | Y |
| analysisJobIds | An array of strings representing analysis job ids. Pass the job id of a previous analysis to get back the results of just that analysis. Pass an empty array or omit the parameter to return all. | ARRAY | - | N |
| analysisTypes | An array of queryTypes representing the saved analyses you want returned. Currently it must be “getOriginDestinationMatrix”, “getRouteAnalysis”, “getODSegmentAnalysis”, “getStopanalytics”, getVehicleDistanceTravelled”, “getDemandGeneration”, “getIdleMetrics”, ”getModeledVehicleDistanceTraveled”, "getDemandGenerationTimeSeries",
"getFuelEconomyTimeSeries",
"getIdleMetricsTimeSeries",
"getModeledVehicleDistanceTraveledTimeSeries",
"getObservedCountsTimeSeries",
"getOriginDestinationMatrixTimeSeries",
"getVehicleDistanceTraveledTimeSeries",or “getObservedCounts” . Pass an empty array or omit the parameter to return all types | ARRAY | “getOriginDestinationMatrix”, “getRouteAnalysis”, “getODSegmentAnalysis”, “getStopAnalytics”, "getVehicleDistanceTravelled”, “getDemandGeneration”, “getIdleMetrics”, "getModeledVehicleDistanceTraveled”,"getDemandGenerationTimeSeries",
"getFuelEconomyTimeSeries",
"getIdleMetricsTimeSeries",
"getModeledVehicleDistanceTraveledTimeSeries",
"getObservedCountsTimeSeries",
"getOriginDestinationMatrixTimeSeries",
"getVehicleDistanceTraveledTimeSeries", or “getObservedCounts”. | N |
| createdByList | An array of userNames representing who ran the analysis originally. Pass an empty array or omit the parameter to return all | ARRAY | - | N |
| statuses | An array of values representing whether you want active (1), archived (0) or all analyses. Pass an empty array or omit the parameter to return all. Note that users have the ability to archive saved analyses in the UI | ARRAY | 0 or 1 | N |
Responses
| Code | Type | Description |
|---|---|---|
| 200 | JSON | The requested data. |
| 401 | JSON | Occurs for various unauthorized tasks, such as not providing credentials in your parameters. |
| 500 | JSON | Occurs if an internal server error occurs. Contact altitudesupport@geotab.com if this occurs. |
Response Schema
| Attribute | Description | Data Type | Defined Value Set |
|---|---|---|---|
| AnalysisName | The name of the analysis. Defaults to date and userName, but can be changed via the UI. | STRING | - |
| AnalysisLabels | Array of strings representing analysis label names associated with the analysis. | ARRAY | - |
| AnalysisLabelIds | Array of strings representing analysis label ids associated with the analysis. | ARRAY | - |
| AnalysisMetadata | Any additional metadata associated with this analysis, formatted as a JSON string. | STRING | - |
| AnalysisType | The queryType of the saved analysis. | STRING | - |
| CallSource | Where the analysis was run from. | STRING | “API” or “Application” |
| Comments | Any comments added to the analysis via the UI. | STRING | - |
| CreatedBy | userName of the person who ran the analysis. | STRING | - |
| CreatedTimestamp | Timestamp for when the analysis was created. | TIMESTAMP | - |
| Database | Name of the database where the analysis was run. | STRING | - |
| JobId | The unique id of the analysis. Can be passed to getSavedResults to get the results of the analysis. | STRING | - |
| ModifiedBy | The userName of the person who last modified the analysis. | STRING | - |
| ModifiedTimestamp | Timestamp for when the analysis was modified. | TIMESTAMP | - |
| Parameters | A JSON string of parameters that were used to generate the analysis. | STRING | - |
| Status | 1 for active analyses, 0 for archived analyses (can archive via the UI) | INTEGER | 0- Active,1- Archived |
Sample parameters
{
"analysisTypes":[],
"queryType":"getSavedAnalyses",
"statuses":[1]
}