IBM Support

RESTing with Maximo

Technical Blog Post


Abstract

RESTing with Maximo

Body

Customers have varying options on how they integrate other applications with their Maximo system.  Some common choices include SOAP-based web services and XML files.  The Integration Framework (i.e. MIF or MEA) provides a new option available, starting in Base Services 7.5.0.1, to customers to access Maximo data in a RESTful manner.

 

REST stands for Representational State Transfer.  REST, as defined by Roy Fielding, is an architectural style of networked systems.

 

As described on xfront.com

Why is it called Representational State Transfer?

The Web is comprised of resources. A resource is any item of interest. For example, the Boeing Aircraft Corp may define a 747 resource. Clients may access that resource with this URL:

http://www.boeing.com/aircraft/747      A representation of the resource is returned (e.g., Boeing747.html).

 

 The representation places the client application in a state. The result of the client traversing a hyperlink in Boeing747.html is another resource is accessed. The new representation places the client application into yet another state. Thus, the client application changes (transfers) state with each resource representation --> Representational State Transfer!

 

Given REST is based on the concept of resources, the Maximo REST api will expose two types of resources, Maximo Business Objects (mbo) and Integration Object Structures (os). For these resources there will be two default representation formats, XML and JSON.

 

Why use REST?  The most common use case is the need to build an application that is Web 2.0 based and leverages JavaScript technologies such as Dojo and jQuery.  This type of application can be built outside of the Maximo framework and leverage the api to access Maximo resources (MBOs and object structures).

 

Another use can be for querying Maximo data, where the api offers a simpler approach as the query parameters can be part of the URL rather than providing an XML payload as part of an HTTP request.  For example, using the integration framework servlet to post a query would require the following XML payload to retrieve asset 123:

  <?xml version="1.0" encoding="UTF-8"?>

       <QueryMXASSET xmlns="http://www.ibm.com/maximo&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;       transLanguage="EN">

   <MXASSETQuery>

    <ASSET>

      <ASSETNUM>123<ASSETNUM>

    </ASSET>

 </MXASSETQuery>

</QueryMXASSET>

 To execute the same query using REST would require this URL:

 

GET …/maxrest/rest/os/mxasset?assetnum=123

 As mentioned earlier, an mbo may be accessed directly without the need to configure an object structure.  The above query for asset 123 using the mxasset object structure could also be done using the asset mbo:

 

GET …/maxrest/rest/mbo/asset?assetnum=123

 Similar to the existing capabilities of the integration framework, the api supports customization such that new resources and representations could added if needed.  Customizing the processing for specific resource types (such as an asset or person) and/or the formatting (XML or JSON) of a resource can also be done. 

 

An implementation can leverage api features around in-session scrolling and client-side caching to improve performance when dealing with large collections of resources. There are a number of query parameters supported as well as a number of configuration options that can be set using System Properties.  All of the api features are described in the Maximo Asset Management Info Center under the ‘Integrating data with external applications’ section.

 

http://publib.boulder.ibm.com/infocenter/tivihelp/v49r1/index.jsp

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11134609