{"openapi":"3.0.0","info":{"title":"DTN Climatology API","version":"1.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 Climatology API. This service empowers consumers with accurate, global, location-specific climatological data to help inform decisions, optimize operations, and develop strategies based on historical environmental conditions.\n\nIt caters to a wide variety of scenarios, including:\n\n * Agricultural planners developing effective crop rotation schedules, planting strategies, and nutrient application plans to enhance crop health and growth.\n * Environmental researchers analyzing trends and their impacts on local plants and animals.\n * Renewable energy planners determining the best dates and locations for projects and predicting demand based on historical climate data.\n * Urban planners designing resilient infrastructure and evaluating risk for development projects.\n * Health and safety officials enhancing disease prevention and emergency response based on climate.\n * Recreational planners choosing optimal dates for outdoor events and informing tourists.\n\nKey Features:\n\n * Obtain a series of daily climatological parameters for any location on Earth up to 366 days long (January 1 to December 31 including leap day).\n * Access essential content related to air temperature, surface pressure, wind speed, solar radiation, evapotranspiration, and more.\n * Customize requests using easy-to-understand query arguments and receive a standard GeoJSON-formatted response.\n\nThe Daily Historical 10-Year Climatology endpoint provides daily weather climatology of the past ten complete years. The data provided by this endpoint is valid from midnight to 11:59 p.m. in the time zone of the location queried, with a maximum of 366 days of data returned per query. This data is not year-specific; therefore, users can select a specific date and receive data specific to that day each year from the past ten years.\n\nThe interactive documentation that follows is a guide to setting up requests, understanding responses, and leveraging all the features of the Climatology 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 daily climatology 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://climatology.api.dtn.com'\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://climatology.api.dtn.com/v1'\n query_parameters = urllib.parse.urlencode({\n \"lat\": 35.47,\n \"lon\": -97.51,\n \"startDate\": \"08-01\",\n \"endDate\": \"08-03\",\n })\n endpoint = '/daily/ten-year?' + 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://climatology.api.dtn.com"}],"tags":[{"name":"Endpoints","description":"Climatology API has 2 endpoints that each cater to a specific need, whether it's the climatological data at a location for a series of days, or the associated metadata."},{"name":"Parameters","description":"This API offers climatological data for any numerical month and day, including leap day (February 29).\nIt’s possible to aggregate certain parameters over multiple days. To request an aggregation, just substitute the desired parameter name and specify an `interval` greater than 1 day (see `Endpoints` section for details). For example, if air temperature maximum average (`airTempMaxAvg`) has corresponding parameters `airTempMaxAvgMax`, `airTempMaxAvgAvg`, request parameter `airTempMaxAvgAvg` with `interval=2` in the query string to obtain the 2 day average daily maximum air temperature average.\nExpand the table below to view available environmental parameters and each one's description and unit of measurement. The API returns all parameters by default unless specific parameters are requested.\nThe table that follow identify which parameters have corresponding aggregation parameter names.
Click to expand...\n\n| Parameter | Default | Description | Metric units | Imperial units | Aggregation Parameters |\n|--------------------------|---------|-------------|--------------|----------------|------------------------|\n| airTempAvg | Yes | Average daily air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |airTempAvgAvg|\n| airTempStdDev | Yes | Standard deviation of daily average air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |airTempStdDevAvg|\n| airTempMaxAvg | Yes | Average daily maximum air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |airTempMaxAvgMax, airTempMaxAvgAvg|\n| airTempMaxStdDev | Yes | Standard deviation of daily maximum air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |airTempMaxStdDevAvg|\n| airTempMinAvg | Yes | Average daily minimum air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |airTempMinAvgMin, airTempMinAvgAvg|\n| airTempMinStdDev | Yes | Standard deviation of daily minimum air temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |airTempMinStdDevAvg|\n| dewPointAvg | Yes | Average daily dew point temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |dewPointAvgAvg|\n| dewPointStdDev | Yes | Standard deviation of daily average dew point temperature at 2 meters above ground level. | degree Celsius | degree Fahrenheit |dewPointStdDevAvg|\n| potentialEvapotranspirationAmountAvg | Yes | Average daily reference evapotranspiration (amount of water that would transpire and evaporate from a hypothetical reference crop when ample water is available). | millimeter | inch |potentialEvapotranspirationAmountAvgSum|\n| longWaveRadiationAvg | Yes | Average daily downwelling longWave radiation flux (energy emitted from non-solar radiation sources). | watt per square meter | watt per square meter |longWaveRadiationAvgMax, longWaveRadiationAvgMin, longWaveRadiationAvgAvg|\n| longWaveRadiationStdDev | Yes | Standard deviation of daily downwelling longWave radiation flux. | watt per square meter | watt per square meter |longWaveRadiationStdDevAvg|\n| precipAmountAvg | Yes | Average daily accumulated liquid-equivalent precipitation. | millimeter | inch |precipAmountAvgAvg, precipAmountAvgSum|\n| shortWaveRadiationAvg | Yes | Average daily downwelling shortWave radiation flux (high-energy solar radiation that reaches Earth’s surface). | watt per square meter | watt per square meter |shortWaveRadiationAvgMax, shortWaveRadiationAvgMin, shortWaveRadiationAvgAvg|\n| shortWaveRadiationStdDev | Yes | Standard deviation of daily downwelling shortWave radiation flux. | watt per square meter | watt per square meter |shortWaveRadiationStdDevAvg|\n| sunshineDurationAvg | Yes | Average daily duration of sunshine based on cloud cover and downwelling shortWave radiation. | minute | minute |sunshineDurationAvgAvg, sunshineDurationAvgSum|\n| surfacePressureAvg | Yes | Average daily surface barometric pressure. | hectopascal | millibar |surfacePressureAvgAvg|\n| surfacePressureStdDev | Yes | Standard deviation of daily surface barometric pressure. | hectopascal | millibar |surfacePressureStdDevAvg|\n| windSpeedAvg | Yes | Average daily wind speed at 10 meters above ground level. | meter per second | mile per hour |windSpeedAvgAvg|\n| windSpeedStdDev | Yes | Standard deviation of daily wind speed at 10 meters above ground level. | meter per second | mile per hour |windSpeedStdDevAvg|\n
"}],"paths":{"/":{"get":{"tags":["Parameters"]}},"/v1/daily/ten-year":{"get":{"tags":["Endpoints"],"summary":"Daily Climatology","description":"This endpoint provides daily climatology parameters for any point on Earth. Specify the location, parameters of interest, and a date range up to 366 days (from January 1 through December 31, including February 29). Results are valid from local midnight-to-midnight at the requested location and not specific to any year.\n\nUse the query string to customize the results in the response body:\n\n * Specify a location as latitude (`lat`) and longitude (`lon`). These are required.\n\n * Specify `parameters` to filter the response to a specific, comma-separated list of environmental parameters. The API returns defaults when this is omitted.\n\n * Specify `startDate` and `endDate` (using `MM-DD` format for month and day), or `startDate` alone for just one date.\n\n * Specify `units=us-std` to receive values as United States customary (imperial) units. The API returns metric units by default and when `units=si-std` is expressly requested.\n\n * Specify the `interval` parameter to request aggregated data for parameters such as airTempAvgAvg.\n + **Format:** The interval must be in the format {n}, where {n} is an integer greater than 1 (e.g., 2, 6, or 12).\n\nAll together, a complete request looks like:\n\n```\nhttps://climatology.api.dtn.com/v1/daily/ten-year?lat={lat}&lon={lon}&startDate={start_date}&endDate={end_date}&interval={n}¶meters={param1,param2}&units={units}\n```\n","operationId":"dailyClimatology","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":"startDate","in":"query","schema":{"type":"string","format":"date-time"},"example":"08-01"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time"},"example":"08-03"},{"name":"parameters","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}},"example":"airTempAvg,precipAmountAvg,windSpeedAvg"},{"name":"units","in":"query","schema":{"type":"string"},"example":"us-std"}],"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":{"08-01":{"type":"object","properties":{"airTempAvg":{"type":"number"},"airTempStdDev":{"type":"number"},"airTempMaxAvg":{"type":"number"},"airTempMaxStdDev":{"type":"number"},"airTempMinAvg":{"type":"number"},"airTempMinStdDev":{"type":"number"},"dewPointAvg":{"type":"number"},"dewPointStdDev":{"type":"number"},"potentialEvapotranspirationAmountAvg":{"type":"number"},"longWaveRadiationAvg":{"type":"number"},"longWaveRadiationStdDev":{"type":"number"},"precipAmountAvg":{"type":"number"},"shortWaveRadiationAvg":{"type":"number"},"shortWaveRadiationStdDev":{"type":"number"},"surfacePressureAvg":{"type":"number"},"surfacePressureStdDev":{"type":"number"},"windSpeedAvg":{"type":"number"},"windSpeedStdDev":{"type":"number"}}}}}}}}},"example":{"url":"https://climatology.api.dtn.com/v1/daily/ten-year?lat=35.47&lon=-97.51¶meters=airTempAvg,airTempStdDev,airTempMaxAvg,airTempMaxStdDev,airTempMinAvg,airTempMinStdDev,dewPointAvg,dewPointStdDev,potentialEvapotranspirationAmountAvg,longWaveRadiationAvg,longWaveRadiationStdDev,precipAmountAvg,shortWaveRadiationAvg,shortWaveRadiationStdDev,surfacePressureAvg,surfacePressureStdDev,windSpeedAvg,windSpeedStdDev&startDate=08-01&endDate=08-03&units=us-std","type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-97.51,35.47]},"properties":{"08-01":{"airTempAvg":86,"airTempStdDev":2.7,"airTempMaxAvg":95,"airTempMaxStdDev":3.6,"airTempMinAvg":77,"airTempMinStdDev":2.2,"dewPointAvg":64.4,"dewPointStdDev":1.4,"potentialEvapotranspirationAmountAvg":0.2,"longWaveRadiationAvg":400,"longWaveRadiationStdDev":20,"precipAmountAvg":0.08,"shortWaveRadiationAvg":800,"shortWaveRadiationStdDev":50,"surfacePressureAvg":1015,"surfacePressureStdDev":3,"windSpeedAvg":7.8,"windSpeedStdDev":2.2},"08-02":{"airTempAvg":87.8,"airTempStdDev":2.9,"airTempMaxAvg":96.8,"airTempMaxStdDev":3.8,"airTempMinAvg":78.8,"airTempMinStdDev":2.3,"dewPointAvg":65.3,"dewPointStdDev":1.6,"potentialEvapotranspirationAmountAvg":0.2,"longWaveRadiationAvg":405,"longWaveRadiationStdDev":22,"precipAmountAvg":0.06,"shortWaveRadiationAvg":820,"shortWaveRadiationStdDev":55,"surfacePressureAvg":1014,"surfacePressureStdDev":3.2,"windSpeedAvg":8.3,"windSpeedStdDev":2.5},"08-03":{"airTempAvg":85.1,"airTempStdDev":2.5,"airTempMaxAvg":94.1,"airTempMaxStdDev":3.6,"airTempMinAvg":76.1,"airTempMinStdDev":2,"dewPointAvg":63.5,"dewPointStdDev":1.3,"potentialEvapotranspirationAmountAvg":0.19,"longWaveRadiationAvg":398,"longWaveRadiationStdDev":18,"precipAmountAvg":0.12,"shortWaveRadiationAvg":810,"shortWaveRadiationStdDev":52,"surfacePressureAvg":1016,"surfacePressureStdDev":2.8,"windSpeedAvg":7.4,"windSpeedStdDev":2}}}]}}}}},"400":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."},"errors":{"type":"array","description":"An array of human-readable descriptions of specific errors.","items":{"type":"object","properties":{"message":{"type":"string"},"parameter":{"type":"string"},"value":{"type":"array","items":{"type":"string"}}}}}},"additionalProperties":false},"example":{"type":"badRequest","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:climatology:/v1/daily:requestId:123e4567-e89b-12d3-a458-426614176000","errors":[{"message":"the following parameters are invalid: invalidParameter1,invalidParameter2","parameter":"parameters","value":["invalidParameter1","invalidParameter2"]}]}}}},"401":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}}},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:climatology:/v1/daily: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":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}}},"example":{"type":"notAcceptable","title":"Not Acceptable","detail":"The Accept header value is invalid or unsupported.","status":406,"instance":"urn:dtn:climatology:/v1/daily: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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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\": \"climatology.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year',\n qs: {\n lat: 'SOME_NUMBER_VALUE',\n lon: 'SOME_NUMBER_VALUE',\n startDate: 'SOME_STRING_VALUE',\n endDate: 'SOME_STRING_VALUE',\n parameters: 'SOME_ARRAY_VALUE',\n units: '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://climatology.api.dtn.com/v1/daily/ten-year\");\n\nreq.query({\n \"lat\": \"SOME_NUMBER_VALUE\",\n \"lon\": \"SOME_NUMBER_VALUE\",\n \"startDate\": \"SOME_STRING_VALUE\",\n \"endDate\": \"SOME_STRING_VALUE\",\n \"parameters\": \"SOME_ARRAY_VALUE\",\n \"units\": \"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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'lat' => 'SOME_NUMBER_VALUE',\n 'lon' => 'SOME_NUMBER_VALUE',\n 'startDate' => 'SOME_STRING_VALUE',\n 'endDate' => 'SOME_STRING_VALUE',\n 'parameters' => 'SOME_ARRAY_VALUE',\n 'units' => '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://climatology.api.dtn.com/v1/daily/ten-year');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n 'lat' => 'SOME_NUMBER_VALUE',\n 'lon' => 'SOME_NUMBER_VALUE',\n 'startDate' => 'SOME_STRING_VALUE',\n 'endDate' => 'SOME_STRING_VALUE',\n 'parameters' => 'SOME_ARRAY_VALUE',\n 'units' => '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(\"climatology.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\", \"/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year\"\n\nquerystring = {\"lat\":\"SOME_NUMBER_VALUE\",\"lon\":\"SOME_NUMBER_VALUE\",\"startDate\":\"SOME_STRING_VALUE\",\"endDate\":\"SOME_STRING_VALUE\",\"parameters\":\"SOME_ARRAY_VALUE\",\"units\":\"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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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://climatology.api.dtn.com/v1/daily/ten-year?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startDate=SOME_STRING_VALUE&endDate=SOME_STRING_VALUE¶meters=SOME_ARRAY_VALUE&units=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()"}]}},"/v1/parameters":{"get":{"tags":["Endpoints"],"summary":"Parameters","description":"This endpoint provides helpful context in JSON format about the environmental parameters and operations that the other endpoints support.\n\nUse the `name` query string parameter to filter environmental parameters by that name (for example, `name=airTempAvg`), or omit the query string to obtain all environmental parameters in the response.\n","operationId":"parameters","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":"name","schema":{"type":"string","description":"The desired parameter name filter (optional).","example":["airTempAvg"]}}],"responses":{"200":{"description":"A successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"daily-climatology":{"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":{"airTempAvg":{"metricUnit":"Celsius","imperialUnit":"Fahrenheit","type":"number","description":"Average daily air temperature at 2 meters above ground level.","notes":"","aggregationMethods":["Avg"]}}}}}}}},"400":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."},"errors":{"type":"array","description":"An array of human-readable descriptions of specific errors.","items":{"type":"object","properties":{"message":{"type":"string"},"parameter":{"type":"string"},"value":{"type":"array","items":{"type":"string"}}}}}},"additionalProperties":false},"example":{"type":"badRequest","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:climatology:/v1/daily:requestId:123e4567-e89b-12d3-a458-426614176000","errors":[{"message":"the following parameters are invalid: invalidParameter1,invalidParameter2","parameter":"parameters","value":["invalidParameter1","invalidParameter2"]}]}}}},"401":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}}},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:climatology:/v1/daily: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":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}}},"example":{"type":"notAcceptable","title":"Not Acceptable","detail":"The Accept header value is invalid or unsupported.","status":406,"instance":"urn:dtn:climatology:/v1/daily: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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\");\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\");\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\"\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\")\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\")\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\",\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\");\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\",\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\": \"climatology.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v1/parameters?name=airTempAvg\",\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://climatology.api.dtn.com/v1/parameters',\n qs: {name: 'airTempAvg'},\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://climatology.api.dtn.com/v1/parameters\");\n\nreq.query({\n \"name\": \"airTempAvg\"\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\"]\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\" 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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\",\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://climatology.api.dtn.com/v1/parameters');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'name' => 'airTempAvg'\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://climatology.api.dtn.com/v1/parameters');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n 'name' => 'airTempAvg'\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(\"climatology.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\", \"/v1/parameters?name=airTempAvg\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://climatology.api.dtn.com/v1/parameters\"\n\nquerystring = {\"name\":\"airTempAvg\"}\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\")\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg' \\\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg' \\\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://climatology.api.dtn.com/v1/parameters?name=airTempAvg'"},{"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://climatology.api.dtn.com/v1/parameters?name=airTempAvg\")! 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()"}]}}},"components":{"responses":{"badRequest":{"description":"An invalid request.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."},"errors":{"type":"array","description":"An array of human-readable descriptions of specific errors.","items":{"type":"object","properties":{"message":{"type":"string"},"parameter":{"type":"string"},"value":{"type":"array","items":{"type":"string"}}}}}},"additionalProperties":false},"example":{"type":"badRequest","title":"Invalid Request","detail":"Validation failed.","status":400,"instance":"urn:dtn:climatology:/v1/daily:requestId:123e4567-e89b-12d3-a458-426614176000","errors":[{"message":"the following parameters are invalid: invalidParameter1,invalidParameter2","parameter":"parameters","value":["invalidParameter1","invalidParameter2"]}]}}}},"notAcceptable":{"description":"Unable to produce a response matching the Accept request header.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}}},"example":{"type":"notAcceptable","title":"Not Acceptable","detail":"The Accept header value is invalid or unsupported.","status":406,"instance":"urn:dtn:climatology:/v1/daily:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"unauthorized":{"description":"Unable to authenticate credentials.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}}},"example":{"type":"unauthorized","title":"Error while authenticating the user.","detail":"invalid token","status":401,"instance":"urn:dtn:climatology:/v1/daily:requestId:123e4567-e89b-12d3-a458-426614176000"}}}}},"schemas":{"generalError":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."}}},"validationError":{"type":"object","properties":{"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."},"detail":{"type":"string","description":"A human-readable description of the general error."},"instance":{"type":"string","format":"uri","description":"A URL with the specific error ID (often pointing to an error log for that specific response)."},"errors":{"type":"array","description":"An array of human-readable descriptions of specific errors.","items":{"type":"object","properties":{"message":{"type":"string"},"parameter":{"type":"string"},"value":{"type":"array","items":{"type":"string"}}}}}},"additionalProperties":false},"dailyClimatologyResponse":{"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":{"08-01":{"type":"object","properties":{"airTempAvg":{"type":"number"},"airTempStdDev":{"type":"number"},"airTempMaxAvg":{"type":"number"},"airTempMaxStdDev":{"type":"number"},"airTempMinAvg":{"type":"number"},"airTempMinStdDev":{"type":"number"},"dewPointAvg":{"type":"number"},"dewPointStdDev":{"type":"number"},"potentialEvapotranspirationAmountAvg":{"type":"number"},"longWaveRadiationAvg":{"type":"number"},"longWaveRadiationStdDev":{"type":"number"},"precipAmountAvg":{"type":"number"},"shortWaveRadiationAvg":{"type":"number"},"shortWaveRadiationStdDev":{"type":"number"},"surfacePressureAvg":{"type":"number"},"surfacePressureStdDev":{"type":"number"},"windSpeedAvg":{"type":"number"},"windSpeedStdDev":{"type":"number"}}}}}}}}},"example":{"url":"https://climatology.api.dtn.com/v1/daily/ten-year?lat=35.47&lon=-97.51¶meters=airTempAvg,airTempStdDev,airTempMaxAvg,airTempMaxStdDev,airTempMinAvg,airTempMinStdDev,dewPointAvg,dewPointStdDev,potentialEvapotranspirationAmountAvg,longWaveRadiationAvg,longWaveRadiationStdDev,precipAmountAvg,shortWaveRadiationAvg,shortWaveRadiationStdDev,surfacePressureAvg,surfacePressureStdDev,windSpeedAvg,windSpeedStdDev&startDate=08-01&endDate=08-03&units=us-std","type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-97.51,35.47]},"properties":{"08-01":{"airTempAvg":86,"airTempStdDev":2.7,"airTempMaxAvg":95,"airTempMaxStdDev":3.6,"airTempMinAvg":77,"airTempMinStdDev":2.2,"dewPointAvg":64.4,"dewPointStdDev":1.4,"potentialEvapotranspirationAmountAvg":0.2,"longWaveRadiationAvg":400,"longWaveRadiationStdDev":20,"precipAmountAvg":0.08,"shortWaveRadiationAvg":800,"shortWaveRadiationStdDev":50,"surfacePressureAvg":1015,"surfacePressureStdDev":3,"windSpeedAvg":7.8,"windSpeedStdDev":2.2},"08-02":{"airTempAvg":87.8,"airTempStdDev":2.9,"airTempMaxAvg":96.8,"airTempMaxStdDev":3.8,"airTempMinAvg":78.8,"airTempMinStdDev":2.3,"dewPointAvg":65.3,"dewPointStdDev":1.6,"potentialEvapotranspirationAmountAvg":0.2,"longWaveRadiationAvg":405,"longWaveRadiationStdDev":22,"precipAmountAvg":0.06,"shortWaveRadiationAvg":820,"shortWaveRadiationStdDev":55,"surfacePressureAvg":1014,"surfacePressureStdDev":3.2,"windSpeedAvg":8.3,"windSpeedStdDev":2.5},"08-03":{"airTempAvg":85.1,"airTempStdDev":2.5,"airTempMaxAvg":94.1,"airTempMaxStdDev":3.6,"airTempMinAvg":76.1,"airTempMinStdDev":2,"dewPointAvg":63.5,"dewPointStdDev":1.3,"potentialEvapotranspirationAmountAvg":0.19,"longWaveRadiationAvg":398,"longWaveRadiationStdDev":18,"precipAmountAvg":0.12,"shortWaveRadiationAvg":810,"shortWaveRadiationStdDev":52,"surfacePressureAvg":1016,"surfacePressureStdDev":2.8,"windSpeedAvg":7.4,"windSpeedStdDev":2}}}]}},"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":{"airTempAvg":{"metricUnit":"Celsius","imperialUnit":"Fahrenheit","type":"number","description":"Average daily air temperature at 2 meters above ground level.","notes":"","aggregationMethods":["Avg"]}}}},"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},"startDate":{"name":"startDate","in":"query","schema":{"type":"string","format":"date-time"},"example":"08-01"},"endDate":{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time"},"example":"08-03"},"parameters":{"name":"parameters","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}},"example":"airTempAvg,precipAmountAvg,windSpeedAvg"},"units":{"name":"units","in":"query","schema":{"type":"string"},"example":"us-std"}},"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 Climatology API, you need to use the following audience: https://climatology.api.dtn.com\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 "}}}}