{"info":{"name":"DTN Aviation API NOTAM collection","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","description":"[NOTAM](https://en.wikipedia.org/wiki/NOTAM) data have limited parameter capabilities.  Exactly one station must be specified, and all active NOTAMs found for it are provided.  Default is to return any found domestic NOTAMs and if none fall back to international, but can set preference to international first or to get all which may involve duplicates.\n\nThis NOTAM collection includes requests categorization in:\n- Authorization\n- health-check\n- NOTAMs\n    - Example NOTAM: should all succeed though perhaps not provide data\n    - Invalid requests: should all fail because of some problem in request parameters\n    - Sandbox NOTAM: 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":"NOTAMs","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["pm.collectionVariables.set(\"endpoint\", \"notams\");"]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"item":[{"name":"Example NOTAM","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.notams).to.be.an(\"array\");","});","","pm.test(\"NOTAM evaluation\", function () {","    jsonData.notams.forEach(function(notam){","        pm.expect(notam.stationId).to.be.a(\"string\");","        pm.expect(notam.notamId).to.be.a(\"string\");","        pm.expect(notam.raw_text).to.be.a(\"string\");","        pm.expect(notam.issueDateTime).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","        if (notam.expireDateTime !== null){","            pm.expect(notam.expireDateTime).to.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$/);","        }","    })","});"]}}],"item":[{"name":"RJOO NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"RJOO","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=RJOO"},"description":"Specifies station \"RJOO\" and gets NOTAMs found for it."}},{"name":"first 10 RJOO NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"RJOO","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"10","description":"Maximum number of objects to return (default=1000)"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=RJOO&limit=10"},"description":"Specifies station \"RJOO\" and gets NOTAMs found for it, with default preference for domestic.\nLimits to first 10, which should be the oldest by when ingested."}},{"name":"second 10 RJOO NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"RJOO","description":"[required] ICAO station ID of location"},{"key":"offset","value":"10","description":"Where to start in paginated response set (default=0, i.e., first object)"},{"key":"limit","value":"10","description":"Maximum number of objects to return (default=1000)"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=RJOO&offset=10&limit=10"},"description":"Specifies station \"RJOO\" and gets NOTAMs found for it, with default preference for domestic.\nBegins at offset 10 and limits to 10 in response."}},{"name":"prefer domestic KMIA NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KMIA","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"preferNotamType","value":"domestic","description":"One of 'domestic' or 'international' to return that type of NOTAM if any found and otherwise whatever from other type, or 'all' for whatever of both types"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KMIA&preferNotamType=domestic"},"description":"Specifies station \"KMIA\" and gets NOTAMs found for it, with preference for domestic."}},{"name":"prefer international EDDM NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"EDDM","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"preferNotamType","value":"international","description":"One of 'domestic' or 'international' to return that type of NOTAM if any found and otherwise whatever from other type, or 'all' for whatever of both types"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=EDDM&preferNotamType=international"},"description":"Specifies station \"EDDM\" and gets NOTAMs found for it, with preference for international."}},{"name":"all KZAK NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KZAK","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"preferNotamType","value":"all","description":"One of 'domestic' or 'international' to return that type of NOTAM if any found and otherwise whatever from other type, or 'all' for whatever of both types"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KZAK&preferNotamType=all"},"description":"Specifies station \"KZAK\" and gets NOTAMs found for it, setting to get combination of domestic and international."}},{"name":"only domestic KHOU NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KHOU","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"onlyNotamType","value":"domestic","description":"One of 'domestic' or 'international' to return specifically only what is available for thta type of NOTAM"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KHOU&onlyNotamType=domestic"},"description":"Specifies station \"KHOU\" and gets NOTAMs found for it, but only domestic."}},{"name":"only international KLAX NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KLAX","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"onlyNotamType","value":"international","description":"One of 'domestic' or 'international' to return specifically only what is available for thta type of NOTAM"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KLAX&onlyNotamType=international"},"description":"Specifies station \"KLAX\" and gets NOTAMs found for it, but only international."}}],"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 \"notams\" in an array\n- To confirm structure of each notams object includes certain expected values in specific format"},{"name":"Invalid requests","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 limit","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"RJOO","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"20000","description":"Maximum number of objects to return (default=1000)"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=RJOO&limit=20000"},"description":"Limit cannot exceed 10000"}},{"name":"BAD no stationId","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"","description":"[required] ICAO station ID of location","disabled":true},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true}],"raw":"{{api_url}}/{{version}}/{{endpoint}}"},"description":"Must provide stationId"}},{"name":"BAD preferNotamType","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KJFK","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"preferNotamType","value":"us","description":"One of 'domestic' or 'international' to return that type of NOTAM if any found and otherwise whatever from other type, or 'all' for whatever of both types"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KJFK&preferNotamType=us"},"description":"Must specify one of 'domestic', 'international', or 'all' for preferNotamType if parameter used"}},{"name":"BAD onlyNotamType","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KJFK","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"onlyNotamType","value":"intl","description":"One of 'domestic' or 'international' to return specifically only what is available for thta type of NOTAM"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KJFK&onlyNotamType=intl"},"description":"Must specify one of 'domestic' or 'international' for onlyNotamType if parameter used"}},{"name":"BAD both preferNotamType and onlyNotamType","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KJFK","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"preferNotamType","value":"international","description":"One of 'domestic' or 'international' to return that type of NOTAM if any found and otherwise whatever from other type, or 'all' for whatever of both types"},{"key":"onlyNotamType","value":"international","description":"One of 'domestic' or 'international' to return specifically only what is available for thta type of NOTAM"}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KJFK&preferNotamType=international&onlyNotamType=international"},"description":"Can use only one of preferNotamType and onlyNotamType per request"}}],"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 NOTAM","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"item":[{"name":"any NOTAMs","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"host":["{{api_url}}"],"path":["{{version}}","{{endpoint}}"],"query":[{"key":"stationId","value":"KJFK","description":"[required] ICAO station ID of location"},{"key":"offset","value":"","description":"Where to start in paginated response set (default=0, i.e., first object)","disabled":true},{"key":"limit","value":"","description":"Maximum number of objects to return (default=1000)","disabled":true},{"key":"preferNotamType","value":"international","description":"One of 'domestic' or 'international' to return that type of NOTAM if any found and otherwise whatever from other type, or 'all' for whatever of both types","disabled":true},{"key":"onlyNotamType","value":"domestic","description":"One of 'domestic' or 'international' to return specifically only what is available for thta type of NOTAM","disabled":true}],"raw":"{{api_url}}/{{version}}/{{endpoint}}?stationId=KJFK"},"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."}],"description":"#### Fields in notams object:\n- `stationId`: location for which NOTAM reported, should be ICAO identifier\n- `notamId`: string to designate NOTAM, like A1739/22 indicating...\n    - series letter (A)\n    - sequence number (1739)\n    - year of issue (22, for 2022)\n- `raw_text`: message content as originally received\n- `issueDateTime`: when NOTAM was issued\n- `expireDateTime`: when NOTAM is set to expire, if applicable"}]}