Open bkleeman opened 2 years ago
/pipelines
/pipelines/gas
/pipelines/oil
/pipelines/petroleum_product
/mines/
/mines/coal
/biodiesel
/fuel/biodiesel
if we add another type/underground_storage
/underground_storage/gas
/active_platforms
/active_platforms/oil_gas
/teriminals
/teriminals/petroleum_product
/teriminals/import
/teriminals/export
/teriminals/import_and_export
/refineries
/refineries/petroleum
/power_plants
/power_plants/hydroelectric
/power_plants/coal
/power_plants/natural_gas
/power_plants/nuclear
/power_plants/petroleum
/power_plants/wind
/power_plants/solar
/power_plants/pumped_storage
/power_plants/geothermal
/power_plants/wood
/power_plants/other_fossil_gases
/processing_plants
/processing_plants/gas
/railroads
/strategic_reserves
/strategic_reserves/petroleum
/shale
/shale/gas
/mixed_shale_chalk
/mixed_shale_chalk/gas
/wells
/wells/tx_capcog
There are things about some of these that seem funky, and I would definitely love feedback on what I have here. We will need to go into the db and update primary types to be plural, and we may need to do more from there as well. I anticipate that more work needs to be done before we can start actually creating our endpoints.
/wells/gas
/wells/oil
transmission_and_distribution_lines
? Or just power_lines
? electric_lines
? /wind_capacity
I went through and made updates to all relevant docs in mongodb to pluralize them.
processing_plants
/pipelines
/mines/
/teriminals
/refineries
/power_plants
/railroads
/strategic_reserves
/wells
/biodiesel
/underground_storage
/active_platforms
/shale
/shale/gas
/mixed_shale_chalk
/mixed_shale_chalk/gas
Schedule of API Endpoints
Our API needs a uniform interface for client requests, so we must determine the best way to format our URIs.
Considerations
URL Prefix:
/api/<version_number>/infrastructure
/api/v0.1.0/infrastructure
Should we lead with primary type or secondary type?
/infrastructure/mines/coal
or/infrastructure/coal/mines
?How do we want to handle issues with pluralization?
primary_type
ispipeline
, but we want the path to read/infrastructure/pipelines/gas
Example of a problem with endpoints following the format:
/infrastructure/primary_type/secondary_type
/infrastructure/biodiesel
/infrastructure/fuel/
and have/infrastructure/fuel/biodiesel
?/infrastructure/fuel/wells/gas
? Or should we add acategory
type to cover the infrastructure category?Pseudocode for an endpoint in the /retrieve dir
Please forgive the mixing python/js. Secondary type is null, so
bp = Blueprint('create', name, url_prefix=URL_PREFIX)