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
{ "origins": [0, 1, 2, 3], "destinations": [4, 5, 6, 7, 8], "vias": [10]}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
{ "bucketInterval": 1, "unit": "HOUR", "histogram": { "4": 6, "5": 15, "6": 52, "7": 148, "8": 568, "9": 10766, "10": 39039, "11": 41573, "12": 44617, "13": 44866, "14": 44537, "15": 48869, "16": 49014, "17": 48767, "18": 47713, "19": 40060 }}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 |