Launch Logstash Pipeline through API

I would like to find a way to launch a Logstash pipeline through the API. The use case is that an application is going to write directly to Elasticsearch, and when it is done we want Logstash to kick-off and do it's thing.

Any way for Logstash to see new documents in an index or to have Logstash start a pipeline based on an API call when the original injection is complete?

Thoughts?