Web interface for foreman operations

I advice in advance that my knowledge in ruby language and Foreman are
limited, but I'm willing to study it.

My task is to create a web interface where the common user insert some
specific parameters, this must be parsed in

order to pass it to foreman application. My questions are:

-There is any tutorial that realize this task or similar function?
-How can I connect the ruby script(in order to use Foreman API) in a web
page?
-If I decide to progam my page in html+javascript+JSP (or PHP) is possible
to use Forema API. If yes, how is it

possible? There is any explanation to do this?

Sorry for my bad english and my ignorance. Thanks in advice.