Analysis Partial Histogram Result
Required parameters
Required parameters | Description |
---|---|
| The base URL for calling TomTom services. Value: |
| Version of the service to call. Value: The current value is |
| Analysis number id. Value: The analysis number id. |
| Authorization key for access to the API. Value: Your valid API Key. |
| Index of the date range. Value: Example: |
| Index of the time range. Value: Example: |
| Type of the histogram. Values: One of the following values:
|
Request POST body example
1{2 "origins": [0, 1, 2, 3],3 "destinations": [4, 5, 6, 7, 8],4 "vias": [10]5}
Request POST body stucture
Field | Description |
---|---|
| List of regions' indexes where trips started. |
| List of regions' indexes where trips ended. |
| List of regions' indexes where trips went through. |
Required POST headers
Header | Value |
---|---|
|
Response data
This response will return an array where each index is histogram's bucket with information about the number of trips which started in a given origin, went through given vias, and ended in given destinations. The array size depends on the histogram type you choose.
Response example
1{2 "bucketInterval": 1,3 "unit": "HOUR",4 "histogram": {5 "4": 6,6 "5": 15,7 "6": 52,8 "7": 148,9 "8": 568,10 "9": 10766,11 "10": 39039,12 "11": 41573,13 "12": 44617,14 "13": 44866,15 "14": 44537,16 "15": 48869,17 "16": 49014,18 "17": 48767,19 "18": 47713,20 "19": 4006021 }22}
Response structure
A sample response for an HOURS_OF_DAY histogram contains the following data. Each value of histogram pairs is:
- A number of trips which started in given origins.
- Went through given vias.
- Ended in given destinations for the given hour.
Response types
Type | Size of array |
---|---|
| 24 |
| No limitation (contains all durations buckets for minimal interval of 5 minutes). |
| No limitation (contains all length buckets for minimal interval of 1 kilometer). |
| No limitation (contains all average speed buckets for a minimal interval of 1 kilometer per hour). |
Errors
If there is an error in the supplied parameters or any other internal problem, an error response is generated in the requested format.
Response codes
Code | Meaning & possible causes |
---|---|
| Created |
| Bad request |
| Unauthorized |
| Forbidden |
| Not Found |