-
Notifications
You must be signed in to change notification settings - Fork 13
Use the API
The public-facing API documentation is currently hosted at https://s3.amazonaws.com/useeio-api-go-swagger-staging/index.html
The base API endpoint is at https://api.edap-cluster.com/useeio/api but requires a registered API key to use it.
The API requires no special hardware or software to access and use.
To register for a key, please email the contact person and provide your:
- Name and Affiliation
- The name and a description of your application or intended use
- URLs for the application that will be using the web service (if available)
We will respond with the base URL and a unique API key for use in your application.
The x-api-key
parameter must be set to the key value in the request header
when making a request to the API. Note that adding this parameter and value to the
query string will not work.
Here in an example in Python using the requests library, if your assigned key is 'myuniquekey':
import requests
base_url = 'https://api.edap-cluster.com/useeio/api'
#Now use the endpoint to return a list of available models
headers = {}
headers['x-api-key']='myuniquekey'
models_response = requests.get(base_url+'/models',headers=headers)
models_response.json()
#Returns output like
#[{'id': 'USEEIOv1.1',
# 'name': 'USEEIOv1.1',
# 'location': 'US',
# 'description': 'EPA national life cycle model of goods and services, v1.1.'}]
The example Jupyter notebook provides a full set of queries to all API endpoints and is a recommended place to see examples of use of the API.
There are also free API inspectors that can be useful to make requests of the API and get formatted data back, like the Swagger Inspector.
USEEIO_API is developed and maintained by Office of Research & Development (ORD), Center for Environmental Solutions & Emergency Response (CESER), Land Remediation & Technology Division (LRTD), Environmental Decision Analytics Branch (EDAB), U.S. Environmental Protection Agency, Cincinnati, OH 45268, under Mozilla Public License Version 2.0. See OMB Memorandum M-16-21 Section 4 & Releasing Open Source Code.