Destination Weather API Developer's Guide

Report

This resource retrieves weather reports, weather forecasts, severe weather alerts and moon and sun rise and set information.

Requests against this resource use the HTTP GET method. The report criteria are specified by means of query parameters, which must include a report product and a location.

A location can be defined by one of the following parameters:

  • latitude and longitude – geographical coordinates indicating the location for which to obtain a report; the response is for the closest locations to these coordinates
  • name – name of a city, town or location for which to obtain a report
  • zipcode – ZIP code of the area for which to obtain a report covers

Each search request must conform to the following pattern:

.../weather/1.0/report.{format}?{parameter}={value}...

Request Example

The code block below shows a report request that specifies the report product as observation and uses a city name (name) to define the search area:

https://weather.cc.api.here.com/weather/1.0/report.xml
&product=observation&name=Berlin
-H "Authorization: Bearer {YOUR_TOKEN}"
Note: This example uses a HERE token to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

Request Parameters

The table below documents both mandatory and optional request parameters supported by the report resource.

Parameter Required Description
app_id - legacy Yes

xs:string

A 20-byte Base64 URL-safe encoded string used in one of the available authentication options for the Destination Weather API.

If you use the app ID/app code option, you need to include an app_id and app_code with every request. For more information on authentication, see the Identity & Access Management Developer Guide.

app_code - legacy Yes

xs:string

A 20-byte Base64 URL-safe encoded string used for the authentication of the client application.

If you use the app ID/app code option, you need to include an app_id and app_code with every request. For more information on authentication, see the Identity & Access Management Developer Guide.

product Yes

A parameter identifying the type of report to obtain.

The possible values are as follows:

  • observation – current weather conditions from the eight closest locations to the specified location
  • forecast_7days – morning, afternoon, evening and night weather forecasts for the next seven days.
  • forecast_7days_simple – daily weather forecasts for the next seven days
  • forecast_hourly – hourly weather forecasts for the next seven days
  • forecast_astronomy – information on when the sun and moon rise and set, and on the phase of the moon for the next seven days
  • alerts – forecasted weather alerts for the next 24 hours
  • nws_alerts – all active watches and warnings for the US and Canada
latitude and longitude latitude and longitude, name or zipcode must be present

Geographical coordinates in WGS-84-compliant format, specifying the area covered by the weather report. For example, latitude=41.83&longitude=-87.68 requests a report for these coordinates.

The response is for the closest reporting stations to these coordinates.

name latitude and longitude, name or zipcode must be present

Name of a city. If there is more than one match for the name, then the most populous location is in the response. Country, state and street name can be added to this parameter.

For example, the response for name=Berlin, USA is a report for the city of Berlin, New Hampshire, the response for name=Berlin, IL is a report for the city of Berlin, Illinois, and the response for name=Berlin is a report for the city of Berlin, Germany.

zipcode latitude and longitude, name or zipcode must be present

ZIP code of the location.

This parameter is supported only for locations in the United States of America.

hourlydate No

Date for which hourly forecasts are to be retrieved. The format is YYYY-MM-DD or YYYY-MM-DDThh:mm:ss

Available only when the product parameter is set to forecast_hourly

If you set hourlydate for a date and time in the past or more than seven days in the future, the response does not contain any information. If you set hourlydate to the current date, the response contains hourly forecasts for the current date, including some forecasts before when you sent the query depending on the data in the system. If you set hourlydate to a future date, the response contains hourly forecasts for the entire day.

oneobservation No

Boolean, if set to true, the response only includes the closest location.

Only available when the product parameter is set to observation.

Default: false

language No

Defines the language used in the descriptions in the response. For example, the response for a query with language=german has descriptions in German.

For a list of the supported languages, see Supported Languages.

If the language specified is not supported, the response contains descriptions in English.

Default: english

metric No

Boolean, defines whether metric or imperial units are used in the response.

If set to false, the response contains imperial units (feet, inch, Fahrenheit, miles).

Default: true

politicalView No

String.

Specify the political view. Available territories will be seen through the point of view of this country. If this parameter is not specified the neutral international view is made available, where territories may have unresolved claims.

This parameter accepts single ISO 3166-1 alpha-3 country code. The country codes are to be provided in all uppercase.

Currently the only supported political view is CHN

For any political view that is unsupported, falls back to the default view. For example, politicalView=USA or politicalView=FRA does not impact a response in any way.

Response to this Request

For the response to weather report requests, see Report Response.