kbws.routes.station module#
FastAPI routes for querying FDSN station metadata.
- kbws.routes.station.station_query(request: ~starlette.requests.Request, params: ~typing.Annotated[~kbws.models.station.StationQuery, Query(PydanticUndefined)], session: ~sqlalchemy.orm.session.Session = Depends(dependency=<function get_db>, use_cache=True, scope=None))[source]#
Query station metadata.
Returns StationXML by default, or FDSN station text for network, station, and channel levels. The
cssformat returns Site rows andsqlreturns the generated SQL query.### Example
[/fdsnws/station/1/query?channel=BH?&endtime=2010-03-28&format=text&level=channel&network=TA&starttime=2010-03-25&station=A25A](/fdsnws/station/1/query?channel=BH?&endtime=2010-03-28&format=text&level=channel&network=TA&starttime=2010-03-25&station=A25A)
- kbws.routes.station.station_query_post(request: ~starlette.requests.Request, body: str = Body(PydanticUndefined), session: ~sqlalchemy.orm.session.Session = Depends(dependency=<function get_db>, use_cache=True, scope=None))[source]#
Query station metadata using the FDSN station POST request format.
The body may contain global
key=valueparameters followed by repeatedNET STA LOC CHA STARTTIME ENDTIMEselection rows.### Example
`text format=text level=channel TA A25A -- BH? 2010-03-25T00:00:00 2010-03-28T00:00:00 `