{"openapi":"3.0.0","info":{"title":"DTN Weather Conditions API","version":"2.0.0","x-logo":{"url":"https://www.dtn.com/wp-content/uploads/2019/03/dtn-logo-tag.png","altText":"https://www.dtn.com"},"description":"# Introduction\nWelcome to DTN’s Weather Conditions API – the gateway to global historical, current, and forecast atmospheric weather conditions. This API caters to a wide range of users, including:\n * Scientists engaged in environmental research\n * Airlines optimizing routes and schedules\n * Event planners enhancing weather safety measures\n * Retailers adjusting inventory and marketing strategies\n * Software developers building weather applications\n\n\n**Key features:** The Weather Conditions API provides a time series of historical, current, and forecast atmospheric weather parameters, including temperature, wind, precipitation, and more. It leverages state-of-the-art cloud technology and DTN's extensive global forecast models. The data is continuously validated, calibrated, and enhanced.\n\n**Conditions at a location:** For simplicity, the API provides a single endpoint for historical, current, and forecast data. Specify a location, the weather parameters of interest, and a time range up to 15 days long, from 1995-01-01T00:00:00Z to 15 days in the future. The API responds with the requested time series in GeoJSON format for easy parsing.\n\nThe interactive documentation that follows is a guide to setting up requests, understanding responses, and leveraging all the features of DTN’s Weather Conditions API.\n# Getting Started\n## Obtaining credentials\nTo get started, all users need their own client ID and client secret. Please contact an account manager or the [DTN sales team](https://www.dtn.com/contact-us/) to obtain these. Then, review the `Authentication` section to learn how to request an API access token. Do not share or use others' API credentials, since doing so may compromise information security.\n\n## Making requests\nThere are multiple ways to make an initial API request:\n\n**1. Interactive documentation:** Navigate to the `Authentication` section on this page, insert credentials to obtain an access token, then explore the API endpoints described in the `Endpoints` section.\n\n**2. Postman collection:** For a hands-on approach, consider downloading the Postman collection and environment from the top of this page. Insert credentials and start testing the API in Postman's interactive application.\n\n**3. Writing code:** Ready to start coding? Try the Python example below, replacing `client_id` and `client_secret` with proper credentials. This invokes the Conditions endpoint with a GET request and prints the response.\n\n```python\n import requests\n import urllib\n\n #--- Obtain an API access token ---\n\n auth_url = 'https://api.auth.dtn.com/v1/tokens/authorize'\n\n body = {\n 'grant_type': 'client_credentials',\n 'client_id': '...insert your client id here...',\n 'client_secret': '...insert your client secret here...',\n 'audience': 'https://weather.api.dtn.com/conditions'\n }\n response = requests.post(auth_url, json=body)\n access_token = response.json()['data']['access_token']\n\n #--- Invoke the API ---\n\n api_base_url = 'https://weather.api.dtn.com/v2'\n query_parameters = urllib.parse.urlencode({\n \"lat\": 35.47,\n \"lon\": -97.51,\n \"startTime\": \"2023-10-01T00:06:10Z\",\n \"endTime\": \"2023-10-14T00:06:10Z\",\n })\n endpoint = '/conditions?' + query_parameters\n\n headers = {'Authorization': 'Bearer ' + access_token}\n response = requests.get(api_base_url + endpoint, headers=headers)\n\n #--- Print the response ---\n\n print(response.json())\n```"},"servers":[{"url":"https://weather.api.dtn.com"}],"tags":[{"name":"Endpoints","description":"The Weather Conditions API has 2 endpoints that each cater to a specific need, whether it's the time series at a single location, or the associated metadata."},{"name":"Parameters","description":"Weather Conditions API offers 3 categories of atmospheric weather parameters (forecast, current, and historical) that provide detailed insights for planning future operations or analyzing past weather patterns. The `startDate` and `endDate` on an API request determine which cateogory applies. Requests that span past-to-current, current-to-future, or past-to-future may specify parameters from any category. In these cases, the response provides numerical data where it is available and `null` where it is not.\n\nIt’s also possible to aggregate certain parameters in each category over multiple hours. The tables that follow identify which parameters have corresponding aggregation parameter names. To request an aggregation, just substitute the desired parameter name and specify an `interval` greater than 1 hour (see `Endpoints` section for details). For example, if air temperature (`airTemp`) has corresponding parameters `airTempMax`, `airTempMin`, and `airTempAvg`, request parameter `airTempAvg` with `interval=6h` in the query string to obtain the 6-hour air temperature average. Parameters can also be interpolated in subhourly intervals. To request interpolated parameters, specify an `interval` of 5m, 10m, 15m, 20m, or 30m. Parameters will be interpolated differently depending on the measurement unit they represent. See `Endpoints` section for details. \n## Forecast Parameters\nForecast parameters provide predictive atmospheric weather data for up to 15 days in the future. Expand the table below to view available parameters and each one's description, unit of measurement, and whether it is a default. The API returns only defaults unless specific parameters are requested.\n\nParameter description with `*` indicates uncertainity parameters. Refer to `uncertainity parameters` section below.\n\n Click to expand...
\n\n| Parameter | Core | Description | Metric units | Imperial units | Aggregation Parameters |\n|-----------------------------------------|---------|-------------|--------------|----------------|------------------------|\n| airDensity | | Air density at 10 metres above ground. | kilogram per cubic meter | kilogram per cubic meter | |\n| airTemp | Yes | Air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit | airTempMax, airTempMin, airTempAvg |\n| airTempConfidence | | Air temperature forecast confidence at 2 meters above ground level. very_low - 0, low - 1, medium - 2, high - 3, very_high - 4 | unitless | unitless | airTempConfidenceAvg |\n| airTempLowerBound | | Lowest forecasted air temperature at this time across all contributing forecast models in our blend.* | degree Celsius | degree Fahrenheit | |\n| airTempNearGround | | Air temperature at 10 centimeters above ground level. | degree Celsius | degree Fahrenheit | airTempNearGroundMax, airTempNearGroundMin, airTempNearGroundAvg |\n| airTempProbAtOrBelowFreezing | | Probability that air temperature at 2 meters above ground level is less than or equal to 0° Celsius. | percentage | percentage | |\n| airTempUpperBound | | Highest forecasted air temperature at this time across all contributing forecast models in our blend.* | degree Celsius | degree Fahrenheit | |\n| airQualityIndex | | Overall air quality index representing combined pollution levels and general air health. | unitless| unitless| airQualityIndexMax, airQualityIndexMin, airQualityIndexAvg |\n| airQualityIndexCO | | Air quality index specifically reflecting the concentration of carbon monoxide (CO) in the air. |unitless| unitless| airQualityIndexCOMax, airQualityIndexCOMin, airQualityIndexCOAvg |\n| airQualityIndexNO2 | | Air quality index for nitrogen dioxide (NO₂), indicating pollution typically from traffic and combustion sources. | unitless| unitless| airQualityIndexNO2Max, airQualityIndexNO2Min, airQualityIndexNO2Avg |\n| airQualityIndexOzone | | Air quality index for ground-level ozone (O₃), often higher during sunny conditions and linked to smog. | unitless| unitless| airQualityIndexOzoneMax, airQualityIndexOzoneMin, airQualityIndexOzoneAvg |\n| airQualityIndexPM25 | | Air quality index for fine particulate matter (PM2.5), which can penetrate deep into the lungs and affect health. | unitless| unitless| airQualityIndexPM25Max, airQualityIndexPM25Min, airQualityIndexPM25Avg |\n| airQualityIndexPM10 | | Air quality index for coarse particulate matter (PM10), including dust and pollen particles. | unitless| unitless| airQualityIndexPM10Max, airQualityIndexPM10Min, airQualityIndexPM10Avg |\n| airQualityIndexSO2 | | Air quality index for sulfur dioxide (SO₂), typically associated with industrial emissions and fossil fuel combustion. | unitless| unitless| airQualityIndexSO2Max, airQualityIndexSO2Min, airQualityIndexSO2Avg |\n| boundaryLayerHeight | | Height above ground level of the lowest layer of the troposphere where wind is influenced by friction. | meter | feet |\n| cape | | Amount of convective available potential energy. | joule per kilogram | joule per kilogram |\n| ceiling | | The height above the Earth's surface of the base of the lowest layer of cloud with a covering of more than 50% of the model grid box. Cloud ceiling is a measurement used in the aviation industry to indicate airport landing conditions. | meter | feet |\n| cin | | Amount of convective inhibition. | joule per kilogram | joule per kilogram |\n| cloudBaseHeight | | Height of the base of the lowest cloud layer regardless of the amount of cloud. See parameter ceiling for the lowest layer with over 50% of coverage. | meters | feet | |\n| conditionalPrecipProbFreezing | | Conditional probability of precipitation as freezing rain. | percentage | percentage | conditionalPrecipProbFreezingMax |\n| conditionalPrecipProbFrozen | | Conditional probability of precipitation as snow. | percentage | percentage | conditionalPrecipProbFrozenMax |\n| conditionalPrecipProbLiquid | | Conditional probability of precipitation as rain. | percentage | percentage | conditionalPrecipProbLiquidMax |\n| conditionalPrecipProbRefrozen | | Conditional probability of precipitation as sleet and/or ice pellets. | percentage | percentage | conditionalPrecipProbRefrozenMax |\n| convectivePrecipAmount | | Total (liquid equivalent) accumulation of convective precipitation over the next hour. | millimeter | inch | convectivePrecipAmountSum |\n| dewPoint | Yes | Dew point temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit | dewPointMax, dewPointMin, dewPointAvg |\n| effectiveCloudCover | Yes | Weighted sum of low, medium, and high cloud cover percentage. | percentage | percentage | effectiveCloudCoverMax, effectiveCloudCoverMin, effectiveCloudCoverAvg |\n| feelsLikeTemp | Yes | Apparent temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit | feelsLikeTempMax, feelsLikeTempMin, feelsLikeTempAvg |\n| fogProb | | The probability of fog (visibility < 100 m) being present. | percentage | percentage | fogProbMax |\n| freezingLevel | | Freezing Level at height where temperature reaches 0°C | meter | feet |\n| frictionVelocity | | Frictional velocity near the surface. | meters per second | miles per hour |\n| globalRadiation | Yes | Total mean incoming solar radiation received on the Earth's surface, combining both direct sunlight and diffuse sky radiation over the past hour. | joule per square centimeter | joule per square centimeter | globalRadiationSum |\n| heatIndex | | Heat index at 2 meters above ground level. | degree Celsius | degree Fahrenheit | |\n| hotDryWindyIndex | | Designed to help users determine which days are more likely to have adverse atmospheric conditions that make it more difficult to manage a wildland fire. It combines weather data from the surface and low levels of the atmosphere into a first-look product. | hectopascal meter per second | hectopascal meter per second | |\n| iceAccretionAmount | | Amount of ice build-up on surfaces exposed to freezing precipitation over past one hour. | millimeter | inch | iceAccretionAmountSum |\n| iceLweAmount | | Ice liquid water equivalent precipitation amount in the past hour, this is the precipitation amount that occurs when the precipitation falls as sleet or ice pellets. | millimeter | inch |\n| lapseRate2mTo80m | | Change in air temperature with height from 2 to 80 meters above ground level. | degree Celsius per meter | degree Fahrenheit per foot |\n| liftedIndexTo500hpa | | Temperature difference between the environment and an air parcel lifted adiabatically to 500 hPa. Negative values occur in unstable conditions. | degree Celsius | degree Fahrenheit |\n| lightningDensity | | Lightning flash density averaged over previous 1 hour. | square kilometer per day | square mile per day | |\n| lightningProb | | Specifies the probability of lightning occurring at a given latitude and longitude. | percentage | percentage | |\n| liquidPrecipAmount | | Total (liquid equivalent) accumulation of precipitation from rain, drizzle, freezing rain, and freezing drizzle over the past hour.| millimeter | inch | liquidPrecipAmountSum |\n| localOffsetHours | | The number of hours to add or subtract from the UTC timestamp in the response to obtain local time (accounting for Daylight Saving Time) at the requested latitude and longitude. | Number of hours | Number of hours | |\n| localTimezoneOlson | | The Olson time zone name at the requested latitude and longitude. | Name of the timezone | Name of the timezone | |\n| longWaveRadiation | | Downwelling longwave (non-solar) radiation flux at the surface of the earth. | watt per square meter| watt per square meter| longWaveRadiationMax, longWaveRadiationMin, longWaveRadiationAvg |\n| mslPressure | Yes | Air pressure at mean sea level. | hectopascal | millibar | mslPressureMax, mslPressureMin, mslPressureAvg |\n| mslPressureLowerBound | | Lowest forecasted air pressure at mean sea level at this time, across all contributing models in our blend.* | hectopascal | millibar | |\n| mslPressureUpperBound | | Highest forecasted air pressure at mean sea level at this time, across all contributing models in our blend.* | hectopascal | millibar | |\n| potentialEvapotranspirationAmount | | Total accumulated loss of water through evapotranspiration over one hour from a hypothetical reference crop, assuming that ample water is available using FAO Penman-Monteith equation. | millimeter | inch | potentialEvapotranspirationAmountSum |\n| precipAmount | Yes | Total (liquid equivalent) accumulation of precipitation over the past hour. | millimeter | inch | precipAmountSum |\n| precipAmountMax | | Maximum total (liquid equivalent) accumulation of precipitation over the past hour, across all contributing forecast models in our blend.* | millimeter | inch | |\n| precipAmountMin | | Minimum total (liquid equivalent) accumulation of precipitation over the past hour, across all contributing forecast models in our blend.* | millimeter | inch | |\n| precipDuration | | Total (liquid equivalent) duration of precipitation over the next hour. | second | second | precipDurationMax, precipDurationMin, precipDurationSum |\n| precipProb | Yes | Probability of precipitation over the next hour. | percentage | percentage | precipProbMax |\n| precipType | |Numerical code identifying the precipitation type over the next hour, when there's a probability of precipitation (1 = snow, 2 = rain, 3 = rain and snow, 4 = freezing rain, 5 = sleet, 6 = drizzle, 7 = freezing drizzle, 8 = thunderstorms). | unitless | unitless | |\n| relativeHumidity | Yes | Relative humidity at 2 meters above ground level. | percentage | percentage | relativeHumidityMax, relativeHumidityMin, relativeHumidityAvg |\n| relativeHumidityLowerBound | | Lowest forecasted relative humidity at this time, across all contributing models in our blend.*| percentage | percentage | |\n| relativeHumidityUpperBound | | Highest forecasted relative humidity at this time, across all contributing models in our blend.*| percentage | percentage | |\n| severeWeather | | Numerical index indicating the threat of severe weather (below 125 = low, 125-250 = medium, above 250 = high). | unitless | unitless | |\n| shortWaveRadiation | Yes | Also called Global Horizontal Irradiance (GHI), this is the instantaneous high-energy solar radiation received at the Earth's surface, including both direct (DNI) and diffuse (DHI) sunlight. | watt per square meter| watt per square meter| shortWaveRadiationMax, shortWaveRadiationMin, shortWaveRadiationAvg |\n| skinTemp | | Temperature of the uppermost layer of the Earth’s surface. | degree Celsius | degree Fahrenheit | skinTempMax, skinTempMin, skinTempAvg |\n| snowFactor | | Describes the amount of snowfall that results from a given amount of liquid precipitation. | unitless | unitless | |\n| snowfallAmount | | Total accumulation of snow (measured as depth, not liquid equivalent), over the past hour. | millimeter | inch | snowfallAmountSum |\n| snowLweAmount | | Total accumulation of snow in liquid water equivalent over the past hour. | millimeter | inch |\n| soilMoisture0to10cm | | Total moisture content of the layer between the surface and the 10-cm depth. | millimeter | inch | soilMoisture0to10cmAvg|\n| sunshineDuration | Yes | Duration of sunshine based on cloud cover and downwelling shortwave radiation over the past hour. | minute | minute | sunshineDurationSum |\n| surfacePressure | Yes | Pressure that the air exerts on the surface of the earth. | hectopascal | millibar | surfacePressureMax, surfacePressureMin, surfacePressureAvg |\n| totalCloudCover | Yes | Represents the percentage of the sky covered by clouds. It can range from 0% (clear sky) to 100% (completely overcast). | percentage | percentage | totalCloudCoverMax, totalCloudCoverMin, totalCloudCoverAvg |\n| totalTotalsIndex | | Meteorological index used to assess the potential for thunderstorm development and severity. | Kelvin | Kelvin | |\n| uvIndex | | Indicates the strength of ultraviolet (UV) radiation from the sun. | unitless | unitless | |\n| uWind | | Measures the east-west component of wind. Positive values indicate wind from the west, and negative values indicate wind from the east. | meter per second | mile per hour | uWindMax, uWindMin, uWindAvg |\n| visibility | Yes | Lateral distance until line-of-sight is obstructed due to weather conditions. | kilometer | mile | visibilityMax, visibilityMin, visibilityAvg |\n| visibilityObstructionType | | Numerical code identifying the cause of obstructed visibility (0 = not applicable, 1 = none, 2 = fog, 3 = blowing snow, 4 = blowing dust, 5 = haze, 6 = smoke, 7 = patchy fog, 8 = blowing sand, 9 = ice fog, 10 = dust). | unitless | unitless | |\n| vWind | | Measures the north-south component of wind. Positive values indicate wind from the south, and negative values indicate wind from the north. | meter per second | mile per hour | vWindMax, vWindMin, vWindAvg |\n| weatherCode | Yes | Numerical code summarizing the weather conditions. See `Weather Codes and Icons` section. | unitless | unitless | weatherCode |\n| wetBulbDepression | | The difference between air temperature and wet bulb temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit | |\n| wetBulbGlobeTemperature | | Wet Bulb Globe Temperature (WBGT) measures heat stress in direct sunlight based on temperature, humidity, wind speed, sun angle, and cloud cover. | degree Celsius | degree Fahrenheit | wetBulbGlobeTemperatureMax, wetBulbGlobeTemperatureMin, wetBulbGlobeTemperatureAvg |\n| wbgtProbAtOrAboveHeatCategory3 | | Probability that Wet Bulb Globe Temperature (WBGT) is greater than or equal to 85° Fahrenheit, the threshold for Heat Category 3 in the Occupational Safety and Health Administration (OSHA) [heat stress guidelines for manual labor](https://ksi.uconn.edu/wet-bulb-globe-temperature-monitoring/). | percentage | percentage | |\n| windChill | | Wind chill at 2 meters above ground level. | degree Celsius | degree Fahrenheit | windChillMax, windChillMin, windChillAvg |\n| windDirection | Yes | Specifies the direction from which the wind is blowing at 10 meters above the ground, measured in degrees with respect to true north. | degree | degree | windDirectionAvg |\n| windDirection2m | | Specifies the direction from which the wind is blowing at 2 meters above the ground, measured in degrees with respect to true north. | degree | degree | windDirection2mAvg |\n| windDirection50m | | Specifies the direction from which the wind is blowing at 50 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection50mAvg |\n| windDirection100m | | Specifies the direction from which the wind is blowing at 100 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection100mAvg |\n| windDirection150m | | Specifies the direction from which the wind is blowing at 150 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection150mAvg |\n| windDirection200m | | Specifies the direction from which the wind is blowing at 200 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection200mAvg |\n| windGust2m | | Wind gust speed at 2 meters above ground level. | meter per second | mile per hour | windGust2mMax, windGust2mMin, windGust2mAvg |\n| windGust | Yes | Wind gust speed at 10 meters above ground level.| meter per second | mile per hour | windGustMax, windGustMin, windGustAvg |\n| windGust50m | | Wind gust speed at 50 meters above ground level. | meter per second | mile per hour | windGust50mMax, windGust50mMin, windGust50mAvg |\n| windGust100m | | Wind gust speed at 100 meters above ground level. | meter per second | mile per hour | windGust100mMax, windGust100mMin, windGust100mAvg |\n| windGust150m | | Wind gust speed at 150 meters above ground level. | meter per second | mile per hour | windGust150mMax, windGust150mMin, windGust150mAvg |\n| windGust200m | | Wind gust speed at 200 meters above ground level. | meter per second | mile per hour | windGust200mMax, windGust200mMin, windGust200mAvg |\n| windGustLowerBound | | Lowest forecasted wind gust speed at 10 meters above ground level at this time, across all contributing models in our blend.* | meter per second | mile per hour | |\n| windGustUpperBound | | Highest forecasted wind gust speed at 10 meters above ground level at this time, across all contributing models in our blend.* | meter per second | mile per hour | |\n| windSpeed | Yes | Wind speed at 10 meters above ground level. | meter per second | mile per hour | windSpeedMax, windSpeedMin, windSpeedAvg |\n| windSpeed2m | | Wind speed at 2 meters above ground level. | meter per second | mile per hour | windSpeed2mMax, windSpeed2mMin, windSpeed2mAvg |\n| windSpeed50m | | Wind speed at 50 meters above ground level. | meter per second | mile per hour | windSpeed50mMax, windSpeed50mMin, windSpeed50mAvg |\n| windSpeed100m | | Wind speed at 100 meters above ground level. | meter per second | mile per hour | windSpeed100mMax, windSpeed100mMin, windSpeed100mAvg |\n| windSpeed150m | | Wind speed at 150 meters above ground level. | meter per second | mile per hour | windSpeed150mMax, windSpeed150mMin, windSpeed150mAvg |\n| windSpeed200m | | Wind speed at 200 meters above ground level. | meter per second | mile per hour | windSpeed200mMax, windSpeed200mMin, windSpeed200mAvg |\n| windSpeedLowerBound | | Lowest forecasted wind speed at 10 meters above ground level at this time, across all contributing models in our blend.* | meter per second | mile per hour | |\n| windSpeedUpperBound | | Highest forecasted wind speed at 10 meters above ground level at this time, across all contributing models in our blend.* | meter per second | mile per hour | |\n| heatingDegreeUS | | A heating degree day (HDD) is the degrees that a day's average temperature is below 65 Fahrenheit, used to quantify the demand for energy. This parameter is only allowed when an interval of 24 hours is specified as an aggregation. | degree Celsius | degree Fahrenheit | |\n| coolingDegreeUS | | A cooling degree day (CDD) is the degrees that a day's average temperature is above 65 Fahrenheit, used to quantify the demand for energy. This parameter is only allowed when an interval of 24 hours is specified as an aggregation. | degree Celsius | degree Fahrenheit | |\n \n\n## Current Conditions Parameters\nThese parameters provide current atmospheric weather data. Expand the table below to view available parameters and each one's description, unit of measurement, and whether it is a default. The API returns only defaults unless specific parameters are requested.\n Click to expand...
\n\n| Parameter | Core | Description | Metric units | Imperial units |\n|-------------------------------|---------|-------------|--------------|----------------|\n| airTemp | Yes | Air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |\n| airTempNearGround | | Air temperature at 10 centimeters above ground level. | degree Celsius | degree Fahrenheit |\n| airDensity | | Air density at 10 metres above ground. | kilogram per cubic meter | kilogram per cubic meter |\n| cape | | Amount of convective available potential energy. | joule per kilogram | joule per kilogram |\n| cin | | Amount of convective inhibition. | joule per kilogram | joule per kilogram |\n| cloudBaseHeight | | Height of the base of the lowest cloud layer regardless of the amount of cloud. See parameter ceiling for the lowest layer with over 50% of coverage. | meters | feet |\n| dewPoint | Yes | Dew point temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |\n| effectiveCloudCover | Yes | Weighted sum of low, medium, and high cloud cover percentage. | percentage | percentage |\n| feelsLikeTemp | Yes | Apparent temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |\n| frictionVelocity | | Frictional velocity near the surface. | meters per second | miles per hour |\n| globalRadiation | Yes | Total mean incoming solar radiation received on the Earth's surface, combining both direct sunlight and diffuse sky radiation over the past hour. | joule per square centimeter | joule per square centimeter |\n| heatIndex | | Heat index at 2 meters above ground level. | degree Celsius | degree Fahrenheit |\n| hotDryWindyIndex | | Designed to help users determine which days are more likely to have adverse atmospheric conditions that make it more difficult to manage a wildland fire. It combines weather data from the surface and low levels of the atmosphere into a first-look product. | hectopascal meter per second | hectopascal meter per second | |\n| iceLweAmount | | Ice liquid water equivalent precipitation amount in the past hour, this is the precipitation amount that occurs when the precipitation falls as sleet or ice pellets. | millimeter | inch |\n| liquidPrecipAmount | | Total (liquid equivalent) accumulation of precipitation from rain, drizzle, freezing rain, and freezing drizzle over the past hour. | millimeter | inch |\n| localOffsetHours | | The number of hours to add or subtract from the UTC timestamp in the response to obtain local time (accounting for Daylight Saving Time) at the requested latitude and longitude. | Number of hours | Number of hours |\n| localTimezoneOlson | | The Olson time zone name at the requested latitude and longitude. | Name of the timezone | Name of the timezone |\n| longWaveRadiation | | Downwelling longwave (non-solar) radiation flux at the surface of the earth. | watt per square meter| watt per square meter |\n| mslPressure | Yes | Air pressure at mean sea level. | hectopascal | millibar |\n| potentialEvapotranspirationAmount | | Total accumulated loss of water through evapotranspiration over one hour from a hypothetical reference crop, assuming that ample water is available using FAO Penman-Monteith equation. | millimeter | inch |\n| precipAmount | Yes | Total (liquid equivalent) accumulation of precipitation over the past hour. | millimeter | inch |\n| precipDuration | | Total (liquid equivalent) duration of precipitation over the next hour. | second | second |\n| precipType | | Numerical code identifying the precipitation type over the next hour, when there's a probability of precipitation (1 = snow, 2 = rain, 3 = rain and snow, 4 = freezing rain, 5 = sleet, 6 = drizzle, 7 = freezing drizzle, 8 = thunderstorms).| unitless | unitless |\n| relativeHumidity | Yes | Relative humidity at 2 meters above ground level. | percentage | percentage |\n| shortWaveRadiation | Yes | Also called Global Horizontal Irradiance (GHI), this is the instantaneous high-energy solar radiation received at the Earth's surface, including both direct (DNI) and diffuse (DHI) sunlight. | watt per square meter| watt per square meter |\n| snowLweAmount | | Total accumulation of snow in liquid water equivalent over the past hour. | millimeter | inch |\n| snowfallAmount | | Total accumulation of snow (measured as depth, not liquid equivalent), over the past hour. | millimeter | inch |\n| sunshineDuration | Yes | Duration of sunshine based on cloud cover and downwelling shortwave radiation over the past hour. | minute | minute |\n| surfacePressure | Yes | Pressure that the air exerts on the surface of the earth. | hectopascal | millibar |\n| totalCloudCover | Yes | The percentage of the sky covered by clouds. It can range from 0% (clear sky) to 100% (completely overcast). | percentage | percentage |\n| uWind | | Measures the east-west component of wind. Positive values indicate wind from the west, and negative values indicate wind from the east. | meter per second | mile per hour |\n| visibility | Yes | Lateral distance until line-of-sight is obstructed due to weather conditions. | kilometer | mile |\n| vWind | | Measures the north-south component of wind. Positive values indicate wind from the south, and negative values indicate wind from the north. | meter per second | mile per hour |\n| weatherCode | Yes | Numerical code summarizing the weather conditions. See `Weather Codes and Icons` section. | unitless | unitless |\n| wetBulbDepression | | Difference between the air temperature and the wet-bulb temperature. | degree Celsius | degree Fahrenheit |\n| wetBulbGlobeTemperature | | Wet Bulb Globe Temperature (WBGT) measures heat stress in direct sunlight based on temperature, humidity, wind speed, sun angle, and cloud cover. | degree Celsius | degree Fahrenheit |\n| windChill | | Wind chill at 2 meters above ground level. | degree Celsius | degree Fahrenheit |\n| windDirection | Yes | Specifies the direction from which the wind is blowing at 10 meters above the ground, measured in degrees with respect to true north. | degree | degree |\n| windDirection50m | | Specifies the direction from which the wind is blowing at 50 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection50mAvg |\n| windDirection100m | | Specifies the direction from which the wind is blowing at 100 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection100mAvg |\n| windDirection150m | | Specifies the direction from which the wind is blowing at 150 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection150mAvg |\n| windDirection200m | | Specifies the direction from which the wind is blowing at 200 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection200mAvg |\n| windGust | Yes | Wind gust speed at 10 meters above ground level. | meter per second | mile per hour |\n| windGust50m | | Wind gust speed at 50 meters above ground level. | meter per second | mile per hour | windGust50mMax, windGust50mMin, windGust50mAvg |\n| windGust100m | | Wind gust speed at 100 meters above ground level. | meter per second | mile per hour | windGust100mMax, windGust100mMin, windGust100mAvg |\n| windGust150m | | Wind gust speed at 150 meters above ground level. | meter per second | mile per hour | windGust150mMax, windGust150mMin, windGust150mAvg |\n| windGust200m | | Wind gust speed at 200 meters above ground level. | meter per second | mile per hour | windGust200mMax, windGust200mMin, windGust200mAvg |\n| windSpeed | Yes | Wind speed at 10 meters above ground level. | meter per second | mile per hour |\n| windSpeed2m | | Wind speed at 2 meters above ground level. | meter per second | mile per hour |\n| windSpeed50m | | Wind speed at 50 meters above ground level. | meter per second | mile per hour | windSpeed50mMax, windSpeed50mMin, windSpeed50mAvg |\n| windSpeed100m | | Wind speed at 100 meters above ground level. | meter per second | mile per hour | windSpeed100mMax, windSpeed100mMin, windSpeed100mAvg |\n| windSpeed150m | | Wind speed at 150 meters above ground level. | meter per second | mile per hour | windSpeed150mMax, windSpeed150mMin, windSpeed150mAvg |\n| windSpeed200m | | Wind speed at 200 meters above ground level. | meter per second | mile per hour | windSpeed200mMax, windSpeed200mMin, windSpeed200mAvg |\n \n\n## Historical Parameters\nHistorical parameters are available starting from 1995-01-01T00:00:00Z. Expand the table below to view available parameters and each one's description, unit of measurement, and whether it is a default. The API returns only defaults unless specific parameters are requested.\n Click to expand...
\n\n| Parameter | Core | Description | Metric units | Imperial units | Aggregation Parameters |\n|-------------------------------|---------|-------------|--------------|----------------|------------------------|\n| airTemp | Yes | Air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit | airTempMax, airTempMin, airTempAvg |\n| airTempNearGround | | Air temperature at 10 centimeters above ground level. | degree Celsius | degree Fahrenheit | airTempNearGroundMax, airTempNearGroundMin, airTempNearGroundAvg |\n| airDensity | | Air density at 10 metres above ground. | kilogram per cubic meter | kilogram per cubic meter | |\n| cape | | Amount of convective available potential energy. | joule per kilogram | joule per kilogram |\n| cin | | Amount of convective inhibition. | joule per kilogram | joule per kilogram |\n| cloudBaseHeight | | Height of the base of the lowest cloud layer regardless of the amount of cloud. See parameter ceiling for the lowest layer with over 50% of coverage. | meters | feet |\n| dewPoint | Yes | Dew point temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit | dewPointMax, dewPointMin, dewPointAvg |\n| effectiveCloudCover | Yes | Weighted sum of low, medium, and high cloud cover percentage. | percentage | percentage | effectiveCloudCoverMax, effectiveCloudCoverMin, effectiveCloudCoverAvg |\n| feelsLikeTemp | Yes | Apparent temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit | feelsLikeTempMax, feelsLikeTempMin, feelsLikeTempAvg |\n| frictionVelocity | | Frictional velocity near the surface. | meters per second | miles per hour |\n| globalRadiation | Yes | Total mean incoming solar radiation received on the Earth's surface, combining both direct sunlight and diffuse sky radiation over the past hour. | joule per square centimeter | joule per square centimeter | globalRadiationSum |\n| heatIndex | | Heat index at 2 meters above ground level. | degree Celsius | degree Fahrenheit |\n| hotDryWindyIndex | | Designed to help users determine which days are more likely to have adverse atmospheric conditions that make it more difficult to manage a wildland fire. It combines weather data from the surface and low levels of the atmosphere into a first-look product. | hectopascal meter per second | hectopascal meter per second | |\n| iceLweAmount | | Ice liquid water equivalent precipitation amount in the past hour, this is the precipitation amount that occurs when the precipitation falls as sleet or ice pellets. | millimeter | inch |\n| liquidPrecipAmount | | Total (liquid equivalent) accumulation of precipitation from rain, drizzle, freezing rain, and freezing drizzle over the past hour.| millimeter | inch | liquidPrecipAmountSum |\n| localOffsetHours | | The number of hours to add or subtract from the UTC timestamp in the response to obtain local time (accounting for Daylight Saving Time) at the requested latitude and longitude. | Number of hours | Number of hours | |\n| localTimezoneOlson | | The Olson time zone name at the requested latitude and longitude. | Name of the timezone | Name of the timezone | |\n| longWaveRadiation | | Downwelling longwave (non-solar) radiation flux at the surface of the earth. | watt per square meter| watt per square meter| longWaveRadiationMax, longWaveRadiationMin, longWaveRadiationAvg |\n| mslPressure | Yes | Air pressure at mean sea level. | hectopascal | millibar | mslPressureMax, mslPressureMin, mslPressureAvg |\n| potentialEvapotranspirationAmount | | Total accumulated loss of water through evapotranspiration over one hour from a hypothetical reference crop, assuming that ample water is available using FAO Penman-Monteith equation. | millimeter | inch | potentialEvapotranspirationAmountSum |\n| precipAmount | Yes | Total (liquid equivalent) accumulation of precipitation over the past hour. | millimeter| inch | precipAmountSum |\n| precipDuration | | Total (liquid equivalent) duration of precipitation over the next hour. | second | second | precipDurationMax, precipDurationMin, precipDurationSum |\n| precipType | | Numerical code identifying the precipitation type over the next hour, when there's a probability of precipitation (1 = snow, 2 = rain, 3 = rain and snow, 4 = freezing rain, 5 = sleet, 6 = drizzle, 7 = freezing drizzle, 8 = thunderstorms). | unitless | unitless |\n| relativeHumidity | Yes | Relative humidity at 2 meters above ground level. | percentage | percentage | relativeHumidityMax, relativeHumidityMin, relativeHumidityAvg |\n| shortWaveRadiation | Yes | Also called Global Horizontal Irradiance (GHI), this is the instantaneous high-energy solar radiation received at the Earth's surface, including both direct (DNI) and diffuse (DHI) sunlight. | watt per square meter| watt per square meter| shortWaveRadiationMax, shortWaveRadiationMin, shortWaveRadiationAvg |\n| snowLweAmount | | Total accumulation of snow in liquid water equivalent over the past hour. | millimeter | inch |\n| snowfallAmount | | Total accumulation of snow (measured as depth, not liquid equivalent), over the past hour. | millimeter | inch | snowfallAmountSum |\n| sunshineDuration | Yes | Duration of sunshine based on cloud cover and downwelling shortwave radiation over the past hour. | minute | minute | sunshineDurationSum |\n| surfacePressure | Yes | Pressure that the air exerts on the surface of the earth. | hectopascal | millibar | surfacePressureMax, surfacePressureMin, surfacePressureAvg |\n| totalCloudCover | Yes | The percentage of the sky covered by clouds. It can range from 0% (clear sky) to 100% (completely overcast). | percentage | percentage | totalCloudCoverMax, totalCloudCoverMin, totalCloudCoverAvg |\n| uWind | | Measures the east-west component of wind. Positive values indicate wind from the west, and negative values indicate wind from the east. | meter per second | mile per hour | uWindMax, uWindMin, uWindAvg |\n| visibility | Yes | Lateral distance until line-of-sight is obstructed due to weather conditions. | kilometer | mile | visibilityMax, visibilityMin, visibilityAvg |\n| vWind | | Measures the north-south component of wind. Positive values indicate wind from the south, and negative values indicate wind from the north. | meter per second | mile per hour | vWindMax, vWindMin, vWindAvg |\n| weatherCode | Yes | Numerical code summarizing the weather conditions. See `Weather Codes and Icons` section. | unitless | unitless | weatherCode | \n| wetBulbDepression | | Difference between the air temperature and the wet-bulb temperature. | degree Celsius | degree Fahrenheit |\n| wetBulbGlobeTemperature | | Wet Bulb Globe Temperature (WBGT) measures heat stress in direct sunlight based on temperature, humidity, wind speed, sun angle, and cloud cover. | degree Celsius | degree Fahrenheit | wetBulbGlobeTemperatureMax, wetBulbGlobeTemperatureMin, wetBulbGlobeTemperatureAvg |\n| windChill | | Wind chill at 2 meters above ground level. | degree Celsius | degree Fahrenheit | windChillMax, windChillMin, windChillAvg |\n| windDirection | Yes | Specifies the direction from which the wind is blowing at 10 meters above the ground, measured in degrees with respect to true north. | degree | degree | windDirectionAvg |\n| windDirection50m | | Specifies the direction from which the wind is blowing at 50 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection50mAvg |\n| windDirection100m | | Specifies the direction from which the wind is blowing at 100 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection100mAvg |\n| windDirection150m | | Specifies the direction from which the wind is blowing at 150 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection150mAvg |\n| windDirection200m | | Specifies the direction from which the wind is blowing at 200 meters above the ground, measured in degrees with respect to true north.. | degree | degree | windDirection200mAvg |\n| windGust | Yes | Wind gust speed at 10 meters above ground level. | meter per second | mile per hour | windGustMax, windGustMin, windGustAvg |\n| windGust50m | | Wind gust speed at 50 meters above ground level. | meter per second | mile per hour | windGust50mMax, windGust50mMin, windGust50mAvg |\n| windGust100m | | Wind gust speed at 100 meters above ground level. | meter per second | mile per hour | windGust100mMax, windGust100mMin, windGust100mAvg |\n| windGust150m | | Wind gust speed at 150 meters above ground level. | meter per second | mile per hour | windGust150mMax, windGust150mMin, windGust150mAvg |\n| windGust200m | | Wind gust speed at 200 meters above ground level. | meter per second | mile per hour | windGust200mMax, windGust200mMin, windGust200mAvg |\n| windSpeed | Yes | Wind speed at 10 meters above ground level. | meter per second | mile per hour | windSpeedMax, windSpeedMin, windSpeedAvg |\n| windSpeed2m | | Wind speed at 2 meters above ground level. | meter per second | mile per hour | windSpeed2mMax, windSpeed2mMin, windSpeed2mAvg |\n| windSpeed50m | | Wind speed at 50 meters above ground level. | meter per second | mile per hour | windSpeed50mMax, windSpeed50mMin, windSpeed50mAvg |\n| windSpeed100m | | Wind speed at 100 meters above ground level. | meter per second | mile per hour | windSpeed100mMax, windSpeed100mMin, windSpeed100mAvg |\n| windSpeed150m | | Wind speed at 150 meters above ground level. | meter per second | mile per hour | windSpeed150mMax, windSpeed150mMin, windSpeed150mAvg |\n| windSpeed200m | | Wind speed at 200 meters above ground level. | meter per second | mile per hour | windSpeed200mMax, windSpeed200mMin, windSpeed200mAvg |\n \n\n## Weather Codes and Icons\nExpand the table below to view available weather codes and each code's description. If desired, obtain an icon for the weather code by substituing its filename into the following URL: https://static-assets.dtn.com/icons/weather-conditions/v1/{filename}.\n Click to expand...
\n\n| Weather code | Description | Icon file names |\n|--------------|-----------------------|---------------- |\n| 1 | Clear skies | clear skies.svg
clear_skies_night.svg |\n| 2 | Fair | fair.svg
fair_night.svg |\n| 3 | Partly cloudy | partly_cloudy.svg
partly_cloudy_night.svg \t|\n| 4 | Mostly cloudy | mostly_cloudy.svg
mostly_cloudy_night.svg \t|\n| 5 | Cloudy | cloudy.svg |\n| 6 | Mist | mist.svg |\n| 7 | Fog | fog.svg |\n| 8 | Drizzle | drizzle.svg \t|\n| 9 | Rain | rain.svg |\n| 10 | Heavy rain | heavy_rain.svg |\n| 11 | Freezing drizzle | freezing_drizzle.svg \t|\n| 12 | Freezing rain | freezing_rain.svg \t|\n| 13 | Freezing heavy rain | freezing_heavy_rain.svg \t|\n| 14 | Rain and snow | rain_and_snow.svg |\n| 15 | Heavy rain and snow | heavy_rain_and_snow.svg \t|\n| 16 | Snow | snow.svg \t|\n| 17 | Heavy snow | heavy_snow.svg \t|\n| 18 | Blizzard | blizzard.svg \t|\n| 19 | Ice pellets | ice_pellets.svg |\n| 20 | Rain showers | rain_showers.svg |\n| 21 | Heavy rain showers | heavy_rain_showers.svg \t|\n| 22 | Freezing rain showers | freezing_rain_showers.svg \t|\n| 23 | Heavy freezing rain showers | heavy_freezing_rain_showers.svg \t|\n| 24 | Rain and snow showers | rain_and_snow_showers.svg |\n| 25 | Heavy rain and snow showers | heavy_rain_and_snow_showers.svg \t|\n| 26 | Snow showers | snow_showers.svg \t|\n| 27 | Heavy snow showers | heavy_snow_showers.svg \t|\n| 28 | Hail showers | hail_showers.svg |\n| 29 | Heavy hail showers | heavy_hail_showers.svg \t|\n| 30 | Thunderstorms | thunderstorms.svg \t|\n| 31 | Severe thunderstorms | heavy_thunderstorms.svg |\n| 32 | Windy | windy.svg \t|\n \n\n\n## Uncertainty Parameters\nThe DTN Forecast System leverages an advanced ensemble approach, incorporating data from multiple global and regional weather models. Using machine learning algorithms, the system constantly evaluates and scores model performance, ensuring optimal forecasting across various locations and times. It employs a sophisticated blending technique for optimal model selection, downscaling techniques for precise location-specific predictions, and undergoes extensive third-party verification for continuous improvement.\n\nThe uncertainty (upper and lower bound) parameters represent the minimum and maximum forecasted values when comparing all contributing models for the given parameter, location and time. There are currently around 25 contributing models in the blend and these values when used together, and with the deterministic counterpart, help to determine the range of uncertainty in the forecast. \nFor more information on the DTN Forecast System see here. https://www.dtn.com/wp-content/uploads/2025/03/dtn-forecast-system-na.pdf"}],"paths":{"/":{"get":{"tags":["Parameters"]}},"/v2/conditions":{"get":{"tags":["Endpoints"],"summary":"Weather Conditions","description":"This endpoint provides current, forecast, and historical conditions for any specific point on the globe. Specify the location, the weather parameters of interest, and a time range up to 15 days long, from 1995-01-01T00:00:00Z to 15 days in the future. The API responds with the requested time series in GeoJSON format.\n\nCommon uses include weather monitoring, atmospheric research, and localized operations, such as event planning.\n\n## Using timezone offsets\n\nTo change timezones, specify a UTC offset (such as `+08:00` or `-05:00` instead of `Z`) for query parameters `startTime` and `endTime`. Timestamps in the response will automatically match the `startTime` offset. Remove the offset entirely to obtain the local timezone for the requested location.\n\n\n**Important note**: Because the `+` symbol is a special URL character, it must be encoded as `%2B` for use within the query parameter string.\n\n#### Valid examples\n\n* `?startTime=2024-01-01T00:00:00Z&endTime=2024-01-01T23:00:00Z`\n\n* `?startTime=2024-01-01T00:00:00%2B08:00&endTime=2024-01-01T23:00:00%2B02:00`\n\n* `?startTime=2024-01-01T00:00:00-08:00&endTime=2024-01-01T23:00:00-08:00`\n\n* `?startTime=2024-01-01T00:00:00&endTime=2024-01-01T23:00:00`\n\n#### Invalid example\n\n* `?startTime=2024-01-01T00:00:00+08:00&endTime=2024-01-01T23:00:00+08:00` (need to encode `+` as `%2B`)\n\n\n### Latitude and Longitude\n\n**Important note**: Requested latitudes and longitudes in response are rounded to five (5) decimal places when presented in `$.features.*.geometry.coordinates`. Floating point precision might affect the last digit.\n\n### Rounding examples\n\n* 1.5555 => 1.556\n\n* 1.5545 => 1.554\n\n* -1.5555 => -1.556\n\n\n## Query Parameters:\nUse query parameters to control the results in the response body:\n### location\n* Specify a location as latitude (`lat`) and longitude (`lon`).\n\n### parameters\n* Specify `parameters` to filter by specific atmospheric weather parameters. Include multiple as comma-separated values. The API returns only defaults when no specific parameters are requested.\n\n### startTime and endTime\n* Two key parameters are `startTime` and `endTime`. These parameters determine the time range for which the API returns data. Both `startTime` and `endTime` are inclusive, meaning that data at the top of the UTC hour for both timestamps is included in the response.\n\n* API Behavior Based on startTime and endTime:\n\n * **Omitted startTime and endTime:** Returns only current conditions.\n\n * **Both in the Future:** Returns only forecast conditions when both `startTime` and `endTime` are in the future.\n\n * **Both in the Past:** Returns only historical conditions when both `startTime` and `endTime` are in the past.\n\n * **Spanning Past and Future:** Returns historical, current, and forecast conditions when `startTime` is in the past and `endTime` is in the future.\n\n * **Only startTime Specified:** Returns only one timestamp, representing the data at the specified `startTime`.\n\n* Inclusivity of Timestamps\n\n * **Inclusive `startTime` and `endTime`:** Both parameters are inclusive, affecting the total duration and the number of data points returned, especially when using the interval parameter.\n\n * **Effect on Data Retrieval and Aggregation:** The inclusivity can result in additional aggregation periods or data points.\n\n### units\n * Use `units` to request values either as SI (metric) or United States customary (imperial) units.\n + The API returns metric units by default and when `si-std` is specified.\n + The API returns imperial units only when `us-std` is specified.\n\n### interval\n * Specify the `interval` parameter to request aggregated or interpolated data. Aggregated parameters names must also specify aggregation methods such as airTempMax, precipAmountSum, and others listed in the Parameters section.\n + **Format:** The interval for hourly aggregations must be in the format {n}h, where {n} is an integer greater than 1 (e.g., 2h, 6h, or 24h). For local timezone-aware daily aggregations, use '1d'. For interpolations, the following values are supported: 5m, 10m, 15m, 20m, or 30m.\n + **Constraints:** The interval must not exceed the total duration between `startTime` and `endTime`. For '1d' intervals, only local timezones (no UTC offsets) are supported to ensure accurate daily aggregation.\n\n * Aggregation Behavior:\n + **Aggregation Periods:** Data aggregation starts from the specified `startTime`. Each timestamp in the response represents the beginning of an aggregation period. For each interval, the API aggregates data from the timestamp up to (but not including) the next interval's start time.\n + **Final Interval Handling:** If the duration between `startTime` and `endTime` doesn't divide evenly by the interval, the final interval may be shorter. The last data point aggregates up to the inclusive endTime.\n * Interpolation Behavior:\n + **Interpolation Periods:** When using interpolation intervals (5m, 10m, 15m, 20m, 30m), the API generates data points at the specified intervals between `startTime` and `endTime`, including both endpoints.\n + **Data Generation:** The API will generally use linear interpolation between data points except for specific parameters. For parameters that represent accumulations over 1 hour, the API will distribute the accumulated value evenly across the interpolation intervals within that hour. For parameters that represent categorical or periodic data (like angular degrees), the API will use the nearest neighbor value for interpolation.\n * Examples using interval:\n + Example 1: 12-Hour Interval Aggregation\n + Parameters:\n + **startTime:** 2024-11-06T15:00:00Z\n + **endTime:** 2024-11-07T15:00:00Z\n + **interval:** 12h\n + **parameter:** airTempMax\n + Response:\n ```json\n {\n \"properties\": {\n \"2024-11-06T15:00:00Z\": {\n \"airTempMax\": 6.5\n },\n \"2024-11-07T03:00:00Z\": {\n \"airTempMax\": 8.9\n },\n \"2024-11-07T15:00:00Z\": {\n \"airTempMax\": 8.7\n }\n }\n ```\n + Explanation:\n + **First Data Point (2024-11-06T15:00:00Z):** Aggregates data from 2024-11-06T15:00:00Z up to including 2024-11-07T02:00:00Z.\n + **Second Data Point (2024-11-07T03:00:00Z):** Aggregates data from 2024-11-07T03:00:00Z up to including 2024-11-07T14:00:00Z.\n + **Third Data Point (2024-11-07T15:00:00Z):** Since `endTime` is inclusive, this final data point includes data from 2024-11-07T15:00:00Z up to the endTime.\n + Example 2: 24-Hour Interval with Inclusive `endTime`\n + Parameters:\n + **startTime:** 2024-10-23T00:00:00Z\n + **endTime:** 2024-10-24T00:00:00Z\n + **interval:** 24h\n + **parameter:** airTempMax\n + Response:\n ```json\n {\n \"properties\": {\n \"2024-10-23T00:00:00Z\": {\n \"airTempMax\": 19.3\n },\n \"2024-10-24T00:00:00Z\": {\n \"airTempMax\": 10.6\n }\n }\n ```\n + Explanation:\n + **First Data Point (2024-10-23T00:00:00Z):** Aggregates data from 2024-10-23T00:00:00Z up to including 2024-10-24T24:00:00Z.\n + **Second Data Point (2024-10-24T00:00:00Z):** Since endTime is inclusive and matches the start of the next interval, this data point includes data at 2024-10-24T00:00:00Z.\n + **Total Duration:** Due to inclusivity, the time span covers 25 hours, resulting in two data points.\n + Example 3: Adjusting endTime to Control Data Points\n + Objective: Retrieve data for only one day with a single data point.\n + Adjusted endTime: Set to 2024-10-23T23:59:59Z.\n + Parameters:\n + **startTime:** 2024-10-23T00:00:00Z\n + **endTime:** 2024-10-23T23:59:59Z\n + **interval:** 24h\n + **parameter:** airTempMax\n + Response:\n ```json\n \"properties\": {\n \"2024-10-23T00:00:00Z\": {\n \"airTempMax\": 19.3\n }\n }\n ```\n * Explanation:\n * **Single Data Point:** Aggregates data over the 24-hour period without including the next day's data.\n * **Duration:** Exactly 24 hours, resulting in one data point.\n\n + Example 4: Fractional time zones\n + Parameters:\n + **startTime:** 2024-05-27T00:00:00\n + **endTime:** 2024-05-27T23:59:59\n + **interval:** 24h\n + **parameter:** airTempMax\n + **lat:** 30.251\n + **lon:** 62.569\n \n + Response:\n ```json\n \"properties\": {\n \"2024-05-26T23:30:00+0430\": {\n \"airTempMax\": 42.2,\n },\n \"2024-05-27T23:30:00+0430\": {\n \"airTempMax\": 34,\n }\n }\n ```\n * Explanation:\n * **Why** This response seems confusing at first becuase we have 2 data points when we seemingly only requested a single 24 hour interval.\n * **Local Timezone Assumption** When requesting a start and end time that has no timezone, the timezone of the location requested will be used.\n * For the example requested lat/lon the local timezone is UTC+04:30 (fractional timezone)\n * **Inclusive Time Range** startTime is hour inclusive, meaning the API will return data for the top of the requested hour (in UTC).\n * **UTC Conversion** All data is stored in UTC hourly.\n * When we convert these requested timestamps to UTC, `startTime=2024-05-26T19:30:00Z`, `endTime=2024-05-27T19:29:59Z`\n * Since startTime and endTime are `inclusive`, so the time range spans exactly 25 hours, not 24.\n * Changing `endTime` to `2024-05-27T23:00:00` will result in a single interval returned.\n\n + Example 5: Interpolation at 15-minute intervals\n + Parameters:\n + **startTime:** 2024-11-06T15:00:00Z\n + **endTime:** 2024-11-06T16:00:00Z\n + **interval:** 15m\n + **parameter:** airTemp, windDirection, iceLweAmount\n + Response:\n ```json\n {\n \"properties\": {\n \"2024-11-06T15:00:00Z\": {\n \"airTemp\": 5.2,\n \"windDirection\": 342,\n \"iceLweAmount\": 2\n },\n \"2024-11-06T15:15:00Z\": {\n \"airTemp\": 5.5,\n \"windDirection\": 342,\n \"iceLweAmount\": 2\n },\n \"2024-11-06T15:30:00Z\": {\n \"airTemp\": 5.7,\n \"windDirection\": 352,\n \"iceLweAmount\": 2\n },\n \"2024-11-06T15:45:00Z\": {\n \"airTemp\": 6.0,\n \"windDirection\": 352,\n \"iceLweAmount\": 2\n },\n \"2024-11-06T16:00:00Z\": {\n \"airTemp\": 6.2,\n \"windDirection\": 352,\n \"iceLweAmount\": 3\n }\n }\n ```\n + Explanation:\n + airTemp is linearly interpolated between data points.\n + windDirection uses nearest neighbor interpolation because its units is in degrees.\n + iceLweAmount is distributed evenly across the interpolation intervals within the hour, with its original value being 8 at 2024-11-06T15:00:00Z, and 12 at 2024-11-06T16:00:00Z.\n\n\n### Complete example:\n\n`https://weather.api.dtn.com/v2/conditions?lat={lat}&lon={lon}&startTime={start_time}&endTime={end_time}&interval={n}h¶meters={param1,param2}&units={units}`\n","operationId":"weatherConditions","security":[{"clientCredentials":[]}],"parameters":[{"in":"header","name":"Accept-Encoding","schema":{"type":"string","description":"Use this request header to communicate which compression algorithms the client understands. The API supports gzip.","example":"gzip"}},{"in":"header","name":"Accept","schema":{"type":"string","description":"Use this request header to specify an acceptable response media type.","example":"application/json"}},{"name":"lat","in":"query","schema":{"type":"number","format":"float"},"example":35.47,"required":true},{"name":"lon","in":"query","schema":{"type":"number","format":"float"},"example":-97.51,"required":true},{"name":"startTime","in":"query","schema":{"type":"string","format":"date-time"},"example":"2023-10-01T00:06:10Z"},{"name":"endTime","in":"query","schema":{"type":"string","format":"date-time"},"example":"2023-10-14T00:06:10Z"},{"name":"parameters","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}},"example":"airTemp,precipAmount,weatherCode"},{"name":"units","in":"query","schema":{"type":"string"},"example":"us-std"},{"name":"interval","in":"query","required":false,"schema":{"type":"string"},"description":"Aggregation or interpolation interval (e.g. 2h, 24h, 1d, 15m).","example":"24h"},{"name":"aggregationTimeLabel","in":"query","required":false,"schema":{"type":"string","enum":["start","end"],"default":"start"},"description":"Controls whether the timestamp in the response represents the start or end of the aggregation window. Only valid when `interval` is specified.","example":"end"}],"responses":{"200":{"description":"A successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string"},"features":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}}},"properties":{"type":"object","properties":{"2023-10-01T00:00:00Z":{"type":"object","properties":{"airTemp":{"type":"number"},"airTempLowerBound":{"type":"number"},"airTempNearGround":{"type":"number"},"airTempUpperBound":{"type":"number"},"totalCloudCover":{"type":"number"},"conditionalPrecipProbFreezing":{"type":"number"},"conditionalPrecipProbFrozen":{"type":"number"},"conditionalPrecipProbLiquid":{"type":"number"},"conditionalPrecipProbRefrozen":{"type":"number"},"convectivePrecipAmount":{"type":"number"},"dewPoint":{"type":"number"},"effectiveCloudCover":{"type":"number"},"feelsLikeTemp":{"type":"number"},"heatIndex":{"type":"number"},"iceAccretionAmount":{"type":"number"},"longWaveRadiation":{"type":"number"},"mslPressure":{"type":"number"},"precipAmount":{"type":"number"},"precipAmountMax":{"type":"number"},"precipAmountMin":{"type":"number"},"precipProb":{"type":"number"},"precipType":{"type":"number"},"relativeHumidity":{"type":"number"},"relativeHumidityUpperBound":{"type":"number"},"relativeHumidityLowerBound":{"type":"number"},"shortWaveRadiation":{"type":"number"},"globalRadiation":{"type":"number"},"snowFactor":{"type":"number"},"snowfallAmount":{"type":"number"},"sunshineDuration":{"type":"number"},"surfacePressure":{"type":"number"},"uWind":{"type":"number"},"visibility":{"type":"number"},"visibilityObstructionType":{"type":"number"},"vWind":{"type":"number"},"weatherCode":{"type":"number"},"windChill":{"type":"number"},"windDirection":{"type":"number"},"windGust":{"type":"number"},"windSpeed":{"type":"number"},"windSpeed100m":{"type":"number"},"windSpeed2m":{"type":"number"},"windSpeedLowerBound":{"type":"number"},"windSpeedUpperBound":{"type":"number"}}}}}}}}},"example":{"url":"https://weather.api.dtn.com/v2/conditions?lat=35.47&lon=-97.51¶meters=airTemp,airTempLowerBound,airTempNearGround,airTempUpperBound,totalCloudCover,conditionalPrecipProbFreezing,conditionalPrecipProbFrozen,conditionalPrecipProbLiquid,conditionalPrecipProbRefrozen,convectivePrecipAmount,dewPoint,effectiveCloudCover,feelsLikeTemp,heatIndex,iceAccretionAmount,longWaveRadiation,mslPressure,precipAmount,precipAmountMax,precipAmountMin,precipProb,precipType,relativeHumidity,relativeHumidityUpperBound,relativeHumidityLowerBound,shortWaveRadiation,globalRadiation,snowFactor,snowfallAmount,sunshineDuration,surfacePressure,uWind,visibility,visibilityObstructionType,vWind,weatherCode,windChill,windDirection,windGust,windSpeed,windSpeed100m,windSpeed2m,windSpeedLowerBound,windSpeedUpperBound,windGustLowerBound,windGustUpperBound&startTime=2023-10-01T00:06:10Z&endTime=2023-10-01T02:06:10Z&units=us-std","type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-97.51,35.47]},"properties":{"2023-10-01T00:00:00Z":{"airTemp":84.29,"airTempLowerBound":82.13,"airTempNearGround":84.33,"airTempUpperBound":86.81,"totalCloudCover":12.6,"conditionalPrecipProbFreezing":0,"conditionalPrecipProbFrozen":0,"conditionalPrecipProbLiquid":100,"conditionalPrecipProbRefrozen":0,"convectivePrecipAmount":0,"dewPoint":59.45,"effectiveCloudCover":12.6,"feelsLikeTemp":84.12,"heatIndex":84.12,"iceAccretionAmount":0,"longWaveRadiation":397.42,"mslPressure":1014.81,"precipAmount":0,"precipAmountMax":0.01,"precipAmountMin":0,"precipProb":0,"precipType":2,"relativeHumidity":43.15,"relativeHumidityUpperBound":50.21,"relativeHumidityLowerBound":40.44,"shortWaveRadiation":46,"globalRadiation":16.56,"snowFactor":0,"snowfallAmount":0,"sunshineDuration":0,"surfacePressure":972.47,"uWind":-7.61,"visibility":10,"visibilityObstructionType":1,"vWind":8.7,"weatherCode":1,"windChill":84.29,"windDirection":139.1,"windGust":18.34,"windSpeed":11.59,"windSpeed100m":18.34,"windSpeed2m":8.18,"windSpeedLowerBound":11.59,"windSpeedUpperBound":22.57,"windGustLowerBound":10.54,"windGustUpperBound":19.53},"2023-10-01T01:00:00Z":{"airTemp":80.69,"airTempLowerBound":77.45,"airTempNearGround":77.62,"airTempUpperBound":83.39,"totalCloudCover":12.9,"conditionalPrecipProbFreezing":0,"conditionalPrecipProbFrozen":0,"conditionalPrecipProbLiquid":100,"conditionalPrecipProbRefrozen":0,"convectivePrecipAmount":0,"dewPoint":60.17,"effectiveCloudCover":12.9,"feelsLikeTemp":81.4,"heatIndex":81.4,"iceAccretionAmount":0,"longWaveRadiation":388.07,"mslPressure":1015.36,"precipAmount":0,"precipAmountMax":0.01,"precipAmountMin":0,"precipProb":0,"precipType":2,"relativeHumidity":49.67,"relativeHumidityUpperBound":52.21,"relativeHumidityLowerBound":46.44,"shortWaveRadiation":0,"globalRadiation":0,"snowFactor":0,"snowfallAmount":0,"sunshineDuration":0,"surfacePressure":972.87,"uWind":-7.72,"visibility":10,"visibilityObstructionType":1,"vWind":7.48,"weatherCode":1,"windChill":80.69,"windDirection":133.9,"windGust":18.72,"windSpeed":10.65,"windSpeed100m":21.39,"windSpeed2m":7.36,"windSpeedLowerBound":10.98,"windSpeedUpperBound":23.04,"windGustLowerBound":9.54,"windGustUpperBound":18.53},"2023-10-01T02:00:00Z":{"airTemp":78.71,"airTempLowerBound":76.19,"airTempNearGround":75.54,"airTempUpperBound":81.41,"totalCloudCover":13.3,"conditionalPrecipProbFreezing":0,"conditionalPrecipProbFrozen":0,"conditionalPrecipProbLiquid":100,"conditionalPrecipProbRefrozen":0,"convectivePrecipAmount":0,"dewPoint":60.71,"effectiveCloudCover":13.3,"feelsLikeTemp":78.71,"heatIndex":78.71,"iceAccretionAmount":0,"longWaveRadiation":383.11,"mslPressure":1015.87,"precipAmount":0,"precipAmountMax":0.01,"precipAmountMin":0,"precipProb":0,"precipType":2,"relativeHumidity":54.1,"relativeHumidityUpperBound":57.21,"relativeHumidityLowerBound":50.44,"shortWaveRadiation":0,"globalRadiation":0,"snowFactor":0,"snowfallAmount":0,"sunshineDuration":0,"surfacePressure":973.28,"uWind":-7.58,"visibility":10,"visibilityObstructionType":1,"vWind":7.93,"weatherCode":1,"windChill":78.71,"windDirection":136.5,"windGust":19.1,"windSpeed":10.92,"windSpeed100m":22.3,"windSpeed2m":7.63,"windSpeedLowerBound":10.38,"windSpeedUpperBound":23.49,"windGustLowerBound":11.54,"windGustUpperBound":20.53}}}]}}}}},"400":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"bad-request","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"401":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"406":{"description":"Unable to produce a response matching the Accept request header.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"not-acceptable","title":"Not Acceptable","detail":"The Accept header value is invalid or unsupported.","status":406,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}}},"x-codeSamples":[{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"Accept-Encoding: SOME_STRING_VALUE\");\nheaders = curl_slist_append(headers, \"Accept: SOME_STRING_VALUE\");\nheaders = curl_slist_append(headers, \"Authorization: Bearer REPLACE_BEARER_TOKEN\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"Accept\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nIRestResponse response = client.Execute(request);"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"},{"lang":"Java + Okhttp","source":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\")\n .get()\n .addHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n .addHeader(\"Accept\", \"SOME_STRING_VALUE\")\n .addHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"},{"lang":"Java + Unirest","source":"HttpResponse response = Unirest.get(\"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\")\n .header(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n .header(\"Accept\", \"SOME_STRING_VALUE\")\n .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .asString();"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\",\n \"method\": \"GET\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\",\n \"method\": \"GET\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"weather.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://weather.api.dtn.com/v2/conditions',\n qs: {\n lat: 'SOME_NUMBER_VALUE',\n lon: 'SOME_NUMBER_VALUE',\n startTime: 'SOME_STRING_VALUE',\n endTime: 'SOME_STRING_VALUE',\n parameters: 'SOME_ARRAY_VALUE',\n units: 'SOME_STRING_VALUE',\n interval: 'SOME_STRING_VALUE',\n aggregationTimeLabel: 'SOME_STRING_VALUE'\n },\n headers: {\n 'Accept-Encoding': 'SOME_STRING_VALUE',\n Accept: 'SOME_STRING_VALUE',\n Authorization: 'Bearer REPLACE_BEARER_TOKEN'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://weather.api.dtn.com/v2/conditions\");\n\nreq.query({\n \"lat\": \"SOME_NUMBER_VALUE\",\n \"lon\": \"SOME_NUMBER_VALUE\",\n \"startTime\": \"SOME_STRING_VALUE\",\n \"endTime\": \"SOME_STRING_VALUE\",\n \"parameters\": \"SOME_ARRAY_VALUE\",\n \"units\": \"SOME_STRING_VALUE\",\n \"interval\": \"SOME_STRING_VALUE\",\n \"aggregationTimeLabel\": \"SOME_STRING_VALUE\"\n});\n\nreq.headers({\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n});\n\nreq.end(function (res) {\n if (res.error) throw new Error(res.error);\n\n console.log(res.body);\n});\n"},{"lang":"Objc + Nsurlsession","source":"#import \n\nNSDictionary *headers = @{ @\"Accept-Encoding\": @\"SOME_STRING_VALUE\",\n @\"Accept\": @\"SOME_STRING_VALUE\",\n @\"Authorization\": @\"Bearer REPLACE_BEARER_TOKEN\" };\n\nNSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@\"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\"]\n cachePolicy:NSURLRequestUseProtocolCachePolicy\n timeoutInterval:10.0];\n[request setHTTPMethod:@\"GET\"];\n[request setAllHTTPHeaderFields:headers];\n\nNSURLSession *session = [NSURLSession sharedSession];\nNSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request\n completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {\n if (error) {\n NSLog(@\"%@\", error);\n } else {\n NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;\n NSLog(@\"%@\", httpResponse);\n }\n }];\n[dataTask resume];"},{"lang":"Ocaml + Cohttp","source":"open Cohttp_lwt_unix\nopen Cohttp\nopen Lwt\n\nlet uri = Uri.of_string \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\" in\nlet headers = Header.add_list (Header.init ()) [\n (\"Accept-Encoding\", \"SOME_STRING_VALUE\");\n (\"Accept\", \"SOME_STRING_VALUE\");\n (\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n] in\n\nClient.call ~headers `GET uri\n>>= fun (res, body_stream) ->\n (* Do stuff with the result *)"},{"lang":"Php + Curl","source":" \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Accept: SOME_STRING_VALUE\",\n \"Accept-Encoding: SOME_STRING_VALUE\",\n \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"},{"lang":"Php + Http1","source":"setUrl('https://weather.api.dtn.com/v2/conditions');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'lat' => 'SOME_NUMBER_VALUE',\n 'lon' => 'SOME_NUMBER_VALUE',\n 'startTime' => 'SOME_STRING_VALUE',\n 'endTime' => 'SOME_STRING_VALUE',\n 'parameters' => 'SOME_ARRAY_VALUE',\n 'units' => 'SOME_STRING_VALUE',\n 'interval' => 'SOME_STRING_VALUE',\n 'aggregationTimeLabel' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n 'Accept-Encoding' => 'SOME_STRING_VALUE',\n 'Accept' => 'SOME_STRING_VALUE',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"},{"lang":"Php + Http2","source":"setRequestUrl('https://weather.api.dtn.com/v2/conditions');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n 'lat' => 'SOME_NUMBER_VALUE',\n 'lon' => 'SOME_NUMBER_VALUE',\n 'startTime' => 'SOME_STRING_VALUE',\n 'endTime' => 'SOME_STRING_VALUE',\n 'parameters' => 'SOME_ARRAY_VALUE',\n 'units' => 'SOME_STRING_VALUE',\n 'interval' => 'SOME_STRING_VALUE',\n 'aggregationTimeLabel' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n 'Accept-Encoding' => 'SOME_STRING_VALUE',\n 'Accept' => 'SOME_STRING_VALUE',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"weather.api.dtn.com\")\n\nheaders = {\n 'Accept-Encoding': \"SOME_STRING_VALUE\",\n 'Accept': \"SOME_STRING_VALUE\",\n 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n }\n\nconn.request(\"GET\", \"/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://weather.api.dtn.com/v2/conditions\"\n\nquerystring = {\"lat\":\"SOME_NUMBER_VALUE\",\"lon\":\"SOME_NUMBER_VALUE\",\"startTime\":\"SOME_STRING_VALUE\",\"endTime\":\"SOME_STRING_VALUE\",\"parameters\":\"SOME_ARRAY_VALUE\",\"units\":\"SOME_STRING_VALUE\",\"interval\":\"SOME_STRING_VALUE\",\"aggregationTimeLabel\":\"SOME_STRING_VALUE\"}\n\nheaders = {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept-Encoding\"] = 'SOME_STRING_VALUE'\nrequest[\"Accept\"] = 'SOME_STRING_VALUE'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE' \\\n --header 'Accept: SOME_STRING_VALUE' \\\n --header 'Accept-Encoding: SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Shell + Httpie","source":"http GET 'https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE' \\\n Accept:SOME_STRING_VALUE \\\n Accept-Encoding:SOME_STRING_VALUE \\\n Authorization:'Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Shell + Wget","source":"wget --quiet \\\n --method GET \\\n --header 'Accept-Encoding: SOME_STRING_VALUE' \\\n --header 'Accept: SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --output-document \\\n - 'https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE'"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://weather.api.dtn.com/v2/conditions?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=SOME_STRING_VALUE&interval=SOME_STRING_VALUE&aggregationTimeLabel=SOME_STRING_VALUE\")! as URL,\n cachePolicy: .useProtocolCachePolicy,\n timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n if (error != nil) {\n print(error)\n } else {\n let httpResponse = response as? HTTPURLResponse\n print(httpResponse)\n }\n})\n\ndataTask.resume()"}]}},"/v2/conditions/parameters":{"get":{"tags":["Endpoints"],"summary":"Weather Parameters","description":"This endpoint provides helpful context in JSON format about the atmospheric weather parameters and operations that the other endpoints support.\n\nUse query parameters to control the results in the response body:\n * Set `category` to `current-conditions`, `hourly-forecast`, or `hourly-historical` to filter atmospheric parameters by that category.\n * Specify a `name` to filter atmospheric parameters by that name (e.g., `name=airTemp`).\n * Specify a `category` and `name` to filter by both.\n * Omit all query parameters to obtain all atmospheric parameters in the response.\n","operationId":"weatherParameters","security":[{"clientCredentials":[]}],"parameters":[{"in":"header","name":"Accept-Encoding","schema":{"type":"string","description":"Use this request header to communicate which compression algorithms the client understands. The API supports gzip.","example":"gzip"}},{"in":"header","name":"Accept","schema":{"type":"string","description":"Use this request header to specify an acceptable response media type.","example":"application/json"}},{"in":"query","name":"category","schema":{"type":"string","description":"The desired category filter (optional).","example":["current-conditions"]}},{"in":"query","name":"name","schema":{"type":"string","description":"The desired parameter name filter (optional).","example":["airTemp"]}}],"responses":{"200":{"description":"A successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"current-conditions":{"type":"object","properties":{"parameter name":{"type":"object","description":"The name of the parameter.","properties":{"metricUnit":{"type":"string","description":"The metric unit used for this parameter."},"imperialUnit":{"type":"string","description":"The imperial unit used for this parameter."},"type":{"type":"string","description":"The parameter type."},"description":{"type":"string","description":"A description of what this parameter means."},"notes":{"type":"string","description":"Additional information related to this parameter."}}}},"example":{"airTemp":{"metricUnit":"Celsius","imperialUnit":"Fahrenheit","type":"number","description":"Air temperature at 2 meters above ground level.","notes":""}}},"hourly-forecast":{"type":"object","properties":{"parameter name":{"type":"object","description":"The name of the parameter.","properties":{"metricUnit":{"type":"string","description":"The metric unit used for this parameter."},"imperialUnit":{"type":"string","description":"The imperial unit used for this parameter."},"type":{"type":"string","description":"The parameter type."},"description":{"type":"string","description":"A description of what this parameter means."},"notes":{"type":"string","description":"Additional information related to this parameter."},"aggregationMethods":{"type":"array","items":{"type":"string"},"description":"Aggregation methods available to the parameter."}}}},"example":{"airTemp":{"metricUnit":"Celsius","imperialUnit":"Fahrenheit","type":"number","description":"Air temperature at 2 meters above ground level.","notes":"","aggregationMethods":["Max","Min","Avg"]}}},"hourly-historical":{"type":"object","properties":{"parameter name":{"type":"object","description":"The name of the parameter.","properties":{"metricUnit":{"type":"string","description":"The metric unit used for this parameter."},"imperialUnit":{"type":"string","description":"The imperial unit used for this parameter."},"type":{"type":"string","description":"The parameter type."},"description":{"type":"string","description":"A description of what this parameter means."},"notes":{"type":"string","description":"Additional information related to this parameter."},"aggregationMethods":{"type":"array","items":{"type":"string"},"description":"Aggregation methods available to the parameter."}}}},"example":{"airTemp":{"metricUnit":"Celsius","imperialUnit":"Fahrenheit","type":"number","description":"Air temperature at 2 meters above ground level.","notes":"","aggregationMethods":["Max","Min","Avg"]}}}}}}}},"400":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"bad-request","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"401":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"406":{"description":"Unable to produce a response matching the Accept request header.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"not-acceptable","title":"Not Acceptable","detail":"The Accept header value is invalid or unsupported.","status":406,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}}},"x-codeSamples":[{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"Accept-Encoding: SOME_STRING_VALUE\");\nheaders = curl_slist_append(headers, \"Accept: SOME_STRING_VALUE\");\nheaders = curl_slist_append(headers, \"Authorization: Bearer REPLACE_BEARER_TOKEN\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"Accept\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nIRestResponse response = client.Execute(request);"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"},{"lang":"Java + Okhttp","source":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\")\n .get()\n .addHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n .addHeader(\"Accept\", \"SOME_STRING_VALUE\")\n .addHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"},{"lang":"Java + Unirest","source":"HttpResponse response = Unirest.get(\"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\")\n .header(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n .header(\"Accept\", \"SOME_STRING_VALUE\")\n .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .asString();"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\",\n \"method\": \"GET\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\");\nxhr.setRequestHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\",\n \"method\": \"GET\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"weather.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v2/conditions/parameters?category=current-conditions&name=airTemp\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://weather.api.dtn.com/v2/conditions/parameters',\n qs: {category: 'current-conditions', name: 'airTemp'},\n headers: {\n 'Accept-Encoding': 'SOME_STRING_VALUE',\n Accept: 'SOME_STRING_VALUE',\n Authorization: 'Bearer REPLACE_BEARER_TOKEN'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://weather.api.dtn.com/v2/conditions/parameters\");\n\nreq.query({\n \"category\": \"current-conditions\",\n \"name\": \"airTemp\"\n});\n\nreq.headers({\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n});\n\nreq.end(function (res) {\n if (res.error) throw new Error(res.error);\n\n console.log(res.body);\n});\n"},{"lang":"Objc + Nsurlsession","source":"#import \n\nNSDictionary *headers = @{ @\"Accept-Encoding\": @\"SOME_STRING_VALUE\",\n @\"Accept\": @\"SOME_STRING_VALUE\",\n @\"Authorization\": @\"Bearer REPLACE_BEARER_TOKEN\" };\n\nNSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@\"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\"]\n cachePolicy:NSURLRequestUseProtocolCachePolicy\n timeoutInterval:10.0];\n[request setHTTPMethod:@\"GET\"];\n[request setAllHTTPHeaderFields:headers];\n\nNSURLSession *session = [NSURLSession sharedSession];\nNSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request\n completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {\n if (error) {\n NSLog(@\"%@\", error);\n } else {\n NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;\n NSLog(@\"%@\", httpResponse);\n }\n }];\n[dataTask resume];"},{"lang":"Ocaml + Cohttp","source":"open Cohttp_lwt_unix\nopen Cohttp\nopen Lwt\n\nlet uri = Uri.of_string \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\" in\nlet headers = Header.add_list (Header.init ()) [\n (\"Accept-Encoding\", \"SOME_STRING_VALUE\");\n (\"Accept\", \"SOME_STRING_VALUE\");\n (\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n] in\n\nClient.call ~headers `GET uri\n>>= fun (res, body_stream) ->\n (* Do stuff with the result *)"},{"lang":"Php + Curl","source":" \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Accept: SOME_STRING_VALUE\",\n \"Accept-Encoding: SOME_STRING_VALUE\",\n \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"},{"lang":"Php + Http1","source":"setUrl('https://weather.api.dtn.com/v2/conditions/parameters');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'category' => 'current-conditions',\n 'name' => 'airTemp'\n]);\n\n$request->setHeaders([\n 'Accept-Encoding' => 'SOME_STRING_VALUE',\n 'Accept' => 'SOME_STRING_VALUE',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"},{"lang":"Php + Http2","source":"setRequestUrl('https://weather.api.dtn.com/v2/conditions/parameters');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n 'category' => 'current-conditions',\n 'name' => 'airTemp'\n]));\n\n$request->setHeaders([\n 'Accept-Encoding' => 'SOME_STRING_VALUE',\n 'Accept' => 'SOME_STRING_VALUE',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"weather.api.dtn.com\")\n\nheaders = {\n 'Accept-Encoding': \"SOME_STRING_VALUE\",\n 'Accept': \"SOME_STRING_VALUE\",\n 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n }\n\nconn.request(\"GET\", \"/v2/conditions/parameters?category=current-conditions&name=airTemp\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://weather.api.dtn.com/v2/conditions/parameters\"\n\nquerystring = {\"category\":\"current-conditions\",\"name\":\"airTemp\"}\n\nheaders = {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept-Encoding\"] = 'SOME_STRING_VALUE'\nrequest[\"Accept\"] = 'SOME_STRING_VALUE'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp' \\\n --header 'Accept: SOME_STRING_VALUE' \\\n --header 'Accept-Encoding: SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Shell + Httpie","source":"http GET 'https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp' \\\n Accept:SOME_STRING_VALUE \\\n Accept-Encoding:SOME_STRING_VALUE \\\n Authorization:'Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Shell + Wget","source":"wget --quiet \\\n --method GET \\\n --header 'Accept-Encoding: SOME_STRING_VALUE' \\\n --header 'Accept: SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --output-document \\\n - 'https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp'"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://weather.api.dtn.com/v2/conditions/parameters?category=current-conditions&name=airTemp\")! as URL,\n cachePolicy: .useProtocolCachePolicy,\n timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n if (error != nil) {\n print(error)\n } else {\n let httpResponse = response as? HTTPURLResponse\n print(httpResponse)\n }\n})\n\ndataTask.resume()"}]}},"/v2/conditions/codes":{"get":{"tags":["Endpoints"],"summary":"Weather Codes","description":"This endpoint provides helpful context in JSON format about the weather codes and their descriptions.\n","operationId":"weatherCodes","security":[{"clientCredentials":[]}],"parameters":[{"in":"header","name":"Accept-Encoding","schema":{"type":"string","description":"Use this request header to communicate which compression algorithms the client understands. The API supports gzip.","example":"gzip"}},{"in":"header","name":"Accept","schema":{"type":"string","description":"Use this request header to specify an acceptable response media type.","example":"application/json"}}],"responses":{"200":{"description":"A successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"weather code":{"type":"object","description":"A Unique value representing the weather condition.","properties":{"condition":{"type":"string","description":"Short description of the weather condition."},"description":{"type":"string","description":"Description of the weather condition."}}}},"example":{"1":{"condition":"Clear Skies","description":"Clouds cover 0-20% of the sky."}}}}}},"400":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"bad-request","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"401":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"406":{"description":"Unable to produce a response matching the Accept request header.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"not-acceptable","title":"Not Acceptable","detail":"The Accept header value is invalid or unsupported.","status":406,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}}},"x-codeSamples":[{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://weather.api.dtn.com/v2/conditions/codes\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"Accept-Encoding: SOME_STRING_VALUE\");\nheaders = curl_slist_append(headers, \"Accept: SOME_STRING_VALUE\");\nheaders = curl_slist_append(headers, \"Authorization: Bearer REPLACE_BEARER_TOKEN\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://weather.api.dtn.com/v2/conditions/codes\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"Accept\", \"SOME_STRING_VALUE\");\nrequest.AddHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nIRestResponse response = client.Execute(request);"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://weather.api.dtn.com/v2/conditions/codes\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"},{"lang":"Java + Okhttp","source":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://weather.api.dtn.com/v2/conditions/codes\")\n .get()\n .addHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n .addHeader(\"Accept\", \"SOME_STRING_VALUE\")\n .addHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"},{"lang":"Java + Unirest","source":"HttpResponse response = Unirest.get(\"https://weather.api.dtn.com/v2/conditions/codes\")\n .header(\"Accept-Encoding\", \"SOME_STRING_VALUE\")\n .header(\"Accept\", \"SOME_STRING_VALUE\")\n .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .asString();"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions/codes\",\n \"method\": \"GET\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://weather.api.dtn.com/v2/conditions/codes\");\nxhr.setRequestHeader(\"Accept-Encoding\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions/codes\",\n \"method\": \"GET\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"weather.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v2/conditions/codes\",\n \"headers\": {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://weather.api.dtn.com/v2/conditions/codes',\n headers: {\n 'Accept-Encoding': 'SOME_STRING_VALUE',\n Accept: 'SOME_STRING_VALUE',\n Authorization: 'Bearer REPLACE_BEARER_TOKEN'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://weather.api.dtn.com/v2/conditions/codes\");\n\nreq.headers({\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n});\n\nreq.end(function (res) {\n if (res.error) throw new Error(res.error);\n\n console.log(res.body);\n});\n"},{"lang":"Objc + Nsurlsession","source":"#import \n\nNSDictionary *headers = @{ @\"Accept-Encoding\": @\"SOME_STRING_VALUE\",\n @\"Accept\": @\"SOME_STRING_VALUE\",\n @\"Authorization\": @\"Bearer REPLACE_BEARER_TOKEN\" };\n\nNSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@\"https://weather.api.dtn.com/v2/conditions/codes\"]\n cachePolicy:NSURLRequestUseProtocolCachePolicy\n timeoutInterval:10.0];\n[request setHTTPMethod:@\"GET\"];\n[request setAllHTTPHeaderFields:headers];\n\nNSURLSession *session = [NSURLSession sharedSession];\nNSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request\n completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {\n if (error) {\n NSLog(@\"%@\", error);\n } else {\n NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;\n NSLog(@\"%@\", httpResponse);\n }\n }];\n[dataTask resume];"},{"lang":"Ocaml + Cohttp","source":"open Cohttp_lwt_unix\nopen Cohttp\nopen Lwt\n\nlet uri = Uri.of_string \"https://weather.api.dtn.com/v2/conditions/codes\" in\nlet headers = Header.add_list (Header.init ()) [\n (\"Accept-Encoding\", \"SOME_STRING_VALUE\");\n (\"Accept\", \"SOME_STRING_VALUE\");\n (\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n] in\n\nClient.call ~headers `GET uri\n>>= fun (res, body_stream) ->\n (* Do stuff with the result *)"},{"lang":"Php + Curl","source":" \"https://weather.api.dtn.com/v2/conditions/codes\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Accept: SOME_STRING_VALUE\",\n \"Accept-Encoding: SOME_STRING_VALUE\",\n \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"},{"lang":"Php + Http1","source":"setUrl('https://weather.api.dtn.com/v2/conditions/codes');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n 'Accept-Encoding' => 'SOME_STRING_VALUE',\n 'Accept' => 'SOME_STRING_VALUE',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"},{"lang":"Php + Http2","source":"setRequestUrl('https://weather.api.dtn.com/v2/conditions/codes');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n 'Accept-Encoding' => 'SOME_STRING_VALUE',\n 'Accept' => 'SOME_STRING_VALUE',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"weather.api.dtn.com\")\n\nheaders = {\n 'Accept-Encoding': \"SOME_STRING_VALUE\",\n 'Accept': \"SOME_STRING_VALUE\",\n 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n }\n\nconn.request(\"GET\", \"/v2/conditions/codes\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://weather.api.dtn.com/v2/conditions/codes\"\n\nheaders = {\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://weather.api.dtn.com/v2/conditions/codes\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept-Encoding\"] = 'SOME_STRING_VALUE'\nrequest[\"Accept\"] = 'SOME_STRING_VALUE'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://weather.api.dtn.com/v2/conditions/codes \\\n --header 'Accept: SOME_STRING_VALUE' \\\n --header 'Accept-Encoding: SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Shell + Httpie","source":"http GET https://weather.api.dtn.com/v2/conditions/codes \\\n Accept:SOME_STRING_VALUE \\\n Accept-Encoding:SOME_STRING_VALUE \\\n Authorization:'Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Shell + Wget","source":"wget --quiet \\\n --method GET \\\n --header 'Accept-Encoding: SOME_STRING_VALUE' \\\n --header 'Accept: SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --output-document \\\n - https://weather.api.dtn.com/v2/conditions/codes"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n \"Accept-Encoding\": \"SOME_STRING_VALUE\",\n \"Accept\": \"SOME_STRING_VALUE\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://weather.api.dtn.com/v2/conditions/codes\")! as URL,\n cachePolicy: .useProtocolCachePolicy,\n timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n if (error != nil) {\n print(error)\n } else {\n let httpResponse = response as? HTTPURLResponse\n print(httpResponse)\n }\n})\n\ndataTask.resume()"}]}},"/v2/conditions/batch":{"post":{"tags":["Endpoints"],"summary":"Batch Request","description":"This endpoint provides hourly forecast, current, and historical conditions for any specific point on the globe. You can specify the location(s), the weather parameters of interest, and both the start time from 1995-01-01T00:00:00Z to an end time 15 days in the future. This endpoint supports requests with hourly data for up to two hundred locations. It does not provide aggregated data. The API returns a presigned URL that allows the requested data to be downloaded in a CSV.\n \nCommon uses include weather monitoring, atmospheric research, and localized operations, such as event planning.\n\nQuota calculation: Please note that the quota charged is based on the number of locations in your API request, and not the number of requests. One request with 200 locations uses the same API quota as 200 requests with one location each.\n\n## Query Parameters:\nUser query parameters to control the results in the response body: \n### location\n* Specify a single or multiple locations as latitude (`lat`) and longitude (`lon`). It supports up to 200 unique locations in a single request. \n\n### parameters \n* Specify `parameters` to filter by specific atmospheric weather parameters. Include multiple as comma-separated values. If no parameters are requested, the API will return default parameters. The API supports forecast, current, and historical parameters, but not aggregation parameters.\n\n### startTime and endTime\n* These parameters determine the time range for which the API returns data. Both startTime and endTime are inclusive, meaning that data at both timestamps is included in the response. \n\n* API Behavior based on startTime and endTime: \n\n * **Omitted startTime and endTime:** Returns only current conditions.\n\n * **Both in the Future:** Returns only forecast conditions when both startTime and endTime are in the future.\n\n * **Both in the Past:** Returns only historical conditions when both startTime and endTime are in the past. \n\n * **Spanning Past and Future:** Returns historical, current, and forecast conditions when startTime is in the past and endTime is in the future.\n\n### units\n * Use `units` to request values either as SI (metric) or United States customary (imperial) units.\n + The API returns metric units by default and when `si-std` is specified.\n + The API returns imperial units only when `us-std` is specified.\n\n## Restrictions \n* There is a maximum of two hundred (200) locations. The number of days multiplied by the number of locations cannot exceed 144000. \nIt will return an HTTP 400 response with the following error: \"Maximum of 200 locations OR ((number of days) * (number of locations)) < 144000 is not satisfied.\" \n\n* This endpoint is restricted to a single request per customer at a time. These requests cannot be made concurrently. The API will return an error code until the previous request has finished. If for some reason the first request returns an error, it will still take sixty seconds for the request limit to expire. Afterwards, a new request can be made. \nIt will return an HTTP 429 reponse with the following error: \"You can only use the batch endpoint one (1) request at a time.\"\n\n## Response\n* The API response is a presigned URL that allows the download of a CSV with the requested data. It starts with the latitutde, longtitutde, and valid time followed by the reuqested parameters.\n + Sample CSV Response:\n ```csv\n latitude,longitude,valid_time,airTemp,dewPoint,precipAmount\n 35.4676,-97.5164,1704067200,72.5,68.2,0.0\n 35.4676,-97.5164,1704070800,71.8,67.9,0.1\n 44.9375,-93.201,1704067200,65.3,62.1,0.0\n 44.9375,-93.201,1704070800,64.7,61.8,0.2\n ```\n","security":[{"clientCredentials":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"locations":{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"]},"example":[{"lat":35.46,"lon":-97.51},{"lat":44.93,"lon":-93.2}]},"startTime":{"type":"string","format":"date-time","example":"1995-01-01T00:00:00Z"},"endTime":{"type":"string","format":"date-time","example":"1995-01-10T00:00:00Z"},"parameters":{"type":"array","items":{"type":"string","example":"airTemp"},"example":["airTemp","dewPoint","precipAmount"]},"units":{"type":"string","enum":["si-std","us-std"],"example":"si-std"}},"required":["locations"]}}}},"responses":{"200":{"description":"Successful response","content":{"text/csv":{"schema":{"type":"string","example":"{\n \"url\": \"...\"\n}\n"}}}},"400":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"bad-request","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:one-forecast:/v2/conditions/batch:requestId:78691cec-d741-46a6-baaf-e16282677f1c","errors":{"message":"Maximum of 200 locations OR ((number of days) * (number of locations)) < 144000 is not satisfied"}}}}},"401":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"forbidden","title":"Access to the Requested Resource is Forbidden","status":429,"detail":"You can only use the batch endpoint one (1) request at a time.","instance":"urn:dtn:one-forecast:/v2/conditions/batch:requestId:71b71774-4754-41aa-9a65-225f9a825c36"}}}}},"x-codeSamples":[{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://weather.api.dtn.com/v2/conditions/batch\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"Authorization: Bearer REPLACE_BEARER_TOKEN\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://weather.api.dtn.com/v2/conditions/batch\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nrequest.AddParameter(\"application/json\", \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://weather.api.dtn.com/v2/conditions/batch\"\n\n\tpayload := strings.NewReader(\"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"},{"lang":"Java + Okhttp","source":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://weather.api.dtn.com/v2/conditions/batch\")\n .post(body)\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"},{"lang":"Java + Unirest","source":"HttpResponse response = Unirest.post(\"https://weather.api.dtn.com/v2/conditions/batch\")\n .header(\"content-type\", \"application/json\")\n .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n .body(\"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\")\n .asString();"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions/batch\",\n \"method\": \"POST\",\n \"headers\": {\n \"content-type\": \"application/json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n },\n \"processData\": false,\n \"data\": \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\"\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n \"locations\": [\n {\n \"lat\": 35.46,\n \"lon\": -97.51\n },\n {\n \"lat\": 44.93,\n \"lon\": -93.2\n }\n ],\n \"startTime\": \"1995-01-01T00:00:00Z\",\n \"endTime\": \"1995-01-10T00:00:00Z\",\n \"parameters\": [\n \"airTemp\",\n \"dewPoint\",\n \"precipAmount\"\n ],\n \"units\": \"si-std\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"POST\", \"https://weather.api.dtn.com/v2/conditions/batch\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Javascript + Jquery","source":"const settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://weather.api.dtn.com/v2/conditions/batch\",\n \"method\": \"POST\",\n \"headers\": {\n \"content-type\": \"application/json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n },\n \"processData\": false,\n \"data\": \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\"\n};\n\n$.ajax(settings).done(function (response) {\n console.log(response);\n});"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"weather.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v2/conditions/batch\",\n \"headers\": {\n \"content-type\": \"application/json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.write(JSON.stringify({\n locations: [{lat: 35.46, lon: -97.51}, {lat: 44.93, lon: -93.2}],\n startTime: '1995-01-01T00:00:00Z',\n endTime: '1995-01-10T00:00:00Z',\n parameters: ['airTemp', 'dewPoint', 'precipAmount'],\n units: 'si-std'\n}));\nreq.end();"},{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n method: 'POST',\n url: 'https://weather.api.dtn.com/v2/conditions/batch',\n headers: {\n 'content-type': 'application/json',\n Authorization: 'Bearer REPLACE_BEARER_TOKEN'\n },\n body: {\n locations: [{lat: 35.46, lon: -97.51}, {lat: 44.93, lon: -93.2}],\n startTime: '1995-01-01T00:00:00Z',\n endTime: '1995-01-10T00:00:00Z',\n parameters: ['airTemp', 'dewPoint', 'precipAmount'],\n units: 'si-std'\n },\n json: true\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://weather.api.dtn.com/v2/conditions/batch\");\n\nreq.headers({\n \"content-type\": \"application/json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n});\n\nreq.type(\"json\");\nreq.send({\n \"locations\": [\n {\n \"lat\": 35.46,\n \"lon\": -97.51\n },\n {\n \"lat\": 44.93,\n \"lon\": -93.2\n }\n ],\n \"startTime\": \"1995-01-01T00:00:00Z\",\n \"endTime\": \"1995-01-10T00:00:00Z\",\n \"parameters\": [\n \"airTemp\",\n \"dewPoint\",\n \"precipAmount\"\n ],\n \"units\": \"si-std\"\n});\n\nreq.end(function (res) {\n if (res.error) throw new Error(res.error);\n\n console.log(res.body);\n});\n"},{"lang":"Objc + Nsurlsession","source":"#import \n\nNSDictionary *headers = @{ @\"content-type\": @\"application/json\",\n @\"Authorization\": @\"Bearer REPLACE_BEARER_TOKEN\" };\nNSDictionary *parameters = @{ @\"locations\": @[ @{ @\"lat\": @35.46, @\"lon\": @-97.51 }, @{ @\"lat\": @44.93, @\"lon\": @-93.2 } ],\n @\"startTime\": @\"1995-01-01T00:00:00Z\",\n @\"endTime\": @\"1995-01-10T00:00:00Z\",\n @\"parameters\": @[ @\"airTemp\", @\"dewPoint\", @\"precipAmount\" ],\n @\"units\": @\"si-std\" };\n\nNSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];\n\nNSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@\"https://weather.api.dtn.com/v2/conditions/batch\"]\n cachePolicy:NSURLRequestUseProtocolCachePolicy\n timeoutInterval:10.0];\n[request setHTTPMethod:@\"POST\"];\n[request setAllHTTPHeaderFields:headers];\n[request setHTTPBody:postData];\n\nNSURLSession *session = [NSURLSession sharedSession];\nNSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request\n completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {\n if (error) {\n NSLog(@\"%@\", error);\n } else {\n NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;\n NSLog(@\"%@\", httpResponse);\n }\n }];\n[dataTask resume];"},{"lang":"Ocaml + Cohttp","source":"open Cohttp_lwt_unix\nopen Cohttp\nopen Lwt\n\nlet uri = Uri.of_string \"https://weather.api.dtn.com/v2/conditions/batch\" in\nlet headers = Header.add_list (Header.init ()) [\n (\"content-type\", \"application/json\");\n (\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n] in\nlet body = Cohttp_lwt_body.of_string \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\" in\n\nClient.call ~headers ~body `POST uri\n>>= fun (res, body_stream) ->\n (* Do stuff with the result *)"},{"lang":"Php + Curl","source":" \"https://weather.api.dtn.com/v2/conditions/batch\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n \"content-type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"},{"lang":"Php + Http1","source":"setUrl('https://weather.api.dtn.com/v2/conditions/batch');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n 'content-type' => 'application/json',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$request->setBody('{\"locations\":[{\"lat\":35.46,\"lon\":-97.51},{\"lat\":44.93,\"lon\":-93.2}],\"startTime\":\"1995-01-01T00:00:00Z\",\"endTime\":\"1995-01-10T00:00:00Z\",\"parameters\":[\"airTemp\",\"dewPoint\",\"precipAmount\"],\"units\":\"si-std\"}');\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"},{"lang":"Php + Http2","source":"append('{\"locations\":[{\"lat\":35.46,\"lon\":-97.51},{\"lat\":44.93,\"lon\":-93.2}],\"startTime\":\"1995-01-01T00:00:00Z\",\"endTime\":\"1995-01-10T00:00:00Z\",\"parameters\":[\"airTemp\",\"dewPoint\",\"precipAmount\"],\"units\":\"si-std\"}');\n\n$request->setRequestUrl('https://weather.api.dtn.com/v2/conditions/batch');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n 'content-type' => 'application/json',\n 'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"weather.api.dtn.com\")\n\npayload = \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\"\n\nheaders = {\n 'content-type': \"application/json\",\n 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n }\n\nconn.request(\"POST\", \"/v2/conditions/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://weather.api.dtn.com/v2/conditions/batch\"\n\npayload = {\n \"locations\": [\n {\n \"lat\": 35.46,\n \"lon\": -97.51\n },\n {\n \"lat\": 44.93,\n \"lon\": -93.2\n }\n ],\n \"startTime\": \"1995-01-01T00:00:00Z\",\n \"endTime\": \"1995-01-10T00:00:00Z\",\n \"parameters\": [\"airTemp\", \"dewPoint\", \"precipAmount\"],\n \"units\": \"si-std\"\n}\nheaders = {\n \"content-type\": \"application/json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://weather.api.dtn.com/v2/conditions/batch\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\nrequest.body = \"{\\\"locations\\\":[{\\\"lat\\\":35.46,\\\"lon\\\":-97.51},{\\\"lat\\\":44.93,\\\"lon\\\":-93.2}],\\\"startTime\\\":\\\"1995-01-01T00:00:00Z\\\",\\\"endTime\\\":\\\"1995-01-10T00:00:00Z\\\",\\\"parameters\\\":[\\\"airTemp\\\",\\\"dewPoint\\\",\\\"precipAmount\\\"],\\\"units\\\":\\\"si-std\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://weather.api.dtn.com/v2/conditions/batch \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/json' \\\n --data '{\"locations\":[{\"lat\":35.46,\"lon\":-97.51},{\"lat\":44.93,\"lon\":-93.2}],\"startTime\":\"1995-01-01T00:00:00Z\",\"endTime\":\"1995-01-10T00:00:00Z\",\"parameters\":[\"airTemp\",\"dewPoint\",\"precipAmount\"],\"units\":\"si-std\"}'"},{"lang":"Shell + Httpie","source":"echo '{\"locations\":[{\"lat\":35.46,\"lon\":-97.51},{\"lat\":44.93,\"lon\":-93.2}],\"startTime\":\"1995-01-01T00:00:00Z\",\"endTime\":\"1995-01-10T00:00:00Z\",\"parameters\":[\"airTemp\",\"dewPoint\",\"precipAmount\"],\"units\":\"si-std\"}' | \\\n http POST https://weather.api.dtn.com/v2/conditions/batch \\\n Authorization:'Bearer REPLACE_BEARER_TOKEN' \\\n content-type:application/json"},{"lang":"Shell + Wget","source":"wget --quiet \\\n --method POST \\\n --header 'content-type: application/json' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --body-data '{\"locations\":[{\"lat\":35.46,\"lon\":-97.51},{\"lat\":44.93,\"lon\":-93.2}],\"startTime\":\"1995-01-01T00:00:00Z\",\"endTime\":\"1995-01-10T00:00:00Z\",\"parameters\":[\"airTemp\",\"dewPoint\",\"precipAmount\"],\"units\":\"si-std\"}' \\\n --output-document \\\n - https://weather.api.dtn.com/v2/conditions/batch"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n \"content-type\": \"application/json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n]\nlet parameters = [\n \"locations\": [\n [\n \"lat\": 35.46,\n \"lon\": -97.51\n ],\n [\n \"lat\": 44.93,\n \"lon\": -93.2\n ]\n ],\n \"startTime\": \"1995-01-01T00:00:00Z\",\n \"endTime\": \"1995-01-10T00:00:00Z\",\n \"parameters\": [\"airTemp\", \"dewPoint\", \"precipAmount\"],\n \"units\": \"si-std\"\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://weather.api.dtn.com/v2/conditions/batch\")! as URL,\n cachePolicy: .useProtocolCachePolicy,\n timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n if (error != nil) {\n print(error)\n } else {\n let httpResponse = response as? HTTPURLResponse\n print(httpResponse)\n }\n})\n\ndataTask.resume()"}]}}},"components":{"responses":{"bad-request":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"bad-request","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"bad-request-batch":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"bad-request","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:one-forecast:/v2/conditions/batch:requestId:78691cec-d741-46a6-baaf-e16282677f1c","errors":{"message":"Maximum of 200 locations OR ((number of days) * (number of locations)) < 144000 is not satisfied"}}}}},"rate-limit-batch":{"description":"Too Many Requests","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"forbidden","title":"Access to the Requested Resource is Forbidden","status":429,"detail":"You can only use the batch endpoint one (1) request at a time.","instance":"urn:dtn:one-forecast:/v2/conditions/batch:requestId:71b71774-4754-41aa-9a65-225f9a825c36"}}}},"unauthorized":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"not-acceptable":{"description":"Unable to produce a response matching the Accept request header.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"example":{"type":"not-acceptable","title":"Not Acceptable","detail":"The Accept header value is invalid or unsupported.","status":406,"instance":"urn:dtn:one-forecast:/v2/conditions:requestId:123e4567-e89b-12d3-a458-426614176000"}}}}},"schemas":{"general-error":{"type":"object","properties":{"detail":{"type":"string","description":"A human-readable description of the specific error."},"type":{"type":"string","description":"The error type."},"title":{"type":"string","description":"A short, human-readable title for the general error type."},"status":{"type":"number","description":"The HTTP status code."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}},"additionalProperties":true},"BatchRequest":{"type":"object","properties":{"locations":{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"]},"example":[{"lat":35.46,"lon":-97.51},{"lat":44.93,"lon":-93.2}]},"startTime":{"type":"string","format":"date-time","example":"1995-01-01T00:00:00Z"},"endTime":{"type":"string","format":"date-time","example":"1995-01-10T00:00:00Z"},"parameters":{"type":"array","items":{"type":"string","example":"airTemp"},"example":["airTemp","dewPoint","precipAmount"]},"units":{"type":"string","enum":["si-std","us-std"],"example":"si-std"}},"required":["locations"]},"ConditionsResponse":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string"},"features":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}}},"properties":{"type":"object","properties":{"2023-10-01T00:00:00Z":{"type":"object","properties":{"airTemp":{"type":"number"},"airTempLowerBound":{"type":"number"},"airTempNearGround":{"type":"number"},"airTempUpperBound":{"type":"number"},"totalCloudCover":{"type":"number"},"conditionalPrecipProbFreezing":{"type":"number"},"conditionalPrecipProbFrozen":{"type":"number"},"conditionalPrecipProbLiquid":{"type":"number"},"conditionalPrecipProbRefrozen":{"type":"number"},"convectivePrecipAmount":{"type":"number"},"dewPoint":{"type":"number"},"effectiveCloudCover":{"type":"number"},"feelsLikeTemp":{"type":"number"},"heatIndex":{"type":"number"},"iceAccretionAmount":{"type":"number"},"longWaveRadiation":{"type":"number"},"mslPressure":{"type":"number"},"precipAmount":{"type":"number"},"precipAmountMax":{"type":"number"},"precipAmountMin":{"type":"number"},"precipProb":{"type":"number"},"precipType":{"type":"number"},"relativeHumidity":{"type":"number"},"relativeHumidityUpperBound":{"type":"number"},"relativeHumidityLowerBound":{"type":"number"},"shortWaveRadiation":{"type":"number"},"globalRadiation":{"type":"number"},"snowFactor":{"type":"number"},"snowfallAmount":{"type":"number"},"sunshineDuration":{"type":"number"},"surfacePressure":{"type":"number"},"uWind":{"type":"number"},"visibility":{"type":"number"},"visibilityObstructionType":{"type":"number"},"vWind":{"type":"number"},"weatherCode":{"type":"number"},"windChill":{"type":"number"},"windDirection":{"type":"number"},"windGust":{"type":"number"},"windSpeed":{"type":"number"},"windSpeed100m":{"type":"number"},"windSpeed2m":{"type":"number"},"windSpeedLowerBound":{"type":"number"},"windSpeedUpperBound":{"type":"number"}}}}}}}}},"example":{"url":"https://weather.api.dtn.com/v2/conditions?lat=35.47&lon=-97.51¶meters=airTemp,airTempLowerBound,airTempNearGround,airTempUpperBound,totalCloudCover,conditionalPrecipProbFreezing,conditionalPrecipProbFrozen,conditionalPrecipProbLiquid,conditionalPrecipProbRefrozen,convectivePrecipAmount,dewPoint,effectiveCloudCover,feelsLikeTemp,heatIndex,iceAccretionAmount,longWaveRadiation,mslPressure,precipAmount,precipAmountMax,precipAmountMin,precipProb,precipType,relativeHumidity,relativeHumidityUpperBound,relativeHumidityLowerBound,shortWaveRadiation,globalRadiation,snowFactor,snowfallAmount,sunshineDuration,surfacePressure,uWind,visibility,visibilityObstructionType,vWind,weatherCode,windChill,windDirection,windGust,windSpeed,windSpeed100m,windSpeed2m,windSpeedLowerBound,windSpeedUpperBound,windGustLowerBound,windGustUpperBound&startTime=2023-10-01T00:06:10Z&endTime=2023-10-01T02:06:10Z&units=us-std","type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-97.51,35.47]},"properties":{"2023-10-01T00:00:00Z":{"airTemp":84.29,"airTempLowerBound":82.13,"airTempNearGround":84.33,"airTempUpperBound":86.81,"totalCloudCover":12.6,"conditionalPrecipProbFreezing":0,"conditionalPrecipProbFrozen":0,"conditionalPrecipProbLiquid":100,"conditionalPrecipProbRefrozen":0,"convectivePrecipAmount":0,"dewPoint":59.45,"effectiveCloudCover":12.6,"feelsLikeTemp":84.12,"heatIndex":84.12,"iceAccretionAmount":0,"longWaveRadiation":397.42,"mslPressure":1014.81,"precipAmount":0,"precipAmountMax":0.01,"precipAmountMin":0,"precipProb":0,"precipType":2,"relativeHumidity":43.15,"relativeHumidityUpperBound":50.21,"relativeHumidityLowerBound":40.44,"shortWaveRadiation":46,"globalRadiation":16.56,"snowFactor":0,"snowfallAmount":0,"sunshineDuration":0,"surfacePressure":972.47,"uWind":-7.61,"visibility":10,"visibilityObstructionType":1,"vWind":8.7,"weatherCode":1,"windChill":84.29,"windDirection":139.1,"windGust":18.34,"windSpeed":11.59,"windSpeed100m":18.34,"windSpeed2m":8.18,"windSpeedLowerBound":11.59,"windSpeedUpperBound":22.57,"windGustLowerBound":10.54,"windGustUpperBound":19.53},"2023-10-01T01:00:00Z":{"airTemp":80.69,"airTempLowerBound":77.45,"airTempNearGround":77.62,"airTempUpperBound":83.39,"totalCloudCover":12.9,"conditionalPrecipProbFreezing":0,"conditionalPrecipProbFrozen":0,"conditionalPrecipProbLiquid":100,"conditionalPrecipProbRefrozen":0,"convectivePrecipAmount":0,"dewPoint":60.17,"effectiveCloudCover":12.9,"feelsLikeTemp":81.4,"heatIndex":81.4,"iceAccretionAmount":0,"longWaveRadiation":388.07,"mslPressure":1015.36,"precipAmount":0,"precipAmountMax":0.01,"precipAmountMin":0,"precipProb":0,"precipType":2,"relativeHumidity":49.67,"relativeHumidityUpperBound":52.21,"relativeHumidityLowerBound":46.44,"shortWaveRadiation":0,"globalRadiation":0,"snowFactor":0,"snowfallAmount":0,"sunshineDuration":0,"surfacePressure":972.87,"uWind":-7.72,"visibility":10,"visibilityObstructionType":1,"vWind":7.48,"weatherCode":1,"windChill":80.69,"windDirection":133.9,"windGust":18.72,"windSpeed":10.65,"windSpeed100m":21.39,"windSpeed2m":7.36,"windSpeedLowerBound":10.98,"windSpeedUpperBound":23.04,"windGustLowerBound":9.54,"windGustUpperBound":18.53},"2023-10-01T02:00:00Z":{"airTemp":78.71,"airTempLowerBound":76.19,"airTempNearGround":75.54,"airTempUpperBound":81.41,"totalCloudCover":13.3,"conditionalPrecipProbFreezing":0,"conditionalPrecipProbFrozen":0,"conditionalPrecipProbLiquid":100,"conditionalPrecipProbRefrozen":0,"convectivePrecipAmount":0,"dewPoint":60.71,"effectiveCloudCover":13.3,"feelsLikeTemp":78.71,"heatIndex":78.71,"iceAccretionAmount":0,"longWaveRadiation":383.11,"mslPressure":1015.87,"precipAmount":0,"precipAmountMax":0.01,"precipAmountMin":0,"precipProb":0,"precipType":2,"relativeHumidity":54.1,"relativeHumidityUpperBound":57.21,"relativeHumidityLowerBound":50.44,"shortWaveRadiation":0,"globalRadiation":0,"snowFactor":0,"snowfallAmount":0,"sunshineDuration":0,"surfacePressure":973.28,"uWind":-7.58,"visibility":10,"visibilityObstructionType":1,"vWind":7.93,"weatherCode":1,"windChill":78.71,"windDirection":136.5,"windGust":19.1,"windSpeed":10.92,"windSpeed100m":22.3,"windSpeed2m":7.63,"windSpeedLowerBound":10.38,"windSpeedUpperBound":23.49,"windGustLowerBound":11.54,"windGustUpperBound":20.53}}}]}},"ParametersResponseWithAggregation":{"type":"object","properties":{"parameter name":{"type":"object","description":"The name of the parameter.","properties":{"metricUnit":{"type":"string","description":"The metric unit used for this parameter."},"imperialUnit":{"type":"string","description":"The imperial unit used for this parameter."},"type":{"type":"string","description":"The parameter type."},"description":{"type":"string","description":"A description of what this parameter means."},"notes":{"type":"string","description":"Additional information related to this parameter."},"aggregationMethods":{"type":"array","items":{"type":"string"},"description":"Aggregation methods available to the parameter."}}}},"example":{"airTemp":{"metricUnit":"Celsius","imperialUnit":"Fahrenheit","type":"number","description":"Air temperature at 2 meters above ground level.","notes":"","aggregationMethods":["Max","Min","Avg"]}}},"ParametersResponse":{"type":"object","properties":{"parameter name":{"type":"object","description":"The name of the parameter.","properties":{"metricUnit":{"type":"string","description":"The metric unit used for this parameter."},"imperialUnit":{"type":"string","description":"The imperial unit used for this parameter."},"type":{"type":"string","description":"The parameter type."},"description":{"type":"string","description":"A description of what this parameter means."},"notes":{"type":"string","description":"Additional information related to this parameter."}}}},"example":{"airTemp":{"metricUnit":"Celsius","imperialUnit":"Fahrenheit","type":"number","description":"Air temperature at 2 meters above ground level.","notes":""}}},"WeatherCodeResponse":{"type":"object","properties":{"weather code":{"type":"object","description":"A Unique value representing the weather condition.","properties":{"condition":{"type":"string","description":"Short description of the weather condition."},"description":{"type":"string","description":"Description of the weather condition."}}}},"example":{"1":{"condition":"Clear Skies","description":"Clouds cover 0-20% of the sky."}}}},"parameters":{"lat":{"name":"lat","in":"query","schema":{"type":"number","format":"float"},"example":35.47,"required":true},"lon":{"name":"lon","in":"query","schema":{"type":"number","format":"float"},"example":-97.51,"required":true},"startTime":{"name":"startTime","in":"query","schema":{"type":"string","format":"date-time"},"example":"2023-10-01T00:06:10Z"},"endTime":{"name":"endTime","in":"query","schema":{"type":"string","format":"date-time"},"example":"2023-10-14T00:06:10Z"},"parameters":{"name":"parameters","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}},"example":"airTemp,precipAmount,weatherCode"},"units":{"name":"units","in":"query","schema":{"type":"string"},"example":"us-std"},"interval":{"name":"interval","in":"query","required":false,"schema":{"type":"string"},"description":"Aggregation or interpolation interval (e.g. 2h, 24h, 1d, 15m).","example":"24h"},"aggregationTimeLabel":{"name":"aggregationTimeLabel","in":"query","required":false,"schema":{"type":"string","enum":["start","end"],"default":"start"},"description":"Controls whether the timestamp in the response represents the start or end of the aggregation window. Only valid when `interval` is specified.","example":"end"}},"securitySchemes":{"clientCredentials":{"type":"oauth2","x-receive-token-in":"request-body","flows":{"clientCredentials":{"tokenUrl":"https://api.auth.dtn.com/v1/tokens/authorize"}},"description":"# Using DAIS for M2M/API Auth\nYou have been given a Client ID and a Client Secret, which are used to request a DTN Access Token. DTN Access Tokens are required when making calls to each and every DTN API endpoint. The following information provides additional details on these tokens and how they are generated.\n## What is an Access Token and how is it different from an API Key?\nAn API Key is a random string of characters that an API uses to authorize whether or not a calling client has approved access to an endpoint. These keys are a non-standard approach to API authorization and are generally issued on a per-API basis.\n\nAn Access Token is also a string of characters but is a base-64 encoded JavaScript Object Notation Web Token, or JWT. JWTs are a widely accepted standard that use OAuth concepts and approaches. \n\nBoth API Keys and Access Tokens are used in an Authorization Request Header as a Bearer, meaning there is no difference in where you put this string of characters when you make calls to DTN APIs.\n## How to generate an Access Token?\nWhen requested, an Access Token is generated for your specific Client (ID/Secret) and for a specific API. The DTN Auth and Identity Service (DAIS) generates new Access Tokens for your client. The DAIS endpoint is `POST https://api.auth.dtn.com/v1/tokens/authorize`.\n\nThis endpoint takes two Header parameters:\n * `Content-Type: application/json`\n * `Accept: application/json`\n\nThis endpoint takes four parameters in the Request Body:\n * `grant_type`: this should always be client_credentials for generating machine-to-machine tokens.\n * `client_id`: this is the Client ID or Application ID using the token and is given to you by DTN's Identity Team. This ID will never change for your client/application.\n * `client_secret`: this is the Client Secret that is associated with the Application ID and is given to you by DTN's Identity Team. This key is subject to rotation for security purposes but always with the client's knowledge.\n * `audience`: this is the API for which this Access Token will be used. For the DTN Weather Conditions API, you need to use the following audience: https://weather.api.dtn.com/conditions\n\nYou can use this CURL command template as a reference for obtaining an access token:\n ```\n curl --location --request POST 'https://api.auth.dtn.com/v1/tokens/authorize' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"grant_type\": \"client_credentials\",\n\"client_id\": \"insert your client id here\",\n\"client_secret\": \"insert your client secret here\",\n\"audience\": \"insert your audience here\"\n}' \n ```\n\n*This document, for demonstration purposes, supplies a client_id and client_secret in all code examples. This client/application is for a fictitious API and cannot be used in practice to gain unauthorized access to any other DTN API.*\nUpon generating a new Access Token, you should receive an HTTP Response from DAIS similar to this:\n ```\n {\n \"data\": {\n \"access_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InpfX21pZW13NGhoTmdvQWQxR3N6ciJ9.eyJodHRwczovL2F1dGguZHRuLmNvbS9jdXN0b21lcklkIjoiMTIzNDU2Nzg5MERlbW8iLCJodHRwczovL2F1dGguZHRuLmNvbS9wcm9kdWN0Q29kZSI6IkRlbW9BcGlQIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcmVxdWVzdGVySXAiOiIxOC4yMTMuMTc0LjI3IiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcnBzIjoiMTAwIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vdGllciI6IkJhc2ljIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcXVvdGEiOiI5OTk5OTkiLCJpc3MiOiJodHRwczovL2lkLmF1dGguZHRuLmNvbS8iLCJzdWIiOiJuZnlPM0tpS1BSOE4wREtSNUNMOGpTOUdGQkNEZXlGTUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9kZW1vLWFwaS5hdXRoLmR0bi5jb20vIiwiaWF0IjoxNjU2MDk5MDY4LCJleHAiOjE2NTYwOTkxNTgsImF6cCI6Im5meU8zS2lLUFI4TjBES1I1Q0w4alM5R0ZCQ0RleUZNIiwic2NvcGUiOiJyZWFkOmRlbW8gY3JlYXRlOmRlbW8gdXBkYXRlOmRlbW8iLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJwZXJtaXNzaW9ucyI6WyJyZWFkOmRlbW8iLCJjcmVhdGU6ZGVtbyIsInVwZGF0ZTpkZW1vIl19.0VHdyp1w9PPFVI0FPheAwuKZwb5C25rwP-LPMXcSNoRmouvga1DZtNLA67ZzE_sAlc_VpaDRr6daLKr_Alw4347mw9sdjP8wKR27kCZa9JZK5PGQMmXHscATbzBEJYpCPklfyGaajgymqTBGnedcv8F0UvlRzQPsFeRPnVoX7BWOSXpMbyToGiXWkQLBQT7r96KAmLZOPJFZspPtjw-wH2mSL2WNa_nkB4j5vMGhGxlKiNRsKb30TH_WAel2hsxNlcPK3XHCmrMTYsNnu7HNqOTMn2i0__0rvBrhSWEw-_grqQDmWFJuWd7Qhi1q81AaJcdqgoSa_efz93QFclJUNw\",\n \"scope\": \"read:demo create:demo update:demo\",\n \"expires_in\": 90,\n \"token_type\": \"Bearer\"\n },\n \"meta\": {\n \"date_time\": \"2022-06-24T19:09:42.963Z\",\n \"name\": \"v1.tokens.authorize\",\n \"uuid\": \"ee6f9feb-dcf8-4421-a6fd-efd6beabdaa9\",\n \"start_timestamp\": 1656097782509,\n \"end_timestamp\": 1656097782963,\n \"execution_time\": 454\n }\n }\n ```\nLooking at this Response, you will see:\n * `access_token`: contains the JWT Access Token string you will use as your Bearer token.\n * `scope`: contains the scopes that this Access Token gives you permissions to access.\n * `expires_in`: contains the length of time before this Access Token will expire, in seconds.\n * `token_type`: verifies that this Access Token should be used as a Bearer token.\n\n## How to use an Access Token after one is generated?\nOnce a new Access Token is obtained, it is used in each call to a DTN API endpoint as a Bearer token in an Authorization Request Header. For example:\n ```\n Header: 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InpfX21pZW13NGhoTmdvQWQxR3N6ciJ9.eyJodHRwczovL2F1dGguZHRuLmNvbS9jdXN0b21lcklkIjoiMTIzNDU2Nzg5MERlbW8iLCJodHRwczovL2F1dGguZHRuLmNvbS9wcm9kdWN0Q29kZSI6IkRlbW9BcGlQIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcmVxdWVzdGVySXAiOiIxOC4yMTMuMTc0LjI3IiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcnBzIjoiMTAwIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vdGllciI6IkJhc2ljIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcXVvdGEiOiI5OTk5OTkiLCJpc3MiOiJodHRwczovL2lkLmF1dGguZHRuLmNvbS8iLCJzdWIiOiJuZnlPM0tpS1BSOE4wREtSNUNMOGpTOUdGQkNEZXlGTUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9kZW1vLWFwaS5hdXRoLmR0bi5jb20vIiwiaWF0IjoxNjU2MDk5MDY4LCJleHAiOjE2NTYwOTkxNTgsImF6cCI6Im5meU8zS2lLUFI4TjBES1I1Q0w4alM5R0ZCQ0RleUZNIiwic2NvcGUiOiJyZWFkOmRlbW8gY3JlYXRlOmRlbW8gdXBkYXRlOmRlbW8iLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJwZXJtaXNzaW9ucyI6WyJyZWFkOmRlbW8iLCJjcmVhdGU6ZGVtbyIsInVwZGF0ZTpkZW1vIl19.0VHdyp1w9PPFVI0FPheAwuKZwb5C25rwP-LPMXcSNoRmouvga1DZtNLA67ZzE_sAlc_VpaDRr6daLKr_Alw4347mw9sdjP8wKR27kCZa9JZK5PGQMmXHscATbzBEJYpCPklfyGaajgymqTBGnedcv8F0UvlRzQPsFeRPnVoX7BWOSXpMbyToGiXWkQLBQT7r96KAmLZOPJFZspPtjw-wH2mSL2WNa_nkB4j5vMGhGxlKiNRsKb30TH_WAel2hsxNlcPK3XHCmrMTYsNnu7HNqOTMn2i0__0rvBrhSWEw-_grqQDmWFJuWd7Qhi1q81AaJcdqgoSa_efz93QFclJUNw'\n ```\n\n## Deconstructing the Access Token\nA DTN Access Token carries information within its JWT Body that is available on every API call. By deconstructing the JWT token, our Access Tokens will resemble:\n ```\n {\n \"https://auth.dtn.com/customerId\": \"1234567890Demo\",\n \"https://auth.dtn.com/productCode\": \"DemoApiP\",\n \"https://auth.dtn.com/requesterIp\": \"18.213.174.27\",\n \"https://auth.dtn.com/rps\": \"100\",\n \"https://auth.dtn.com/tier\": \"Basic\",\n \"https://auth.dtn.com/quota\": \"999999\",\n \"iss\": \"https://id.auth.dtn.com/\",\n \"sub\": \"nfyO3KiKPR8N0DKR5CL8jS9GFBCDeyFM@clients\",\n \"aud\": \"https://demo-api.auth.dtn.com/\",\n \"iat\": 1656099068,\n \"exp\": 1656099158,\n \"azp\": \"nfyO3KiKPR8N0DKR5CL8jS9GFBCDeyFM\",\n \"scope\": \"read:demo create:demo update:demo\",\n \"gty\": \"client-credentials\",\n \"permissions\": [\n \"read:demo\",\n \"create:demo\",\n \"update:demo\"\n ]\n }\n ```\n### Description of Claims\n\n | Claim | Type | Description |\n | -----------------------------------| --------------------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | `https://auth.dtn.com/customerId` | String | Custom DTN claim containing the Customer ID found in the DTN Order Management/Salesforce system associated with this token. |\n | `https://auth.dtn.com/productCode` | String | Custom DTN claim containing the Identity product code associated with this token. |\n | `https://auth.dtn.com/requesterIp` | String | Custom DTN claim containing the IP address of the requesting client. |\n | `https://auth.dtn.com/rps` | String | Custom DTN claim containing the maximum rate per second this customer is authorized to utilize. |\n | `https://auth.dtn.com/tier` | String | Custom DTN claim containing the data tier the customer purchased for the requested access. |\n | `https://auth.dtn.com/quota` | String | Custom DTN claim containing the maximum yearly quota the customer purchased for calling DTN endpoints for the specific product. |\n | `iss` | String (URI) | The Security Token Service (STS) that issues and returns the token. If this value is not from `https://id.auth.dtn.com/`, the token should not be considered trusted. |\n | `sub` | String (URI) | The principle about which the token asserts information (the User ID or Client ID within the Identity Provider). A User ID will start with a prefix of `auth0\\|`, while the Client ID will end with the suffix `@clients`. |\n | `aud` | String \\| Array (Strings) (URI \\| [URI, …]) | Identifies the intended recipient(s) of the token – its audience. The token should be rejected if the audience does not contain values expected by the calling application. |\n | `iat` | Number (Timestamp) | “Issued At” indicates when the authentication for this token occurred. |\n | `exp` | Number (Timestamp) | The “expiration time” on or after which the JWT must not be accepted for processing. |\n | `azp` | String | The application/client ID of the client using the token. The application can cat as itself or on behalf of a user. |\n | `gty` | String (Space-delimited) | The grant type that was used to request the token – not an RFC 7519 registered claim (Auth0-specific). |\n | `permissions` | Array (Strings) | The grant type that was used to request the token – not an RFC 7519 registered claim (Auth0-specific). |\n\n "}}}}