VMware Cloud Community
GeoffreyBaldry
Contributor
Contributor

Plugin example that makes HTTPS (SSL) API calls

Hi! So happy to have found this discussion board!

TL;DR - Is there any (reasonably complete!) sample code or detailed guide out there for making HTTPS API calls from a plugin?

I am trying to make a plugin (vRO 8.2, and model-driven archetype) for a Cloud Storage vendor - just a fun personal project, I'm kind of new to Java, but an OK scripter. 

Access to the cloud storage resources is done by first authenticating (with Auth0) using the typical 'swap a long-lived API refresh key for a short-lived authentication token.'.

I have something that works if the end-point is plain HTTP by using RestTemplate and getForObject(). I have a mock auth0 localhost API server running that I test with.

However, I can't seem to bring together enough info/documentation on how to use the ISslservice (if that's even correct!) required to make calls to an HTTPS endpoint. I have imported the endpoint's certificate through a workflow.

Any assistance would be warmly welcomed - I'm knee deep in PDFs about SolarSystems and Redis plugins! I absolutely love the time I am having investigating plugin development. It seems like people put a lot of love and effort into making vRO.

All the best, Geoff

0 Kudos
0 Replies