added ability to define api endpoints with streams or static pipelines

@jeffwad for you!