Authenticating an HTTP Connection from Java or Groovy

Disclaimer - total Java Newbie

Trying to Make a connection to an API for a Server Provisioning Framework (Katello - which is Open Source Red Hat Satellite) from a Java Application which will reside in an Apache OFBiz Framework to be used to calculate billing based on system usage etc.

The API requires you to provide credentials. I have toyed around with HTTPBuilder but quite frankly do not have enough experience writing in Java to accomplish this, and have yet to find anything consistent out there in google searches to help me accomplish this.

The Goal is to Make an API call to Foreman and Collect data about an entity and then feed that data into a database in OFBiz that I can use to calculate billing.

OFBiz Stable is currently running on Java 8 OFBiz Trunk is on Java 11

There is also the ability to leverage Groovy Scripts in OFBiz - Perhaps this may be the path of least resistance?

Any help with either of these will be helpful!

I have attempted to use HTTP Builder,

But so far I have been unsuccessful in using this with the need to authenticate.

Information on Katello API Authentication

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.4/html/api_guide/chap-red_hat_satellite-api_guide-authenticating_api_calls

Information on OFbiz

https://ofbiz.apache.org/

Upvotes: 0

Views: 44

Answers (0)

Related Questions