openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 67.1 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"name":"U.S. EPA, OECA Integration, Targeting and Access Branch","url":"https://echo.epa.gov/resources/general-info/contact-us"},"description":"Enforcement and Compliance History Online (ECHO) is a tool developed and maintained by EPA's Office of Enforcement and Compliance Assurance for public use. ECHO provides integrated compliance and enforcement information for over 1 million regulated facilities nationwide.\n SDW Rest Services provides multiple service endpoints, each with specific capabilities, to search and retrieve data on public water systems regulated under the Safe Drinking Water Act (SDWA). The returned results reflect data drawn from EPA's Federal Safe Drinking Water Information System (SDWIS) database.\n\\\nThe get_systems, get_qid, and get_download end points are meant to be used together.\n\\\nThe recommended use scenario for get_systems, get_qid, and get_downoad is:\n\\\n <b>1)</b> Use get_systems to validate passed query parameters, obtain summary statistics and to obtain a query_id (QID). QIDs are time sensitive and will be valid for approximately 30 minutes.\n <b>2)</b> Use get_qid, with the returned QID, to paginate through arrays of water system results.\n <b>3)</b> Use get_download, with the returned QID, to generate a Comma Separated Value (CSV) file of water system information that meets the QID query criteria.\n\\\n\\\nUse the qcolumns parameter to customize your search results. Use the Metadata service endpoint for a list of available output objects, their Column Ids, and their definitions to help you build your customized output. \n\\\nAdditional ECHO Resources: <a href=\"https://echo.epa.gov/tools/web-services\">Web Services</a>, <a href=\"https://echo.epa.gov/resources/echo-data/about-the-data\">About ECHO's Data</a>, <a href=\"https://echo.epa.gov/tools/data-downloads\">Data Downloads</a>\n ","license":{"name":"U.S. Public Domain License","url":"https://edg.epa.gov/EPA_Data_License.html"},"title":"U.S. EPA Enforcement and Compliance History Online (ECHO) - Safe Drinking Water Act","version":"2019.10.15","x-apisguru-categories":["open_data"],"x-logo":{"backgroundColor":"#FFFFFF","url":"https://pbs.twimg.com/profile_images/632233890594299904/DgRDU6dx_400x400.png"},"x-origin":[{"format":"swagger","url":"https://ofmpub.epa.gov/echo/swaggerx.swagger_json?p_prefix=SDW","version":"2.0"}],"x-providerName":"epa.gov","x-serviceName":"sdw"},"paths":{"/sdw_rest_services.get_download":{"get":{"description":"Based on the QID obtained from a get_systems query, return a comma separated value (CSV) file of the water systems found.","parameters":[{"description":"Output Format Flag. Enter one of the following keywords:\n- CSV = Facility results formatted as comma delimited file download (default).","in":"query","name":"output","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/q.qid"},{"$ref":"#/components/parameters/q.qcolumns"}],"responses":{"200":{"description":"Results are a comma separated value (CSV) file.","content":{"application/json":{"schema":{"type":"string","format":"binary"}},"application/xml":{"schema":{"type":"string","format":"binary"}}}}},"summary":"Safe Drinking Water Act (SDWA) Download Data Service","tags":["Safe Drinking Water"]},"post":{"description":"Based on the QID obtained from a get_systems query, return a comma separated value (CSV) file of the water systems found.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"output":{"description":"Output Format Flag. Enter one of the following keywords:\n- CSV = Facility results formatted as comma delimited file download (default).","type":"string"},"qid":{"description":"Query ID Selector. Enter the QueryID number from a previously run query.","type":"string"},"qcolumns":{"description":"Used to customize service output. A list of comma-separated column IDs of output objects that will be returned in the service query object or download. Use the metadata service endpoint for a complete list of Ids and definitions.","type":"string"}},"required":["qid"]}}}},"responses":{"200":{"description":"Results are a comma separated value (CSV) file.","content":{"application/json":{"schema":{"type":"string","format":"binary"}},"application/xml":{"schema":{"type":"string","format":"binary"}}}}},"summary":"Safe Drinking Water Act (SDWA) Download Data Service","tags":["Safe Drinking Water"]}},"/sdw_rest_services.get_qid":{"get":{"description":"GET_QID is passed with a query ID corresponding to a previously run get_systems query. It then returns a Systems object containing all matching water systems. The main purpose of GET_QID is for large querysets that contain multiple pages (responsesets) of output. GET_QID allows for pagination and for the selection and sorting of columns. ","parameters":[{"description":"Output Format Flag. Enter one of the following keywords:\n- JSON = Data model formatted as Javascript Object Notation (default).\n- JSONP = Data model formatted as Javascript Object Notation with Padding. \n- XML = Data model formatted as Extensible Markup Language.","in":"query","name":"output","required":false,"schema":{"type":"string","enum":["JSONP","JSON","XML"]}},{"$ref":"#/components/parameters/q.qid"},{"$ref":"#/components/parameters/q.pageno"},{"$ref":"#/components/parameters/q.callback"},{"$ref":"#/components/parameters/q.newsort"},{"$ref":"#/components/parameters/q.descending"},{"$ref":"#/components/parameters/q.qcolumns"}],"responses":{"200":{"description":"Results are an array (page) of SDWA (SDWIS) Water Systems with the number of systems equal to the responseset (page size).","content":{"application/json":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw02"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}},"application/xml":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw02"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}}}}},"summary":"Safe Drinking Water Act (SDWA) Paginated Results Service","tags":["Safe Drinking Water"]},"post":{"description":"GET_QID is passed with a query ID corresponding to a previously run get_systems query. It then returns a Systems object containing all matching water systems. The main purpose of GET_QID is for large querysets that contain multiple pages (responsesets) of output. GET_QID allows for pagination and for the selection and sorting of columns. ","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"output":{"description":"Output Format Flag. Enter one of the following keywords:\n- JSON = Data model formatted as Javascript Object Notation (default).\n- JSONP = Data model formatted as Javascript Object Notation with Padding. \n- XML = Data model formatted as Extensible Markup Language.","type":"string","enum":["JSONP","JSON","XML"]},"qid":{"description":"Query ID Selector. Enter the QueryID number from a previously run query.","type":"string"},"pageno":{"description":"Indicates the number of the page to display. It is used only when the results are paginated.","type":"number","default":1},"callback":{"description":"JSONP Callback. For use with JSONP and GEOJSONP output only. Enter a name of the function in which to wrap the JSON response.","type":"string"},"newsort":{"description":"Output Sort Column. Enter the number of the column on which the data will be sorted. If unpopulated results will sort on the first column.","type":"number"},"descending":{"description":"Output Sort Column Descending Flag. Enter Y to column identified in the newsort parameter descending. Enter N to use ascending sort order. Used only when newsort parameter is populated.","type":"string","enum":["Y","N"]},"qcolumns":{"description":"Used to customize service output. A list of comma-separated column IDs of output objects that will be returned in the service query object or download. Use the metadata service endpoint for a complete list of Ids and definitions.","type":"string"}},"required":["qid"]}}}},"responses":{"200":{"description":"Results are an array (page) of SDWA (SDWIS) Water Systems with the number of systems equal to the responseset (page size).","content":{"application/json":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw02"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}},"application/xml":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw02"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}}}}},"summary":"Safe Drinking Water Act (SDWA) Paginated Results Service","tags":["Safe Drinking Water"]}},"/sdw_rest_services.get_systems":{"get":{"description":"Returns an array of public water systems that meet the specified search criteria.","parameters":[{"description":"Output Format Flag. Enter one of the following keywords:\n- JSON = Data model formatted as Javascript Object Notation (default).\n- JSONP = Data model formatted as Javascript Object Notation with Padding. \n- XML = Data model formatted as Extensible Markup Language.","in":"query","name":"output","required":false,"schema":{"type":"string","enum":["JSONP","JSON","XML"]}},{"$ref":"#/components/parameters/q.p_fn"},{"$ref":"#/components/parameters/q.p_ct"},{"$ref":"#/components/parameters/q.p_co"},{"$ref":"#/components/parameters/q.p_fips"},{"$ref":"#/components/parameters/q.p_st"},{"$ref":"#/components/parameters/q.p_zip"},{"$ref":"#/components/parameters/q.p_reg"},{"$ref":"#/components/parameters/q.p_trb"},{"$ref":"#/components/parameters/q.p_act"},{"$ref":"#/components/parameters/q.p_qiv"},{"$ref":"#/components/parameters/q.p_ico"},{"$ref":"#/components/parameters/q.p_pid"},{"$ref":"#/components/parameters/q.p_owop"},{"$ref":"#/components/parameters/q.p_systyp"},{"$ref":"#/components/parameters/q.p_swtyp"},{"$ref":"#/components/parameters/q.p_popsv"},{"$ref":"#/components/parameters/q.p_cntysv"},{"$ref":"#/components/parameters/q.p_cs"},{"$ref":"#/components/parameters/q.p_mr"},{"$ref":"#/components/parameters/q.p_health"},{"$ref":"#/components/parameters/q.p_other"},{"$ref":"#/components/parameters/q.p_pn"},{"$ref":"#/components/parameters/q.p_sv"},{"$ref":"#/components/parameters/q.p_qs"},{"$ref":"#/components/parameters/q.p_sfs"},{"$ref":"#/components/parameters/q.p_pswpol"},{"$ref":"#/components/parameters/q.p_pswvio"},{"$ref":"#/components/parameters/q.p_pbale"},{"$ref":"#/components/parameters/q.p_cuale"},{"$ref":"#/components/parameters/q.p_rc350v"},{"$ref":"#/components/parameters/q.p_pbv"},{"$ref":"#/components/parameters/q.p_cuv"},{"$ref":"#/components/parameters/q.p_lcrv"},{"$ref":"#/components/parameters/q.p_fea"},{"$ref":"#/components/parameters/q.p_feay"},{"$ref":"#/components/parameters/q.p_feaa"},{"$ref":"#/components/parameters/q.p_iea"},{"$ref":"#/components/parameters/q.p_ieay"},{"$ref":"#/components/parameters/q.p_ieaa"},{"$ref":"#/components/parameters/q.p_qis"},{"$ref":"#/components/parameters/q.p_pfead1"},{"$ref":"#/components/parameters/q.p_pfead2"},{"$ref":"#/components/parameters/q.p_pfeat"},{"$ref":"#/components/parameters/q.p_ss5yr"},{"$ref":"#/components/parameters/q.p_sdc"},{"$ref":"#/components/parameters/q.p_sdc_ils"},{"$ref":"#/components/parameters/q.p_ysl"},{"$ref":"#/components/parameters/q.p_ysly"},{"$ref":"#/components/parameters/q.p_ysla"},{"$ref":"#/components/parameters/q.p_idt1"},{"$ref":"#/components/parameters/q.p_idt2"},{"$ref":"#/components/parameters/q.p_cms_flag"},{"$ref":"#/components/parameters/q.queryset"},{"$ref":"#/components/parameters/q.responseset"},{"$ref":"#/components/parameters/q.callback"},{"$ref":"#/components/parameters/q.qcolumns"}],"responses":{"200":{"description":"Returns an array of public water systems that meet the specified search criteria.","content":{"application/json":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw03"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}},"application/xml":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw03"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}}}}},"summary":"Safe Drinking Water Act (SDWA) Systems Search Service","tags":["Safe Drinking Water"]},"post":{"description":"Returns an array of public water systems that meet the specified search criteria.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"output":{"description":"Output Format Flag. Enter one of the following keywords:\n- JSON = Data model formatted as Javascript Object Notation (default).\n- JSONP = Data model formatted as Javascript Object Notation with Padding. \n- XML = Data model formatted as Extensible Markup Language.","type":"string","enum":["JSONP","JSON","XML"]},"p_fn":{"description":"Facility Name Filter. Enter one or more case-insensitive facility names to filter results. Provide multiple values as a comma-delimited list. See p_fntype for additional modifiers.","type":"string"},"p_ct":{"description":"Facility City Filter. Enter a single case-insensitive city name to filter results.","type":"string"},"p_co":{"description":"Facility County Filter. Provide a single county name in combination with a state value provided via p_st.","type":"string"},"p_fips":{"description":"FIPS Code Filter. Enter a single 5-character Federal Information Processing Standards (FIPS) state + county value to restrict results. E.g. to limit results to Kenosha County, Wisconsin, use 55059.","type":"string"},"p_st":{"description":"Facility State and State-Equivalent Filter. Provide one or more USPS postal abbreviations for states and state-equivalents to filter results. Provide multiple values as a comma-delimited list.","type":"string"},"p_zip":{"description":"5-Digit ZIP Code Filter. Provide one or more 5-digit postal zip codes to filter results. May contain multiple comma-separated values.","type":"string"},"p_reg":{"description":"EPA Region Filter. Provide a single value of 01 thru 10 to restrict results to a single EPA region.","type":"string","enum":["01","02","03","04","05","06","07","08","09","10"]},"p_trb":{"description":"Tribe name","type":"string"},"p_act":{"description":"Active Permits/Facilities Flag. Provide Y or N to filter results to facilities with active permits.","type":"string","enum":["Y","N","A"]},"p_qiv":{"description":"Quarters in Noncompliance Limiter. Enter a coded value to limit results to facilities with given quarter of noncompliance.\n- Z = Zero quarters in noncompliance.\n- GEXX = Replacing XX with a numeric value, that number of quarterd or more in noncompliance.\n- GTXX = Replacing XX with a numeric value, more than that number of quarters in noncompliance.","type":"string","enum":["0","GT1","GT2","GT4","GT8","12"]},"p_ico":{"description":"Indian Country Flag. Enter a \"Y\" or \"N\" to restrict searches to facilities inside or outside Indian Country.","type":"string","enum":["Y","N"]},"p_pid":{"description":"Nine-digit permit IDs. May contain up to 2000 comma-separated values.","type":"string"},"p_owop":{"description":"Owner/Operator code filter. Enter one of the following codes to filter results:\n- F = Federal Government\n- S = State Government\n- L = Local Government\n- M = Public/Private\n- N = Native American\n- P = Private","type":"string","enum":["F","S","L","M","N","P"]},"p_systyp":{"description":"Type of public water system:\n- CWS=Community water system\n- NCWS=Non-community water system\n- NTCWS=Non-transient non-community water system\n- TNCWS=Transient non-community water system","type":"string","enum":["CWS","NCWS","NTCWS","TNCWS"]},"p_swtyp":{"description":"Source Water Type:\n- SW = Surface water \n- GW= Ground water\n- GU = Ground water under direct influence of (UDI) surface water\n- SWP = Purchased Surface water\n- GWP = Purchased Ground water\n- GUP = Purchased Ground water UDI surface water","type":"string","enum":["SW","GW","GU","SWP","GWP","GUP"]},"p_popsv":{"description":"Estimated average daily population served by a system:\n- LE500 = 500 or less\n- IN501_3K = 501-3,300\n- IN3K_10K = 3,301-10,000\n- IN10K_100K = 10,001-100,000\n- IN100K_1M = 100,001-1,000,000\n- GT1M = More than 1,000,000\nMay contain multiple comma-separated values.","type":"string"},"p_cntysv":{"type":"string"},"p_cs":{"description":"Current violations:\n- M = Monitoring and Reporting Violations\n- H = Health-based Violations\n- O = Other Violations\n- P = Public Notice Violations\n- S = Serious Violator\n- N = No Violations\nMay contain multiple comma-separated values.","type":"string"},"p_mr":{"description":"Monitoring and Reporting Violations (failure to conduct regular monitoring of drinking water quality or submit monitoring results in a timely fashion).","type":"string","enum":["Y","N"]},"p_health":{"description":"Violations of health-based drinking water standards (maximum contaminant levels, maximum residual disinfectant levels, or treatment technique rules).","type":"string","enum":["Y","N"]},"p_other":{"description":"Other violations, such as failing to issue annual consumer confidence reports or maintain required records.","type":"string","enum":["Y","N"]},"p_pn":{"description":"Public Notice Violations (failure to immediately alert consumers of serious problem with drinking water).","type":"string","enum":["Y","N"]},"p_sv":{"description":"Serious Violator (unresolved serious, multiple, and/or continuing violations). A value of Y will return only SDWIS systems that are Serious Violators, while a value of N will only return SDWIS Systems that are not Serious Violators.","type":"string","enum":["Y","N"]},"p_qs":{"description":"Quick Search. Allows entry for city, state, and/or zip code.","type":"string"},"p_sfs":{"description":"Single Facility Search Filter. Provide a facility name or program system identifier to limit results. For the all data search, the FRS registry identifier is also searched.","type":"string"},"p_pswpol":{"description":"For CWA, pollutant names for surface water discharges. for Drinking Water, SDWIS Violation contaminant codes for unaddressed violations that have occurred in the last 3 years. May contain multiple comma-separated values.","type":"string"},"p_pswvio":{"description":"Used in conjuction with parameters p_pswpol and p_pswparam, indicates whether search should only include pollutants with violations.","type":"string","enum":["Y","N"]},"p_pbale":{"description":"Lead Action Level Exceedance. A \"Y\" value will select water systems with at least 1 Lead Action Level Exceedance.","type":"string"},"p_cuale":{"description":"Copper Action Level Exceedance. A \"Y\" value will select water systems with at least 1 Copper Action Level Exceedance.","type":"string"},"p_rc350v":{"description":"Rule code 350 violation. A \"Y\" value will select water systems with at least one rule code 350 violation.","type":"string"},"p_pbv":{"description":"Lead Violations. A \"Y\" value will select water systems with at least 1 Lead Violation.","type":"string"},"p_cuv":{"description":"Copper Violation. A \"Y\" value will select water systems with at least 1 Copper Violation.","type":"string"},"p_lcrv":{"description":"Lead or Copper rule violations. A \"Y\" value will select water systems with at least 1 Lead or Copper Rule Violation.","type":"string"},"p_fea":{"description":"Formal Enforcement Actions [within / not within] specified date range indicator. The date range is determined by parameters p_fead1 and p_fead2 or by parameter p_feay.\n- W = within date range\n- N = not within date range","type":"string","enum":["W","N"]},"p_feay":{"description":"Years (1 to 5) Range. This value is used to create a date range for Formal Enforcement Actions (FEA). Used along with p_fea (which indicates whether to look within or outside of the date range) to find FEAs within (or not within) the number of years specified.","type":"number","enum":[1,2,3,4,5]},"p_feaa":{"description":"Agency associated with Formal Enforcement Actions:\n- E = EPA\n- S = State\n- A = All","type":"string","enum":["A","E","S"]},"p_iea":{"description":"Informal Enforcement Actions [within / not within] specified date range. The date range is determined by parameters p_iead1 and p_iead2 or by parameter p_ieay.\n- W = within date range\n- N = not within date range","type":"string","enum":["W","N"]},"p_ieay":{"description":"Years (1 to 5) Range. This value is used to create a date range for Informal Enforcement Actions (IEA). Used along with p_iea (which indicates whether to look within or outside of the date range) to find IEAs within (or not within) the number of years specified.","type":"number","enum":[1,2,3,4,5]},"p_ieaa":{"description":"Agency associated with Informal Enforcement Actions. If left blank, both agencies are included.\n- E = EPA\n- S = State","type":"string","enum":["E","S"]},"p_qis":{"description":"Significant Quarters in Noncompliance Limiter. Enter one of the following codes to limit results to facilities having given quarters of noncompliance.\n- Z = Zero quarters in noncompliance.\n- GE1 = One or more quarters in noncompliance.\n- GT1 = More than one quarters in noncompliance.\n- GE2 = Two or more quarters in noncompliance.\n- GT2 = More than two quarters in noncompliance.\n- GE4 = Four or more quarters in noncompliance.\n- GT4 = More than four quarters in noncompliance.\n- GE8 = Eight or more quarters in noncompliance.\n- GT8 = More than eight quarters in noncompliance.\n- GE12 = Twelve or more quarters in noncompliance.\n- GT12 = Twelve or more quarters in noncompliance.\n- 12 = Exactly twelve quarters in noncompliance.\nNote the seemingly incongruous of GT12 is deliberate.","type":"string","enum":["Z","GE1","GT1","GE2","GT2","GE4","GT4","GE8","GT8","GE12","GT12","12"]},"p_pfead1":{"description":"Formal Enforcement Action Date Range Start. Enter a date in MM/DD/YYYY format to set the start of the range for filtering by recent Formal Enforcement Action (FEA) taken against the facility within the last five years.","type":"string"},"p_pfead2":{"description":"Formal Enforcement Action Date Range End. Enter a date in MM/DD/YYYY format to set the end of the date range for filtering by recent Formal Enforcement Action (FEA) taken against the facility within the last five years.","type":"string"},"p_pfeat":{"description":"Formal Enforcement Action (FEA) Code Filter. Enter one or more three-letter FEA codes to restrict results to facilities with these attributes. Use p_fead1 and p_fead2 parameters to further restrict this filter by entering a date range. Provide multiple codes as a comma-delimited list.","type":"string"},"p_ss5yr":{"description":"Sanitary Surveys (in past 5 years) flag. Values of visit_reason_code are either \"SNSV\" or \"SNSP\" in the past 5 years indicate a Sanitary Survey. \n\nEnter \"Y\" to select facilities with Sanitary Surveys within the past 5 years. \n\nEnter \"N\" to select facilities without Sanitary Surveys in the past 5 years.\n\nEnter a number to search for greater for facilities with a quantity than or equal to that value.\n\n\n","type":"string"},"p_sdc":{"description":"Significant Deficiency Count (in past 5 years) flag. \n\nEnter \"Y\" to select facilities with Sanitary Surveys within the past 5 years. \n\nEnter \"N\" to select facilities without Sanitary Surveys in the past 5 years.\n\nEnter a number to search for facilities with a quantity greater than or equal to that value.","type":"string"},"p_sdc_ils":{"type":"string"},"p_ysl":{"description":"Last Facility Inspection [within / not within] Specified Date Range Indicator. The date range is determined by parameters p_idt1 and p_idt2 or by parameter p_ysly.\n- W = within date range\n- N = not within date range","type":"string","enum":["W","N","NV"]},"p_ysly":{"description":"Number of years (1 to 5) since last facility inspection. A value of 1 means that it has been inspected within the year.","type":"string","enum":["1","2","3","4","5"]},"p_ysla":{"description":"Facility Last Inspection Code Filter. If left blank, both agencies are included. Enter a value to limit results:\n- E = EPA\n- S = State","type":"string","enum":["E","S","A"]},"p_idt1":{"description":"Beginning of date range of most recent facility inspection.","type":"string"},"p_idt2":{"description":"End of date range of most recent facility inspection.","type":"string"},"p_cms_flag":{"type":"string"},"queryset":{"description":"Query Limiter. Enter a value to limit the number of records returned for each query. Value cannot exceed 70,000.","type":"number"},"responseset":{"description":"Response Set Limiter. Enter a value to limit the number of records per page. Value cannot exceed 1,000.","type":"number"},"callback":{"description":"JSONP Callback. For use with JSONP and GEOJSONP output only. Enter a name of the function in which to wrap the JSON response.","type":"string"},"qcolumns":{"description":"Used to customize service output. A list of comma-separated column IDs of output objects that will be returned in the service query object or download. Use the metadata service endpoint for a complete list of Ids and definitions.","type":"string"}}}}}},"responses":{"200":{"description":"Returns an array of public water systems that meet the specified search criteria.","content":{"application/json":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw03"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}},"application/xml":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/sdw03"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}}}}},"summary":"Safe Drinking Water Act (SDWA) Systems Search Service","tags":["Safe Drinking Water"]}},"/sdw_rest_services.metadata":{"get":{"description":"Returns the JSON Object Name and ColumnId for usage with the qcolumns parameter for get_systems endpoint.","parameters":[{"description":"Output Format Flag. Enter one of the following keywords:\n- JSON = Data model formatted as Javascript Object Notation (default).\n- JSONP = Data model formatted as Javascript Object Notation with Padding. \n- XML = Data model formatted as Extensible Markup Language.","in":"query","name":"output","required":false,"schema":{"type":"string","enum":["JSONP","JSON","XML"]}},{"$ref":"#/components/parameters/q.callback"}],"responses":{"200":{"description":"Results are an array of columns/objects.","content":{"application/json":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/meta1"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}},"application/xml":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/meta1"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}}}}},"summary":"Safe Drinking Water Act (SDWA) Metadata Service","tags":["Metadata"]},"post":{"description":"Returns the JSON Object Name and ColumnId for usage with the qcolumns parameter for get_systems endpoint.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"output":{"description":"Output Format Flag. Enter one of the following keywords:\n- JSON = Data model formatted as Javascript Object Notation (default).\n- JSONP = Data model formatted as Javascript Object Notation with Padding. \n- XML = Data model formatted as Extensible Markup Language.","type":"string","enum":["JSONP","JSON","XML"]},"callback":{"description":"JSONP Callback. For use with JSONP and GEOJSONP output only. Enter a name of the function in which to wrap the JSON response.","type":"string"}}}}}},"responses":{"200":{"description":"Results are an array of columns/objects.","content":{"application/json":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/meta1"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}},"application/xml":{"schema":{"description":"Root Object","properties":{"Results":{"$ref":"#/components/schemas/meta1"}},"required":["Results"],"type":"object","xml":{"name":"Root"}}}}}},"summary":"Safe Drinking Water Act (SDWA) Metadata Service","tags":["Metadata"]}}},"servers":[{"url":"https://echodata.epa.gov/echo"}],"components":{"parameters":{"q.callback":{"description":"JSONP Callback. For use with JSONP and GEOJSONP output only. Enter a name of the function in which to wrap the JSON response.","in":"query","name":"callback","required":false,"schema":{"type":"string"}},"q.descending":{"description":"Output Sort Column Descending Flag. Enter Y to column identified in the newsort parameter descending. Enter N to use ascending sort order. Used only when newsort parameter is populated.","in":"query","name":"descending","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.newsort":{"description":"Output Sort Column. Enter the number of the column on which the data will be sorted. If unpopulated results will sort on the first column.","in":"query","name":"newsort","required":false,"schema":{"type":"number"}},"q.p_act":{"description":"Active Permits/Facilities Flag. Provide Y or N to filter results to facilities with active permits.","in":"query","name":"p_act","required":false,"schema":{"type":"string","enum":["Y","N","A"]}},"q.p_cms_flag":{"in":"query","name":"p_cms_flag","required":false,"schema":{"type":"string"}},"q.p_cntysv":{"in":"query","name":"p_cntysv","required":false,"schema":{"type":"string"}},"q.p_co":{"description":"Facility County Filter. Provide a single county name in combination with a state value provided via p_st.","in":"query","name":"p_co","required":false,"schema":{"type":"string"}},"q.p_cs":{"description":"Current violations:\n- M = Monitoring and Reporting Violations\n- H = Health-based Violations\n- O = Other Violations\n- P = Public Notice Violations\n- S = Serious Violator\n- N = No Violations\nMay contain multiple comma-separated values.","in":"query","name":"p_cs","required":false,"schema":{"type":"string"}},"q.p_ct":{"description":"Facility City Filter. Enter a single case-insensitive city name to filter results.","in":"query","name":"p_ct","required":false,"schema":{"type":"string"}},"q.p_cuale":{"description":"Copper Action Level Exceedance. A \"Y\" value will select water systems with at least 1 Copper Action Level Exceedance.","in":"query","name":"p_cuale","required":false,"schema":{"type":"string"}},"q.p_cuv":{"description":"Copper Violation. A \"Y\" value will select water systems with at least 1 Copper Violation.","in":"query","name":"p_cuv","required":false,"schema":{"type":"string"}},"q.p_fea":{"description":"Formal Enforcement Actions [within / not within] specified date range indicator. The date range is determined by parameters p_fead1 and p_fead2 or by parameter p_feay.\n- W = within date range\n- N = not within date range","in":"query","name":"p_fea","required":false,"schema":{"type":"string","enum":["W","N"]}},"q.p_feaa":{"description":"Agency associated with Formal Enforcement Actions:\n- E = EPA\n- S = State\n- A = All","in":"query","name":"p_feaa","required":false,"schema":{"type":"string","enum":["A","E","S"]}},"q.p_feay":{"description":"Years (1 to 5) Range. This value is used to create a date range for Formal Enforcement Actions (FEA). Used along with p_fea (which indicates whether to look within or outside of the date range) to find FEAs within (or not within) the number of years specified.","in":"query","name":"p_feay","required":false,"schema":{"type":"number","enum":[1,2,3,4,5]}},"q.p_fips":{"description":"FIPS Code Filter. Enter a single 5-character Federal Information Processing Standards (FIPS) state + county value to restrict results. E.g. to limit results to Kenosha County, Wisconsin, use 55059.","in":"query","name":"p_fips","required":false,"schema":{"type":"string"}},"q.p_fn":{"description":"Facility Name Filter. Enter one or more case-insensitive facility names to filter results. Provide multiple values as a comma-delimited list. See p_fntype for additional modifiers.","in":"query","name":"p_fn","required":false,"schema":{"type":"string"}},"q.p_health":{"description":"Violations of health-based drinking water standards (maximum contaminant levels, maximum residual disinfectant levels, or treatment technique rules).","in":"query","name":"p_health","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.p_ico":{"description":"Indian Country Flag. Enter a \"Y\" or \"N\" to restrict searches to facilities inside or outside Indian Country.","in":"query","name":"p_ico","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.p_idt1":{"description":"Beginning of date range of most recent facility inspection.","in":"query","name":"p_idt1","required":false,"schema":{"type":"string"}},"q.p_idt2":{"description":"End of date range of most recent facility inspection.","in":"query","name":"p_idt2","required":false,"schema":{"type":"string"}},"q.p_iea":{"description":"Informal Enforcement Actions [within / not within] specified date range. The date range is determined by parameters p_iead1 and p_iead2 or by parameter p_ieay.\n- W = within date range\n- N = not within date range","in":"query","name":"p_iea","required":false,"schema":{"type":"string","enum":["W","N"]}},"q.p_ieaa":{"description":"Agency associated with Informal Enforcement Actions. If left blank, both agencies are included.\n- E = EPA\n- S = State","in":"query","name":"p_ieaa","required":false,"schema":{"type":"string","enum":["E","S"]}},"q.p_ieay":{"description":"Years (1 to 5) Range. This value is used to create a date range for Informal Enforcement Actions (IEA). Used along with p_iea (which indicates whether to look within or outside of the date range) to find IEAs within (or not within) the number of years specified.","in":"query","name":"p_ieay","required":false,"schema":{"type":"number","enum":[1,2,3,4,5]}},"q.p_lcrv":{"description":"Lead or Copper rule violations. A \"Y\" value will select water systems with at least 1 Lead or Copper Rule Violation.","in":"query","name":"p_lcrv","required":false,"schema":{"type":"string"}},"q.p_mr":{"description":"Monitoring and Reporting Violations (failure to conduct regular monitoring of drinking water quality or submit monitoring results in a timely fashion).","in":"query","name":"p_mr","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.p_other":{"description":"Other violations, such as failing to issue annual consumer confidence reports or maintain required records.","in":"query","name":"p_other","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.p_owop":{"description":"Owner/Operator code filter. Enter one of the following codes to filter results:\n- F = Federal Government\n- S = State Government\n- L = Local Government\n- M = Public/Private\n- N = Native American\n- P = Private","in":"query","name":"p_owop","required":false,"schema":{"type":"string","enum":["F","S","L","M","N","P"]}},"q.p_pbale":{"description":"Lead Action Level Exceedance. A \"Y\" value will select water systems with at least 1 Lead Action Level Exceedance.","in":"query","name":"p_pbale","required":false,"schema":{"type":"string"}},"q.p_pbv":{"description":"Lead Violations. A \"Y\" value will select water systems with at least 1 Lead Violation.","in":"query","name":"p_pbv","required":false,"schema":{"type":"string"}},"q.p_pfead1":{"description":"Formal Enforcement Action Date Range Start. Enter a date in MM/DD/YYYY format to set the start of the range for filtering by recent Formal Enforcement Action (FEA) taken against the facility within the last five years.","in":"query","name":"p_pfead1","required":false,"schema":{"type":"string"}},"q.p_pfead2":{"description":"Formal Enforcement Action Date Range End. Enter a date in MM/DD/YYYY format to set the end of the date range for filtering by recent Formal Enforcement Action (FEA) taken against the facility within the last five years.","in":"query","name":"p_pfead2","required":false,"schema":{"type":"string"}},"q.p_pfeat":{"description":"Formal Enforcement Action (FEA) Code Filter. Enter one or more three-letter FEA codes to restrict results to facilities with these attributes. Use p_fead1 and p_fead2 parameters to further restrict this filter by entering a date range. Provide multiple codes as a comma-delimited list.","in":"query","name":"p_pfeat","required":false,"schema":{"type":"string"}},"q.p_pid":{"description":"Nine-digit permit IDs. May contain up to 2000 comma-separated values.","in":"query","name":"p_pid","required":false,"schema":{"type":"string"}},"q.p_pn":{"description":"Public Notice Violations (failure to immediately alert consumers of serious problem with drinking water).","in":"query","name":"p_pn","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.p_popsv":{"description":"Estimated average daily population served by a system:\n- LE500 = 500 or less\n- IN501_3K = 501-3,300\n- IN3K_10K = 3,301-10,000\n- IN10K_100K = 10,001-100,000\n- IN100K_1M = 100,001-1,000,000\n- GT1M = More than 1,000,000\nMay contain multiple comma-separated values.","in":"query","name":"p_popsv","required":false,"schema":{"type":"string"}},"q.p_pswpol":{"description":"For CWA, pollutant names for surface water discharges. for Drinking Water, SDWIS Violation contaminant codes for unaddressed violations that have occurred in the last 3 years. May contain multiple comma-separated values.","in":"query","name":"p_pswpol","required":false,"schema":{"type":"string"}},"q.p_pswvio":{"description":"Used in conjuction with parameters p_pswpol and p_pswparam, indicates whether search should only include pollutants with violations.","in":"query","name":"p_pswvio","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.p_qis":{"description":"Significant Quarters in Noncompliance Limiter. Enter one of the following codes to limit results to facilities having given quarters of noncompliance.\n- Z = Zero quarters in noncompliance.\n- GE1 = One or more quarters in noncompliance.\n- GT1 = More than one quarters in noncompliance.\n- GE2 = Two or more quarters in noncompliance.\n- GT2 = More than two quarters in noncompliance.\n- GE4 = Four or more quarters in noncompliance.\n- GT4 = More than four quarters in noncompliance.\n- GE8 = Eight or more quarters in noncompliance.\n- GT8 = More than eight quarters in noncompliance.\n- GE12 = Twelve or more quarters in noncompliance.\n- GT12 = Twelve or more quarters in noncompliance.\n- 12 = Exactly twelve quarters in noncompliance.\nNote the seemingly incongruous of GT12 is deliberate.","in":"query","name":"p_qis","required":false,"schema":{"type":"string","enum":["Z","GE1","GT1","GE2","GT2","GE4","GT4","GE8","GT8","GE12","GT12","12"]}},"q.p_qiv":{"description":"Quarters in Noncompliance Limiter. Enter a coded value to limit results to facilities with given quarter of noncompliance.\n- Z = Zero quarters in noncompliance.\n- GEXX = Replacing XX with a numeric value, that number of quarterd or more in noncompliance.\n- GTXX = Replacing XX with a numeric value, more than that number of quarters in noncompliance.","in":"query","name":"p_qiv","required":false,"schema":{"type":"string","enum":["0","GT1","GT2","GT4","GT8","12"]}},"q.p_qs":{"description":"Quick Search. Allows entry for city, state, and/or zip code.","in":"query","name":"p_qs","required":false,"schema":{"type":"string"}},"q.p_rc350v":{"description":"Rule code 350 violation. A \"Y\" value will select water systems with at least one rule code 350 violation.","in":"query","name":"p_rc350v","required":false,"schema":{"type":"string"}},"q.p_reg":{"description":"EPA Region Filter. Provide a single value of 01 thru 10 to restrict results to a single EPA region.","in":"query","name":"p_reg","required":false,"schema":{"type":"string","enum":["01","02","03","04","05","06","07","08","09","10"]}},"q.p_sdc":{"description":"Significant Deficiency Count (in past 5 years) flag. \n\nEnter \"Y\" to select facilities with Sanitary Surveys within the past 5 years. \n\nEnter \"N\" to select facilities without Sanitary Surveys in the past 5 years.\n\nEnter a number to search for facilities with a quantity greater than or equal to that value.","in":"query","name":"p_sdc","required":false,"schema":{"type":"string"}},"q.p_sdc_ils":{"in":"query","name":"p_sdc_ils","required":false,"schema":{"type":"string"}},"q.p_sfs":{"description":"Single Facility Search Filter. Provide a facility name or program system identifier to limit results. For the all data search, the FRS registry identifier is also searched.","in":"query","name":"p_sfs","required":false,"schema":{"type":"string"}},"q.p_ss5yr":{"description":"Sanitary Surveys (in past 5 years) flag. Values of visit_reason_code are either \"SNSV\" or \"SNSP\" in the past 5 years indicate a Sanitary Survey. \n\nEnter \"Y\" to select facilities with Sanitary Surveys within the past 5 years. \n\nEnter \"N\" to select facilities without Sanitary Surveys in the past 5 years.\n\nEnter a number to search for greater for facilities with a quantity than or equal to that value.\n\n\n","in":"query","name":"p_ss5yr","required":false,"schema":{"type":"string"}},"q.p_st":{"description":"Facility State and State-Equivalent Filter. Provide one or more USPS postal abbreviations for states and state-equivalents to filter results. Provide multiple values as a comma-delimited list.","in":"query","name":"p_st","required":false,"schema":{"type":"string"}},"q.p_sv":{"description":"Serious Violator (unresolved serious, multiple, and/or continuing violations). A value of Y will return only SDWIS systems that are Serious Violators, while a value of N will only return SDWIS Systems that are not Serious Violators.","in":"query","name":"p_sv","required":false,"schema":{"type":"string","enum":["Y","N"]}},"q.p_swtyp":{"description":"Source Water Type:\n- SW = Surface water \n- GW= Ground water\n- GU = Ground water under direct influence of (UDI) surface water\n- SWP = Purchased Surface water\n- GWP = Purchased Ground water\n- GUP = Purchased Ground water UDI surface water","in":"query","name":"p_swtyp","required":false,"schema":{"type":"string","enum":["SW","GW","GU","SWP","GWP","GUP"]}},"q.p_systyp":{"description":"Type of public water system:\n- CWS=Community water system\n- NCWS=Non-community water system\n- NTCWS=Non-transient non-community water system\n- TNCWS=Transient non-community water system","in":"query","name":"p_systyp","required":false,"schema":{"type":"string","enum":["CWS","NCWS","NTCWS","TNCWS"]}},"q.p_trb":{"description":"Tribe name","in":"query","name":"p_trb","required":false,"schema":{"type":"string"}},"q.p_ysl":{"description":"Last Facility Inspection [within / not within] Specified Date Range Indicator. The date range is determined by parameters p_idt1 and p_idt2 or by parameter p_ysly.\n- W = within date range\n- N = not within date range","in":"query","name":"p_ysl","required":false,"schema":{"type":"string","enum":["W","N","NV"]}},"q.p_ysla":{"description":"Facility Last Inspection Code Filter. If left blank, both agencies are included. Enter a value to limit results:\n- E = EPA\n- S = State","in":"query","name":"p_ysla","required":false,"schema":{"type":"string","enum":["E","S","A"]}},"q.p_ysly":{"description":"Number of years (1 to 5) since last facility inspection. A value of 1 means that it has been inspected within the year.","in":"query","name":"p_ysly","required":false,"schema":{"type":"string","enum":["1","2","3","4","5"]}},"q.p_zip":{"description":"5-Digit ZIP Code Filter. Provide one or more 5-digit postal zip codes to filter results. May contain multiple comma-separated values.","in":"query","name":"p_zip","required":false,"schema":{"type":"string"}},"q.pageno":{"description":"Indicates the number of the page to display. It is used only when the results are paginated.","in":"query","name":"pageno","required":false,"schema":{"type":"number","default":1}},"q.qcolumns":{"description":"Used to customize service output. A list of comma-separated column IDs of output objects that will be returned in the service query object or download. Use the metadata service endpoint for a complete list of Ids and definitions.","in":"query","name":"qcolumns","required":false,"schema":{"type":"string"}},"q.qid":{"description":"Query ID Selector. Enter the QueryID number from a previously run query.","in":"query","name":"qid","required":true,"schema":{"type":"string"}},"q.queryset":{"description":"Query Limiter. Enter a value to limit the number of records returned for each query. Value cannot exceed 70,000.","in":"query","name":"queryset","required":false,"schema":{"type":"number"}},"q.responseset":{"description":"Response Set Limiter. Enter a value to limit the number of records per page. Value cannot exceed 1,000.","in":"query","name":"responseset","required":false,"schema":{"type":"number"}}},"schemas":{"meta1":{"description":"Results Object","properties":{"Message":{"description":"Field to record messages (typically performance-related) about packet processing","example":"Success","title":"Message","type":"string"},"ResultColumns":{"items":{"$ref":"#/components/schemas/meta3"},"title":"Result Columns","type":"array","xml":{"name":"ResultColumns","wrapped":true}}},"required":["Message"],"type":"object"},"meta3":{"description":"Results Column Object","properties":{"ColumnID":{"title":"Column ID","type":"string"},"ColumnName":{"title":"Column Name","type":"string"},"DataLength":{"description":"Data length for EPA program database column.","example":"10","title":"Data Length","type":"string"},"DataType":{"description":"Data type for EPA program database column.","example":"NUMBER","title":"Data Type","type":"string"},"Description":{"title":"Column Description","type":"string"},"ObjectName":{"description":"The JSON name used for the database column.","example":"CaseName","title":"Object Name","type":"string"}},"required":["ColumnName","DataType","DataLength","ColumnID","ObjectName","Description"],"type":"object","xml":{"name":"ResultColumn"}},"sdw02":{"description":"Results Object","properties":{"Message":{"description":"Field to record messages (typically performance-related) about packet processing","example":"Success","title":"Message","type":"string"},"PageNo":{"description":"The number of pages of results returned","example":"1","title":"Page Number","type":"string"},"QueryID":{"description":"Sequential number assigned to entire search result","example":"245","title":"Query Identifier","type":"string"},"QueryRows":{"description":"Number of query results returned","example":"5","title":"Query Row Count","type":"string"},"WaterSystems":{"items":{"$ref":"#/components/schemas/sdw04"},"title":"Water Systems","type":"array","xml":{"name":"WaterSystems","wrapped":true}}},"required":["Message","QueryRows","QueryID","PageNo"],"type":"object"},"sdw03":{"description":"Results Object","properties":{"BadSystemIDs":{"description":"Identifies which passed query system identifiers are invalid.","type":"string"},"CVRows":{"description":"Summary count of the number of CWA facilities or SDWA public drinking water systems with current violations.","example":"0","type":"string"},"FEARows":{"description":"Summary count of the number of facilities with a formal enforcement action in the past five years","example":"1","type":"string"},"INSPRows":{"description":"Number of facilities with insp_5yr_flag populated (CWP_DATE_LAST_INSPECTION)","example":"1","type":"string"},"IndianCountryRows":{"description":"Number of facilities with tribal_flag populated","example":"0","title":"Indian Country Row Count","type":"string"},"InfFEARows":{"description":"Number of facilities with infea_5yr_flag populated (INFORMAL_ENF_ACT_COUNT > 0)","example":"0","type":"string"},"Message":{"description":"Field to record messages (typically performance-related) about packet processing","example":"Success","title":"Message","type":"string"},"PageNo":{"description":"The number of pages of results returned","example":"1","title":"Page Number","type":"string"},"QueryID":{"description":"Sequential number assigned to entire search result","example":"245","title":"Query Identifier","type":"string"},"QueryRows":{"description":"Number of query results returned","example":"5","title":"Query Row Count","type":"string"},"SVRows":{"description":"Number of facilities with curr_sv_flag populated (CWP_STATUS = \"Significant Violation\")","example":"0","title":"Significant Violation Result Count","type":"string"},"V3Rows":{"description":"Number of facilities having one or more quarters in non-compliance (QNC) in the last three years","example":"2","type":"string"},"Version":{"description":"Version of the SDWA system service","example":"v2016-02-02 14:","title":"Version","type":"string"},"WaterSystems":{"items":{"$ref":"#/components/schemas/sdw04"},"title":"Water Systems","type":"array","xml":{"name":"WaterSystems","wrapped":true}}},"required":["Message","Version","QueryRows","IndianCountryRows","SVRows","CVRows","V3Rows","FEARows","InfFEARows","INSPRows","BadSystemIDs","QueryID","PageNo"],"type":"object"},"sdw04":{"description":"Safe Drinking Water Search Results Object","properties":{"CitiesServed":{"description":"County","example":"CAROLINE","type":"string"},"CountiesServed":{"description":"City","example":"ALEXANDRIA","title":"City","type":"string"},"CuAle":{"description":"The count of occurrences when 90th percentile sample concentrations of copper exceeded the copper action level of 1.3 mg/L in the past five years.","example":"4","title":"Copper Action Level Exceedances (5 years)","type":"string"},"CuViol":{"description":"The number of copper violations in the last five years.","example":"2","title":"Copper Violation","type":