Join / Log in
Learn how to increase the operational efficiency of the assets you manage, and improve overall equipment effectiveness by using IoT data and AI.
Reduce the operational costs of the facilities you manage, and create more engaging occupant experiences through the application of IoT data and AI.
Learn how IoT data and AI are being applied to transform the end-to-end engineering lifecycle.
I would suggest utilizing Maximo end points. Maximo is designed to handle HTTP connections from an integration perspective, and it handles an abstracts a lot of the code portion while still giving you almost complete control of the connection. You don't need any additional libraries to be downloaded, and you know it will continue to be supported by IBM. It also gives you a good place to store information about your integration while allowing the script to override anything that is necessary. For example, we integrate with a monitoring system in two ways (retrieve monitoring IDs and another to schedule downtime for maintenance events). We're able to store the pieces that are constant in the endpoint, and override what we need to change for that particular integration (such as using a POST request instead of a GET request).
Federated MBOs that Diego mentioned is also a good system for certain integrations, especially if you're just retrieving information, but doesn't make sense in all cases. There's overhead in setting up a MBO that isn't necessary if you're just trying to process it in an automation script for example. And if you need to be able to update these MBOs, you have to build your own logic to push updates anyways.I had a response on the old forums that I'm struggling to find. This was written pretty quick, so if there are questions on it please let me know.The first thing you have to do is declare your endpoint in the End Points application. Create a new end point and ensure the handler is HTTP. Provide what you can in the end point configuration (such as URL, HTTP METHOD, headers, etc.). Anything that you need to set in the script, ensure that the Allow Override checkbox is checked. I've shown an example below that we use. If your service uses basic authentication, you can provide the username/password fields and it will handle that, otherwise leave those two fields null.
Regarding: "Create a new end point and ensure the handler is HTTP."
Have you found that HTTPS does not work? If so, do you know why?
All of our end points are HTTPS. There are a couple of areas that could impact people. The most common is WebSphere doesn't trust certificates unless added to the trust store.
Beyond that, certificates greater than 2048 bits weren't allowed without replacing some policy files until relatively recent. I know with WebSphere 9 and Java 1.8 it is no longer required, not sure which earlier versions it was fixed in.The final thing is WebSphere 8.5.5 by default doesn't support TLS 1.2 for outbound connections which is now becoming a requirement. This was changed in WebSphere 9 but is an easy change to make in 8.5.5.Those are the most common things we've seen.
I don't have a sample I can easily give at the moment. We did it with standard HTTP endpoints and a bit of customization to track the access token & refresh it if necessary. IBM does have an OAUTH handler that we haven't tried yet. We have it on our list to look at to see if we can transition to utilizing it to eliminate some of our customizations but haven't gotten around to it.At a high level overview, we setup the API manually in the third party system to get our client id, secret, & refresh token. We configured an endpoint in Maximo that hits the necessary URL to renew the access token. We created a custom object that stored the access token and when it expired (based on data we get from when we renew the access token). If the access token is going to expire within the next minute we go and renew the access token. We don't have to worry about multiple transactions as it's a single process. We then take the access token and put it on the requests as a header to interact with the system.The big thing is just to get comfortable with how to do it in a postman like utility and then it isn't too bad to make Maximo make a similar request.
OAuth 2.0 was significantly easier than OAuth1.0, where we got burned by not being able to use endpoints at all. This was due to the header on an OAuth 1.0 request needing comma separated values while the HTTP handler uses commas to separate different headers. Created this RFE to hopefully help in the future: https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=142699