{"openapi":"3.0.0","info":{"title":"DTN Precipitation 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 Precipitation API – Your gateway to high-resolution Precipitation Estimates.\n \nThis 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 Precipitation API provides a time series of quantitative atmospheric precipitation parameters. \nIt leverages state-of-the-art cloud technology and DTN's extensive global models. \nThe data is continuously validated, calibrated, and enhanced.\n\n**Precipitation at a location:** For simplicity, the API provides a single endpoint for precipitation data. \nSpecify a location, the weather parameters of interest, and a time range up to 15 days long.\nThe API responds with the requested time series in GeoJSON format.\n\n**Note:** Data returned by DTN's Precipitation API refers to actual precipitation estimates, not forecasts.\n\nThe interactive documentation that follows is a guide to setting up requests, understanding responses, and leveraging all the features of DTN’s Weather Precipitation 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://precipitation.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://precipitation.api.dtn.com/v1'\n query_parameters = urllib.parse.urlencode({\n \"lat\": 35.47,\n \"lon\": -97.51,\n \"startTime\": \"2025-01-01T01:00:00Z\",\n \"endTime\": \"2025-01-02T01:00:00Z\",\n \"parameters\", \"precipAmount\"\n })\n endpoint = '/?' + 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```\n\n## Using timezone offsets\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**Important note**: Because the `+` symbol is a special URL character, it must be encoded as `%2B` for use within the query parameter string.\n#### Valid examples\n* `?startTime=2024-01-01T00:00:00Z&endTime=2024-01-01T23:00:00Z`\n* `?startTime=2024-01-01T00:00:00%2B08:00&endTime=2024-01-01T23:00:00%2B02:00`\n* `?startTime=2024-01-01T00:00:00-08:00&endTime=2024-01-01T23:00:00-08:00`\n* `?startTime=2024-01-01T00:00:00&endTime=2024-01-01T23:00:00`\n#### Invalid example\n* `?startTime=2024-01-01T00:00:00+08:00&endTime=2024-01-01T23:00:00+08:00` (need to encode `+` as `%2B`)\n## Latitude and longitude in the response\nRequested latitudes and longitudes are rounded to three (3) decimal places when presented in `$.features.*.geometry.coordinates`. Floating point precision might affect the last digit.\n### Rounding examples\n* 1.5555 => 1.556\n* 1.5545 => 1.554\n* -1.5555 => -1.556"},"servers":[{"url":"https://precipitation.api.dtn.com"}],"tags":[{"name":"Endpoints","description":"The Weather Precipitation 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":"DTN's Precipitation API offers atmospheric precipitation related parameters that provide detailed insights for analyzing past weather patterns.\n\n\nData returned by DTN's Precipitation API refers to actual precipitation estimates, not forecasts.\n\n\nIt’s possible to aggregate certain parameters over multiple hours.\nTo request an aggregation, just substitute the desired parameter name and specify an `interval` greater than 1 hour (see `Endpoints` section for details).\n\n\nFor example, precipitation amount (`precipAmount`) has the corresponding parameter `precipAmountSum`, request parameter `precipAmountSum` with `interval=6h` in the query string to obtain the sum of precipAmount over 6-hours.\n\n\nThe tables that follow identify which parameters have corresponding aggregation parameter names. \n
Click to expand...\n\n| Parameter | Core | Description | Metric units | Imperial units | Aggregation Parameters |\n|-------------------------------|---------|-------------|--------------|----------------|------------------------|\n| precipAmount | Yes | Best estimate of liquid-equivalent precipitation every hour. Incorporates radar, model/ analysis data, and observations to estimate actual amounts of precipitation. | millimeter | inch | precipAmountSum |\n\n
"}],"paths":{"/":{"get":{"tags":["Parameters"]}},"/v1/":{"get":{"tags":["Endpoints"],"summary":"Precipitation","description":"This endpoint provides detailed precipitation data for any specified global location. Users can request various weather parameters for a time range of up to 15 days.\n\nCommon uses include weather monitoring, atmospheric research, and localized operations, such as event planning.\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* The time between `startTime` and `endTime` must be less than or equal to 15 days.\n* `startTime` must be greater than `2023-05-12T00:00:00Z` and `endTime` must be less than or equal to the current hour.\n\n* API Behavior Based on startTime and endTime:\n\n * **Omitted startTime and endTime:** Returns only data for the current hour.\n\n * **Only startTime Specified:** Returns data only for `startTime`.\n\n * **Only endTime Specified:** Returns data only for `endTime`.\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 * **Example:** If `startTime` is 2024-01-01T01:00:00Z and `endTime` is 2024-01-01T02:00:00Z and the requested parameter is `precipAmount`,\n the API will return data for both timestamps.\n The data timestamped 2024-01-01T01:00:00Z would represent the amount of precipitation within the hour window of\n 2024-01-01T00:00:01Z to 2024-01-01T01:00:00Z. Likewise, the data timestamped 2024-01-01T02:00:00Z would represent the\n amount of precipitation within the hour window of 2024-01-01T01:00:01Z to 2024-01-01T02:00:00Z.\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 data for parameters such as precipAmountSum.\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'.\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 * 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:** precipAmountSum\n + Response:\n ```json\n {\n \"properties\": {\n \"2024-11-06T15:00:00Z\": {\n \"precipAmountSum\": 0.5\n },\n \"2024-11-07T03:00:00Z\": {\n \"precipAmountSum\": 1.0\n },\n \"2024-11-07T15:00:00Z\": {\n \"precipAmountSum\": 0.4\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:** precipAmountSum\n + Response:\n ```json\n {\n \"properties\": {\n \"2024-10-23T00:00:00Z\": {\n \"precipAmount\": 1.0\n },\n \"2024-10-24T00:00:00Z\": {\n \"precipAmount\": 0.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:** precipAmountSum\n + Response:\n ```json\n \"properties\": {\n \"2024-10-23T00:00:00Z\": {\n \"precipAmountSum\": 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 + 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:** precipAmountSum\n + **lat:** 30.251\n + **lon:** 62.569\n \n + Response:\n ```json\n \"properties\": {\n \"2024-05-26T23:30:00+0430\": {\n \"precipAmountSum\": 11.1,\n },\n \"2024-05-27T23:30:00+0430\": {\n \"precipAmountSum\": 12.3,\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\n### Complete example:\n\n`https://precipitation.api.dtn.com/v1/?lat={lat}&lon={lon}&startTime={start_time}&endTime={end_time}&interval={n}h¶meters={param1,param2}&units={units}`\n","operationId":"precip","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":"2024-10-01T00:06:10Z"},{"name":"endTime","in":"query","schema":{"type":"string","format":"date-time"},"example":"2024-10-14T00:06:10Z"},{"name":"parameters","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}},"example":"precipAmount"},{"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":{"2023-10-01T00:00:00Z":{"type":"object","properties":{"example1":{"type":"number"},"example2":{"type":"number"}}}}}}}}},"example":{"url":"https://precipitation.api.dtn.com/v1/?lat=35.47&lon=-97.51¶meters=precipAmount&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":{"precipAmount":2.1},"2023-10-01T01:00:00Z":{"precipAmount":0.6},"2023-10-01T02:00:00Z":{"precipAmount":1}}}]}}}}},"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:precipitations-service:/v1/: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:precipitations-service:/v1/: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:precipitations-service:/v1/: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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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\": \"precipitation.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/',\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 },\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://precipitation.api.dtn.com/v1/\");\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});\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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/');\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]);\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://precipitation.api.dtn.com/v1/');\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]));\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(\"precipitation.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/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/\"\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\"}\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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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://precipitation.api.dtn.com/v1/?lat=SOME_NUMBER_VALUE&lon=SOME_NUMBER_VALUE&startTime=SOME_STRING_VALUE&endTime=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":"Specify parameters to filter by specific weather parameters. \nInclude multiple as comma-separated values. \nThis endpoint only returns data for precipAmount and its aggregations.\n","operationId":"precipParameters","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":"precipAmount"}},{"in":"query","name":"category","schema":{"type":"string","description":"The desired parameter category filter (optional).","example":"hourly-precipitations"}}],"responses":{"200":{"description":"A successful request.","content":{"application/json":{"schema":{"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":{"hourly-precipitations":{"precipAmount":{"metricUnit":"millimeter","imperialUnit":"inch","type":"number","description":"Best estimate of liquid-equivalent precipitation.","notes":"","aggregationParameters":["precipAmountSum"],"requiredScope":["weather.precipitation.core:read","weather.precipitation.plus:read"]}}}}}}},"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:precipitations-service:/v1/: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:precipitations-service:/v1/: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:precipitations-service:/v1/: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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\");\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\");\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\"\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\")\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\")\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\",\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\");\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\",\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\": \"precipitation.api.dtn.com\",\n \"port\": null,\n \"path\": \"/v1/parameters?name=precipAmount&category=hourly-precipitations\",\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://precipitation.api.dtn.com/v1/parameters',\n qs: {name: 'precipAmount', category: 'hourly-precipitations'},\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://precipitation.api.dtn.com/v1/parameters\");\n\nreq.query({\n \"name\": \"precipAmount\",\n \"category\": \"hourly-precipitations\"\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\"]\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\" 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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\",\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://precipitation.api.dtn.com/v1/parameters');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'name' => 'precipAmount',\n 'category' => 'hourly-precipitations'\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://precipitation.api.dtn.com/v1/parameters');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n 'name' => 'precipAmount',\n 'category' => 'hourly-precipitations'\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(\"precipitation.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=precipAmount&category=hourly-precipitations\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://precipitation.api.dtn.com/v1/parameters\"\n\nquerystring = {\"name\":\"precipAmount\",\"category\":\"hourly-precipitations\"}\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\")\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations' \\\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations' \\\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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations'"},{"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://precipitation.api.dtn.com/v1/parameters?name=precipAmount&category=hourly-precipitations\")! 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":{"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:precipitations-service:/v1/:requestId:123e4567-e89b-12d3-a458-426614176000"}}}},"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:precipitations-service:/v1/: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:precipitations-service:/v1/: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},"PrecipitationResponse":{"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":{"example1":{"type":"number"},"example2":{"type":"number"}}}}}}}}},"example":{"url":"https://precipitation.api.dtn.com/v1/?lat=35.47&lon=-97.51¶meters=precipAmount&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":{"precipAmount":2.1},"2023-10-01T01:00:00Z":{"precipAmount":0.6},"2023-10-01T02:00:00Z":{"precipAmount":1}}}]}},"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":{"precipAmount":{"metricUnit":"millimeter","imperialUnit":"inch","type":"number","description":"Best estimate of liquid-equivalent precipitation.","notes":"","aggregationMethods":["Sum"]}}},"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":{"hourly-precipitations":{"precipAmount":{"metricUnit":"millimeter","imperialUnit":"inch","type":"number","description":"Best estimate of liquid-equivalent precipitation.","notes":"","aggregationParameters":["precipAmountSum"],"requiredScope":["weather.precipitation.core:read","weather.precipitation.plus:read"]}}}}},"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":"2024-10-01T00:06:10Z"},"endTime":{"name":"endTime","in":"query","schema":{"type":"string","format":"date-time"},"example":"2024-10-14T00:06:10Z"},"parameters":{"name":"parameters","in":"query","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}},"example":"precipAmount"},"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 Precipitation API, you need to use the following audience: https://precipitation.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 "}}}}