How to construct a request to the HERE Destination Weather API v1
A request to the HERE Destination Weather API v1 includes the basic elements shown in the following table and resource-specific parameters.
Standard - Construct a request
Construct a request with the standard HERE Destination Weather API.
Basic request elements
| Element | Value/Example | Description |
|---|---|---|
| Base URL | https://weather.cc.api.here.com | Production environment |
| Path | /weather/1.0/ | |
| Resource | Report | Uses HTTP GET |
| Format specifier | .xml or .json | We recommend that you specify whether you expect XML or JSON output. The default output format is XML. |
| Parameters | product or name | For more information on query parameters in general, see the sub-sections under Resources. |
| Application Id - Legacy | &app_id=[app-id]DemoCredForAutomotiveAPI | Substitute your own unique app_id. For more details on authentication, see the Identity and Access Management Developer Guide. |
| Application Code - Legacy | &app_code=[app-code]JZlojTwKtPLbrQ9EGznlA | Substitute your own unique app_code. For more details on authentication, see the Identity and Access Management Developer Guide. |
| API key | &apiKey=[apiKey]JZlojTwKtPLbrQ9EGznlA | Substitute your own unique apiKey. For more details on authentication, see the Identity and Access Management Developer Guide. |
| Authorization Header | -H "Authorization: Bearer {YOUR_TOKEN}" | For more information on authentication, see the Identity and Access Management Developer Guide. |
Premium - Construct a request
A request to the premium HERE Destination Weather API includes the basic elements shown in the following table and resource-specific parameters.
Basic request elements
| Element | Value/Example | Description |
|---|---|---|
| Base URL | https://weather.cc.api.here.com | Production environment |
| Path | /weather/2.0/ | |
| Resource | tile/{zoom}/{x}/{y}/{layer_id} alerts alerts | Uses HTTP GET Uses HTTP GET Uses HTTP POST |
| Parameters (example) | lat=52.13&lon=13.56 | Get alerts for single car location defined by latitude and longitude |
| Body payload (alerts POST only) | { "route":"60.91,27.51;60.91,27.45;60.91,27.37", "width":2000 } | Route defined as latitude, longitude pair and optionaly width of corridor along the route in meters |
| Authorization Header | Authorization: Bearer <token> | For more information on authentication, see the Identity and Access Management Developer Guide. |
Updated 14 days ago