GuidesAPI Reference
Guides

How to get weather alerts for a single car location

This section provides an example of a request to get actual weather warnings for single location (car position) and a width (circular area).

📘

Note

Each request is authenticated and requires a valid bearer token to be included in HTTP Authorization header. For more information about obtaining credentials, see the Identity and Access Management Developer Guide.

Request

The code block below demonstrates the complete request.

GET /weather/2.0/alerts?lat=51.2885&lon=11.0653&width=15000 HTTP/1.1
Host: weather.cc.api.here.com
Authorization: Bearer eyJhbGceOyJSAMPLEiIsImN0eSISAMPLEt7VTFIllwIM0cKNCjN2WCCTqlwEEmk-t3gx1BpqUFoeBSAMPLEvhj8nl-RBGcyoljY...
Cache-Control: no-cache
Accept: application/json

Response

In case of a successfull request the HTTP status code is 200 and the payload of the response contains an all weather alerts that affects the specified route.

Sample response on the map can looks like this: Weather alerts for car location with circle diameter 15 km The circular area and all alerts that intersects this area are displayed.