Skip to content

Latest commit

 

History

History
50 lines (46 loc) · 2.81 KB

File metadata and controls

50 lines (46 loc) · 2.81 KB

EPA Facilities Registry REST API

Code examples for interacting with the Environmental Protection Agency (EPA) Facility Registry Service (FRS) using the REST API

Python code examples demonstrate how to use the swagger client REST API to query the EPA Facility Registry Service (FRS). General information about EPA FRS can be found here at this URL:
https://www.epa.gov/frs/facility-registry-service-frs-api
Technical documentation for the REST Query API can be found at this URL:
https://frsquerypre-api.epa.gov/facilityiptquery/swagger-ui/index.html

Requirements

  1. Download and install the swagger client REST API code
    I have uploaded two ZIP files above frs-preprod-query-python-client-generated.zip and frs-preprod-submit-python-client-generated.zip that contain the Python version of the Swagger client code. However if changes are made to the API, the Swagger Python client should be re-generated from the source.

    To generate the Python Client:

    • Visit https://editor.swagger.io/ and Clear the editor
    • Open the Query Swagger client: https://frsquerypre-api.epa.gov/facilityiptquery/swagger-v1.json
    • Copy the contents and paste them into the Swagger editor. You may be prompted to convert the JSON into YAML. Click OK.
    • Pull down the Generate Client menu and choose "Python". The python-client-generated.zip file will be downloaded.
    • Move the python-client-generated.zip file to a suitable directory and unzip.
    • Follow the instructions in the README.md file to build and install the client.
  2. Obtain a NAAS username and password from nodehelpdesk@epacdx.net
    In the request indicate the provisioning option to receive from and/or submit data to the FRS the partner system.
  3. Save the NAAS user id and password in a file named credentials.py
       user_id = 'Your NAAS username here'
       password = 'Your NAAS password here'
       
  4. Select the appropriate pre-production (testing) or Production server URL
  5. Make sure the NAAS account has permissions to use the appropriate server and service.
  6. Now you should be able to run queries against the FRS test or production system. Also, if you have the permissions, you should be able to contribute data to the FRS.