Maximo Scripting – MMI

This post is an excerpt from the Maximo 76 Scripting Features guide.

Maximo Management Interface provides a set of apis (REST/JSON apis) that helps a system administrator gets some insights on the state of the maximo runtime. The root url for that api is:

GET /maximo/oslc 

And then you can dive deeper into each server (cluster members) using the /oslc/members api.
We provide a bunch of apis that can help you introspect the servers. But of course we do not have all the apis that you will ever need. Fortunately there is a easy way to dynamically add these apis using automation scripts. Below I will provide a sample use case (a real one) that needed us to leverage that feature. Say you need to find out the servers locale as you trying to debug some locale related issue. You can quickly write up a automation script and serve it up as an MMI api using the MMI app – available from the Logging app action in Maximo – Monitor Environment Information. One of the cool aspects of MMI apis being – it gets distributed in every member server and using the MMI api framework – one can invoke these scripted apilets on each server.

The sample script would look like below:

from java.util import Locale 

Lets name it SYSTEMLOCALE. Note the usage of the implict variable “br” that has apis like setProperty(propname,propvalue) and getProperty(propName). The script figures out the system default locale and sets it to the br with a property name of “syslocale”. Now we can add it to the MMI set of apis using the MMI dialog from the logging application.

The MMI framework links this script with URL like below

GET /oslc/members/{member id}/systemlocale 
Maximo Scripting – MMI

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top