{"info":{"name":"DTN Aviation API Winds Aloft collection","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","description":"Winds aloft data are for forecasted temperatures and wind speed/direction on a 1deg-by-1deg global grid at various flight levels.\n\nThis winds aloft collection includes requests categorization in:\n- Authorization\n- health-check\n- Winds Aloft\n    - Example winds aloft: should all succeed though perhaps not provide data\n    - Invalid requests: should all fail because of some problem in request parameters\n    - Sandbox winds aloft: starting point for requests utilizing any possible parameters\n"},"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"key":"version","value":"v1"}],"item":[{"name":"Authorization","item":[{"name":"Generate Authorization Token","event":[{"listen":"prerequest","script":{"exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"exec":["var jsonData = JSON.parse(responseBody);","pm.environment.set(\"token\", jsonData.data.access_token);"],"type":"text/javascript","packages":{}}}],"protocolProfileBehavior":{"disabledSystemHeaders":{"accept":true,"content-type":true}},"request":{"auth":{"type":"noauth"},"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"client_credentials\",\n    \"client_id\": \"{{client_id}}\",\n    \"client_secret\": \"{{client_secret}}\",\n    \"audience\": \"{{audience}}\"\n}"},"url":{"raw":"{{auth_url}}/v1/tokens/authorize","host":["{{auth_url}}"],"path":["v1","tokens","authorize"]},"description":"- For authorization token request.\n- Requires No Auth for its own Auth Type.\n- Environment sets structure for automatically placing details from received token.\n- Make request any time previous token has expired."},"response":[]}],"description":"- For encompassing the authorization token request.\n- Requires No Auth for its own Auth Type.\n- Environment sets structure for automatically placing details from received token.\n- Make request any time previous token has expired.","auth":{"type":"noauth"},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}]},{"name":"health-check","description":"- For encompassing the health-check request.\n- Uses inherited Auth Type set for collection.\n- Request is to validate API is functional and will show API version.","item":[{"name":"health-check","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"{{api_url}}/v1/health-check","host":["{{api_url}}"],"path":["v1","health-check"]},"description":"- For health-check request.\n- Uses inherited Auth Type set for collection.\n- Request is to validate API is functional and will show API version."},"response":[]}]},{"name":"Winds Aloft","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var moment = require('moment');","pm.environment.set('timestamp_minus_13h', moment().subtract(13,'hours'))","pm.environment.set('timestamp_minus_12h', moment().subtract(12,'hours'))","pm.environment.set('timestamp_minus_11h', moment().subtract(11,'hours'))","pm.environment.set('timestamp_minus_10h', moment().subtract(10,'hours'))","pm.environment.set('timestamp_minus_9h', moment().subtract(9,'hours'))","pm.environment.set('timestamp_minus_8h', moment().subtract(8,'hours'))","pm.environment.set('timestamp_minus_7h', moment().subtract(7,'hours'))","pm.environment.set('timestamp_minus_6h', moment().subtract(6,'hours'))","pm.environment.set('timestamp_minus_5h', moment().subtract(5,'hours'))","pm.environment.set('timestamp_minus_4h', moment().subtract(4,'hours'))","pm.environment.set('timestamp_minus_3h', moment().subtract(3,'hours'))","pm.environment.set('timestamp_minus_2h', moment().subtract(2,'hours'))","pm.environment.set('timestamp_minus_1h', moment().subtract(1,'hour'))","pm.environment.set('timestamp_current', moment())","pm.environment.set('timestamp_plus_1h', moment().add(1,'hour'))","pm.environment.set('timestamp_plus_2h', moment().add(2,'hours'))","pm.environment.set('timestamp_plus_3h', moment().add(3,'hours'))","pm.environment.set('timestamp_plus_4h', moment().add(4,'hours'))","pm.environment.set('timestamp_plus_5h', moment().add(5,'hours'))","pm.environment.set('timestamp_plus_6h', moment().add(6,'hours'))","pm.environment.set('timestamp_plus_7h', moment().add(7,'hours'))","pm.environment.set('timestamp_plus_8h', moment().add(8,'hours'))","pm.environment.set('timestamp_plus_9h', moment().add(9,'hours'))","pm.environment.set('timestamp_plus_10h', moment().add(10,'hours'))","pm.environment.set('timestamp_plus_11h', moment().add(11,'hours'))","pm.environment.set('timestamp_plus_12h', moment().add(12,'hours'))","pm.environment.set('timestamp_plus_13h', moment().add(13,'hours'))","// Get next valid time (on-the-6-hour time)","//pm.environment.set('timestamp_next_valid_time', moment.unix(Math.ceil((moment().unix()) / 21600) * 21600).utc().format(\"YYYY-MM-DD HH:mm:ss\"))","// Get next valid time (on-the-6-hour time) relative to time 6 hours ahead","//pm.environment.set('timestamp_future_valid_time', moment.unix(Math.ceil((moment().unix() + 21600) / 21600) * 21600).utc().format(\"YYYY-MM-DD HH:mm:ss\"))","","pm.collectionVariables.set(\"endpoint\", \"windsaloft\");"]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"item":[{"name":"Example winds aloft","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonData = pm.response.json()","","if (pm.response.code == 400) {","    jsonData.errors.forEach(function(error){","        console.log(`parameter '${error.parameter}' value '${error.value}' error: ${error.message}`)","    })","}","","pm.test(\"Status test\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"JSON expectations\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.type).to.eql(\"FeatureCollection\");","    pm.expect(jsonData.features).to.be.an(\"array\");","});","","pm.test(\"Feature evaluation\", function () {","    jsonData.features.forEach(function(feature){","        pm.expect(feature.type).to.eql(\"Feature\");","        pm.expect(feature.geometry.type).to.eql(\"Point\");","        pm.expect(feature.properties.wind_speed_kts).to.be.a(\"number\");","        pm.expect(feature.properties.wind_direction).to.be.a(\"number\");","        pm.expect(feature.properties.temperature_c).to.be.a(\"number\");","        pm.expect(feature.properties.valid_utc).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","        pm.expect(feature.properties.expiration_utc).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","        pm.expect(feature.properties.model_utc).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","        pm.expect(feature.properties.flt_level).to.match(/^fl\\d{3}$/);","    })","});"]}}],"item":[{"name":"SRID 3857 polygon","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"limit","value":"1","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"offset","value":"1","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"flt_level","value":"fl300","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed"},{"key":"valid_utc","value":"{{timestamp_current}}","description":"Include only features whose valid period includes this time (in UTC)"},{"key":"srid","value":"3857","description":"SRID of provided input coordinates for spatial filter ; Allowed values are \"4326\" (default, lon/lat) or \"3857\" ; Does not affect output coordinates"},{"key":"polygon","value":"-18924313,3248973,-18479035,3248973,-18479035,3763310,-18924313,3763310","description":"<lon_1>,<lat_1>,...,<lon_n>,<lat_n>"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?flt_level=fl300&valid_utc={{timestamp_current}}&srid=3857&polygon=-18924313,3248973,-18479035,3248973,-18479035,3763310,-18924313,3763310"},"description":"Gets data objects overlapping polygon defined with SRID 3857 coordinates for flight level FL300 valid at current time"}},{"name":"corridor valid+6h","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"limit","value":"1","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"offset","value":"1","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"flt_level","value":"fl450","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed"},{"key":"valid_utc","value":"{{timestamp_plus_6h}}","description":"Include only features whose valid period includes this time (in UTC)"},{"key":"corridor","value":"-105,40,-118,34,50","description":"<lon_1>,<lat_1>,...,<lon_n>,<lat_n>,<halfwidth>"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?flt_level=fl450&valid_utc={{timestamp_plus_6h}}&corridor=-105,40,-118,34,50"},"description":"Gets data objects overlapping corridor defined with 50nm halfwidth and line connecting specified points for flight level FL450 valid at time 6 hours after now"}},{"name":"multi-level 100km circle","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"limit","value":"1","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"offset","value":"1","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"flt_level","value":"FL010,FL030,FL050","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed"},{"key":"valid_utc","value":"{{timestamp_current}}","description":"Include only features whose valid period includes this time (in UTC)"},{"key":"circle","value":"-119,37,100","description":"<lon>,<lat>,<radius>"},{"key":"distanceUnits","value":"km","description":"Units for distance of defined circle radius or corridor halfwidth ; Allowed values are \"nm\" (default), \"sm\", \"km\", or \"m\""}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?flt_level=FL010,FL030,FL050&valid_utc={{timestamp_current}}&circle=-119,37,100&distanceUnits=km"},"description":"Gets data objects overlapping circle defined with 100km radius from center at (37,-119) and for flight levels FL010, FL030, and FL050 valid at current time"}},{"name":"multi-level small bbox","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"limit","value":"1","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"offset","value":"1","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"flt_level","value":"fl100,fl180,fl240","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed"},{"key":"valid_utc","value":"{{timestamp_current}}","description":"Include only features whose valid period includes this time (in UTC)"},{"key":"bbox","value":"-119.5,35.5,-115.5,39.5","description":"<min_lon>,<min_lat>,<max_lon>,<max_lat>"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?flt_level=fl100,fl180,fl240&valid_utc={{timestamp_current}}&bbox=-119.5,35.5,-115.5,39.5"},"description":"Gets data objects overlapping specified bounding box for flight levels FL100, FL180, and FL240 valid at current time"}}],"description":"These requests are expected to succeed, though not necessarily always return data.\n\nTests are applied on each response aiming to confirm response is good:\n- To confirm 200 status code for response\n- To confirm that response is valid JSON with an array of features\n- To confirm structure of each object includes certain expected values in specific format"},{"name":"Invalid requests winds aloft","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonData = pm.response.json()","","if (pm.response.code == 400) {","    jsonData.errors.forEach(function(error){","        console.log(`parameter '${error.parameter}' value '${error.value}' error: ${error.message}`)","    })","}","pm.test(\"Status test 400\", function () {","    pm.response.to.have.status(400);","});"]}}],"item":[{"name":"BAD invalid flight level","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"limit","value":"1","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"offset","value":"1","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"flt_level","value":"fl130","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed"},{"key":"valid_utc","value":"{{timestamp_current}}","description":"Include only features whose valid period includes this time (in UTC)"},{"key":"bbox","value":"-120,35,-115,40","description":"<min_lon>,<min_lat>,<max_lon>,<max_lat>"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?flt_level=fl130&valid_utc={{timestamp_current}}&bbox=-120,35,-115,40"},"description":"Uses flight level for which there is not winds aloft data"}},{"name":"BAD multiple spatial filter","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"limit","value":"1","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"offset","value":"1","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"flt_level","value":"fl100","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed"},{"key":"valid_utc","value":"{{timestamp_current}}","description":"Include only features whose valid period includes this time (in UTC)"},{"key":"circle","value":"-119,37,50","description":"<lon>,<lat>,<radius>"},{"key":"corridor","value":"-105,40,-118,34,50","description":"<lon_1>,<lat_1>,...,<lon_n>,<lat_n>,<halfwidth>"},{"key":"distanceUnits","value":"km","description":"Units for distance of defined circle radius or corridor halfwidth ; Allowed values are \"nm\" (default), \"sm\", \"km\", or \"m\"","disabled":true}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?flt_level=fl100&valid_utc={{timestamp_current}}&circle=-119,37,50&corridor=-105,40,-118,34,50"},"description":"Cannot specify more than one spatial filter"}}],"description":"These requests are expected to fail because of some problem with a parameter.\n\nA tests is applied on each response to confirm failure:\n- To confirm 400 status code for response"},{"name":"Sandbox winds aloft","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"item":[{"name":"any winds aloft","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"limit","value":"1","description":"Maximum number of objects to return (default=1000)"},{"key":"offset","value":"1","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"bbox","value":"-120,35,-115,40","description":"<min_lon>,<min_lat>,<max_lon>,<max_lat>","disabled":true},{"key":"bbox","value":"-18924313.434856508,3248973.789650975,-18479035.471683413,3763310.627144653","description":"<min_x>,<min_y>,<max_x>,<max_y> (non-4326 SRID)","disabled":true},{"key":"polygon","value":"-90,30,-80,30,-80,40,-85,25","description":"<lon_1>,<lat_1>,...,<lon_n>,<lat_n>","disabled":true},{"key":"polygon","value":"-18924313,3248973,-18479035,3248973,-18479035,3763310,-18924313,3763310","description":"<x_1>,<y_1>,...,<x_n>,<y_n> (non-4326 SRID)","disabled":true},{"key":"circle","value":"-119,37,50","description":"<lon>,<lat>,<radius>","disabled":true},{"key":"circle","value":"-18701674.453269962,3375646.034919311,61","description":"<x>,<y>,<radius> (non-4326 SRID)","disabled":true},{"key":"corridor","value":"-118.414591,33.942910,144.845704,-37.668717,50","description":"<lon_1>,<lat_1>,...,<lon_n>,<lat_n>,<halfwidth>","disabled":true},{"key":"corridor","value":"-105,40,-118,34,50","description":"<lon_1>,<lat_1>,...,<lon_n>,<lat_n>,<halfwidth>","disabled":true},{"key":"corridor","value":"-18479035,3763310,-18924313,3763310,61","description":"<x_1>,<y_1>,...,<x_n>,<y_n>,<halfwidth> (non-4326 SRID)","disabled":true},{"key":"srid","value":"3857","description":"SRID of provided input coordinates for spatial filter ; Allowed values are \"4326\" (default, lon/lat) or \"3857\" ; Does not affect output coordinates","disabled":true},{"key":"distanceUnits","value":"km","description":"Units for distance of defined circle radius or corridor halfwidth ; Allowed values are \"nm\" (default), \"sm\", \"km\", or \"m\"","disabled":true},{"key":"flt_level","value":"fl240","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed","disabled":true},{"key":"flt_level","value":"fl100,fl180","description":"Flight level in format \"FL###\" ; May provide multiple in comma-delimited list ; Must be allowed flight level ; 3-digit ### represents hundreds of feet, left-padded with zeroes as needed","disabled":true},{"key":"valid_utc","value":"2025-03-13T22:15:00","description":"Include only features whose valid period includes this time (in UTC)","disabled":true},{"key":"valid_utc","value":"{{timestamp_current}}","description":"Include only features whose valid period includes this time (in UTC)","disabled":true},{"key":"valid_utc","value":"{{timestamp_plus_1h}}","description":"Include only features whose valid period includes this time (in UTC)","disabled":true}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?limit=1"},"description":"Can create requests from this basis by changing/setting any parameters."}}],"description":"This is for holding any requests a user may want to create and save.\n\nAt least one generic request with all possible parameters available to use should be provided as a template."}]}]}