Weatherbit Historical Degree Day API API
The Historical Degree Day API API from Weatherbit — 1 operation(s) for historical degree day api.
The Historical Degree Day API API from Weatherbit — 1 operation(s) for historical degree day api.
openapi: 3.0.1
info:
title: Weatherbit - Interactive Swagger UI Documentation 16 Day / Daily Forecast Historical Degree Day API API
description: This an interactive version of the documentation for the Weatherbit API. The base URL for the API is [http://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/) or [https://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/). Below is the Swagger UI documentation for the API. All API requests require the `key` parameter. An Example for a 48 hour forecast for London, UK would be `http://api.weatherbit.io/v2.0/forecast/hourly?lat=51.5072`&`lon=-0.1276`. See our [Weather API description page](https://www.weatherbit.io/api) for the full documentation.
version: 2.0.0
servers:
- url: https://api.weatherbit.io/v2.0
- url: http://api.weatherbit.io/v2.0
tags:
- name: Historical Degree Day API
paths:
/history/energy:
get:
tags:
- Historical Degree Day API
summary: Weatherbit Returns Energy API Response - Given a Single Lat/lon.
description: Returns aggregate energy specific historical weather fields, over a specified time period. See https://www.weatherbit.io/api for API specific rate limits.
parameters:
- name: lat
in: query
description: Latitude component of location.
required: true
schema:
type: number
format: double
example: 74.69
- name: lon
in: query
description: Longitude component of location.
required: true
schema:
type: number
format: double
example: 61.34
- name: start_date
in: query
description: Start Date (YYYY-MM-DD or YYYY-MM-DD:HH).
required: true
schema:
type: string
format: string
example: example-value
- name: end_date
in: query
description: End Date (YYYY-MM-DD or YYYY-MM-DD:HH).
required: true
schema:
type: string
format: string
example: example-value
- name: tp
in: query
description: Time period to aggregate by (daily, monthly)
schema:
type: string
format: string
enum:
- hourly
- daily
- monthly
example: monthly
- name: threshold
in: query
description: 'Temperature threshold to use to calculate degree days (default 18 C) '
schema:
type: number
format: double
example: 22.57
- name: units
in: query
description: Convert to units. Default Metric See <a target='blank' href='/api/requests'>units field description</a>
schema:
type: string
format: string
enum:
- S
- I
example: S
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
'200':
description: An Energy Data Object.
content:
application/json:
schema:
$ref: '#/components/schemas/EnergyObsGroup'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
EnergyObs:
type: object
properties:
city_name:
type: string
description: City name (closest)
example: Raleigh
state_code:
type: string
description: State abbreviation
example: NC
country_code:
type: string
description: Country abbreviation
example: US
timezone:
type: string
description: Local IANA time zone
example: America/New_York
lat:
type: number
description: Latitude
example: 38.0
lon:
type: number
description: Longitude
example: -78.25
station_id:
type: string
description: Nearest Station ID [DEPRECATED]
example: 12345-999999
sources:
type: array
description: List of data sources used in response
items:
type: string
example: 12345-89083
cdd:
type: number
description: Cooling degree days
example: 10.0
hdd:
type: number
description: Heating degree days
example: 120.0
rh:
type: integer
description: Average Relative humidity (%)
example: 75
dewpt:
type: number
description: Average dew point temperature - Default (C)
example: 12.0
wind_dir:
type: integer
description: Average wind direction (Degrees)
example: 125
wind_spd:
type: number
description: Average wind speed - Default (m/s)
example: 5.85
temp:
type: number
description: Average temperature - Default (C)
example: 13.85
clouds:
type: integer
description: Average cloud cover (%)
example: 42
t_ghi:
type: number
description: Total global horizontal solar irradiance (W/m^2)
example: 3000.0
t_dhi:
type: number
description: Total diffuse horizontal solar irradiance (W/m^2)
example: 450.0
t_dni:
type: number
description: Total direct normal solar irradiance (W/m^2)
example: 1200.0
sun_hours:
type: number
description: 'Average number of daily sun hours - # hours where Solar GHI > 1000 W/m^2'
example: 4.5
precip:
type: number
description: Total precipitation in period - Default (mm)
example: 2.0
snow:
type: number
description: Total snowfall in period - Default (mm)
example: 10.0
EnergyObsGroup:
type: object
properties:
count:
type: integer
description: Count of found observations
example: 1
start_date:
type: integer
description: Start Date
end_date:
type: integer
description: End Date
data:
type: array
items:
$ref: '#/components/schemas/EnergyObs'