SDWIS Prime REST APIs Elinor Keith ASDWA Data

  • Slides: 11
Download presentation
SDWIS Prime REST APIs Elinor Keith ASDWA Data Management Users Conference Salt Lake City,

SDWIS Prime REST APIs Elinor Keith ASDWA Data Management Users Conference Salt Lake City, Utah July 11, 2018 U. S. Environmental Protection Agency

REST APIs • Websites (such as the SDWIS Prime User Interface, or UI) are

REST APIs • Websites (such as the SDWIS Prime User Interface, or UI) are how computers communicate to humans over the internet, and Application Programming Interfaces (APIs) are how computers communicate to other computers • APIs allow 2 things to be exposed and used safely over the internet: – Data – Functionality U. S. Environmental Protection Agency

Example: Possible Violations API • Sometimes users want to view violations oneby-one, and sometimes

Example: Possible Violations API • Sometimes users want to view violations oneby-one, and sometimes (especially for monitoring violations with a lot of analytes) they want them to be grouped together first • REST APIs can call each other so that they are flexible enough to provide both State Application API: Group violations together (functionality) API: View individual violations (data) U. S. Environmental Protection Agency

REST APIs • For SDWIS Prime, the focus of the APIs will be on

REST APIs • For SDWIS Prime, the focus of the APIs will be on data access • Users will be able to view, create, replace, update, or delete their data using the REST APIs just as they can through the UI, according to their permissions • States or third parties will be able to develop their own interfacing applications (things like sanitary survey apps) and potentially share them with other states U. S. Environmental Protection Agency

REST API Definitions • • DELETE: delete data GET: view data OPTIONS: find the

REST API Definitions • • DELETE: delete data GET: view data OPTIONS: find the allowed actions POST: update or create data PUT: create data REST: REpresentational Stateless Transfer URI: Uniform Resource Identifier, the web address of the API (aka Endpoint) U. S. Environmental Protection Agency

REST APIs • RESTful characteristics: – Client-server: the REST client and server are independent,

REST APIs • RESTful characteristics: – Client-server: the REST client and server are independent, and only connected over the internet (separation of concerns) – Stateless: no client context is kept on the server (although the client can create or update SDWIS Prime data) – Cacheable: clients or intermediaries can cache the responses – Layered system. U. S. Environmental Protection Agency

Long-term sustainability • As long as three things are maintained: – API inputs –

Long-term sustainability • As long as three things are maintained: – API inputs – API outputs – The API URI/Endpoint • … both the client (a state application) and the server (EPA’s SDWIS Prime APIs) can be upgraded independently of each other U. S. Environmental Protection Agency

API vision • Build out REST APIs so that the Prime UI can be

API vision • Build out REST APIs so that the Prime UI can be released as open source and be fully functional – Allows states to take the base UI, modify it to suit their needs, and deploy it in their environment – Once completed, this ensures that it is possible to create new applications to view, create, or modify any of the data the user can within the UI – The APIs will have all the federal data validations built in, and optionally additional state validations U. S. Environmental Protection Agency

Initial REST API and Application • In April, EPA began its first APIs with

Initial REST API and Application • In April, EPA began its first APIs with a microbial sample upload API – This involved getting a basic authentication set up and some initial data validation • Andrew Yuen and Michelle Ibarra of EPA’s Office of Environmental Information built a webpage to upload a total coliform negative sample to demonstrate the API U. S. Environmental Protection Agency

What’s to come • EPA will work with the IAWG to test the microbial

What’s to come • EPA will work with the IAWG to test the microbial samples API (and the additional APIs which were necessary to support it) • Through the fall, EPA will lay the groundwork necessary for the APIs, such as full authorization control • After the January release, EPA will ramp up on building additional APIs, beginning with samples U. S. Environmental Protection Agency

Contact Elinor Keith Office of Water, Project Management Office Keith. Elinor@epa. gov (202) 564

Contact Elinor Keith Office of Water, Project Management Office Keith. Elinor@epa. gov (202) 564 -7784 U. S. Environmental Protection Agency