Related to Logstash

Hello friends
I want to fetch some metrics data from the Vrops(VMware) api that includes following steps -

  1. Make a post request with login credentials to get the authentication token
  2. Use that authentication token with a GET request to get the the metrics data of various VMs

Is this possible to achieve with Logstash, and if yes than how ?