{"info":{"_postman_id":"d85ed990-c3d9-4581-9e11-3166be1250d2","name":"DTN Tropical Cyclone API","description":"# 🚀 Get started here\n\nNavigate to the DTN Tropical Cyclone API Environment within postman and ensure you have your CLIENT_ID and CLIENT_SECRET set.\n\nUnder the 'Authentication' folder, send the post request to api.auth.dtn.com\n\nYou will now be authenticated to get data from our Tropical Cyclone endpoints.","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","_exporter_id":"34018097"},"item":[{"name":"Authentication","item":[{"name":"https://api.auth.dtn.com/v1/tokens/authorize","event":[{"listen":"test","script":{"exec":["const res = pm.response.json();","const jwt = res.data.access_token;","","pm.environment.set('JWT', `${jwt}`)"],"type":"text/javascript","packages":{}}}],"request":{"method":"POST","header":[{"key":"content-type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"client_credentials\",\n    \"client_id\": \"{{CLIENT_ID}}\",\n    \"client_secret\": \"{{CLIENT_SECRET}}\",\n    \"audience\": \"{{aud}}\"\n}\n"},"url":{"raw":"https://api.auth.dtn.com/v1/tokens/authorize","protocol":"https","host":["api","auth","dtn","com"],"path":["v1","tokens","authorize"]}},"response":[]}]},{"name":"DTN","item":[{"name":"Tracks and cones","event":[{"listen":"test","script":{"exec":[""],"type":"text/javascript","packages":{}}}],"protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/cyclones","host":["{{base_url}}"],"path":["cyclones"],"query":[{"key":"stormName","value":"Amphan","disabled":true},{"key":"stormNum","value":"B01","disabled":true}]},"description":"This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have `id=1`).\n\nA successful GET response will have a `200 OK` status, and should include some kind of response body - for example, HTML web content or JSON data."},"response":[]},{"name":"health","event":[{"listen":"test","script":{"exec":[""],"type":"text/javascript","packages":{}}}],"protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/health-check","host":["{{base_url}}"],"path":["health-check"]},"description":"This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have `id=1`).\n\nA successful GET response will have a `200 OK` status, and should include some kind of response body - for example, HTML web content or JSON data."},"response":[]},{"name":"Wind Radii","event":[{"listen":"test","script":{"exec":[""],"type":"text/javascript","packages":{}}}],"request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/cyclone-radii","host":["{{base_url}}"],"path":["cyclone-radii"],"query":[{"key":"stormName","value":"","disabled":true},{"key":"stormNum","value":"","disabled":true}]}},"response":[]},{"name":"Wind Swaths","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/cyclone-swaths","host":["{{base_url}}"],"path":["cyclone-swaths"],"query":[{"key":"stormName","value":"Maria","disabled":true},{"key":"stormNum","value":"","disabled":true}]}},"response":[]}]},{"name":"Agency","item":[{"name":"Agency Recon","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/cyclone-recon","host":["{{base_url}}"],"path":["cyclone-recon"],"query":[{"key":"stormName","value":"","disabled":true},{"key":"stormNum","value":"","disabled":true}]}},"response":[]},{"name":"Agency Wind Radii","event":[{"listen":"test","script":{"exec":[""],"type":"text/javascript","packages":{}}}],"request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/agency-cyclone-radii","host":["{{base_url}}"],"path":["agency-cyclone-radii"],"query":[{"key":"stormName","value":"Taliah","disabled":true},{"key":"source","value":"BOM","disabled":true},{"key":"stormNum","value":"17S","disabled":true}]}},"response":[]},{"name":"Agency Tracks and cones","event":[{"listen":"test","script":{"exec":[""],"type":"text/javascript","packages":{}}}],"request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/agency-cyclones","host":["{{base_url}}"],"path":["agency-cyclones"],"query":[{"key":"stormName","value":"Tropical Low 21U","disabled":true},{"key":"source","value":"BOM","disabled":true},{"key":"stormNum","value":"17S","disabled":true}]},"description":"This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have `id=1`).\n\nA successful GET response will have a `200 OK` status, and should include some kind of response body - for example, HTML web content or JSON data."},"response":[]},{"name":"Agency Wind Swaths","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/agency-cyclone-swaths","host":["{{base_url}}"],"path":["agency-cyclone-swaths"],"query":[{"key":"stormName","value":"Taliah","description":"e","disabled":true},{"key":"source","value":"","disabled":true},{"key":"stormNum","value":"","disabled":true}]}},"response":[]},{"name":"Agency Model Forecast","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/cyclone-models","host":["{{base_url}}"],"path":["cyclone-models"],"query":[{"key":"stormName","value":"","disabled":true},{"key":"stormNum","value":"","disabled":true}]}},"response":[]}]}],"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{JWT}}","type":"string"}]},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","packages":{},"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test('Body is correct format', function () {","    b = pm.response.json()","    pm.expect(b.url).exist","    pm.expect(b.data).exist","    pm.expect(b.cycloneCount).exist","});","","pm.test(\"Url should be a non-empty string\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.url).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Url should not be empty\");","});","","pm.test(\"Cyclone count is a non-negative integer\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.cycloneCount).to.be.a('number');","    pm.expect(responseData.cycloneCount).to.be.at.least(0, \"Cyclone count should be non-negative\");","});","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","pm.test(\"x-request-id header is set\", function () {","    pm.expect(pm.response.headers.get(\"x-request-id\").exist);","});"]}}]}