Shouldn’t matter what the API is written in, if all interaction happens over http.
You will probably need to write some javascript ajax calls in a Theme Component, or if appropriate, make http calls in some new Plugin code you write in Ruby using a suitable Ruby gem like Excon or Httparty.