I have good news for all of you developers who want to develop apps that integrate with IBM® Maximo® Asset Management using iOS Swift: the iOS Swift sample app is here! The Maximo REST SDK framework provides a set of driver APIs that can be consumed by an iOS-based application that interfaces with an instance of Maximo Asset Management. The SDK APIs use the Maximo NextGen REST/JSON APIs. Using this API, you can create, update, delete and query Maximo business objects (MBOs) by using Maximo integration framework object structures.
We have been providing Maximo integration samples for various platforms, devices and programming languages. iOS handheld devices including iPhone and iPad are very popular among Maximo users, and our integration samples are not complete without a sample for iOS. The sample here outlines the common integration pattern of login, query, modify and delete MBOs for work orders. This pattern can be extended to other MBOs and complex workflows.
Four components included in the SDK framework
Currently, the supported data format is JSON, and there are two types available: the lean and the namespaced. Since the release of Maximo Asset Management V7.6, the lean format is the recommended format because it consumes fewer network resources. The following four components are included in the SDK framework.
- [MaximoConnector]: The driver API that establishes the authenticated HTTP session with the Maximo server. It is used by the other APIs to create, update, delete and query Maximo data. The authentication and the other basic information can be configured by using an [Options] object.
- [ResourceSet]: This API represents a collection of Maximo resources of a given type. The type is determined by the object structure definition it refers to. This API is equivalent to the concept of the MboSet in Maximo Asset Management.
- [Resource]: Each member of a ResourceSet is represented by an instance of this class. This is equivalent to the concept of an MBO.
- [Attachment and AttachmentSet]: These APIs represent the attached documents, doclinks, in Maximo Asset Management. They are always associated with a resource object.
Write iOS Swift solutions using the sample app
We created the iOS Swift sample because we heard from developers like you who wanted to benefit from writing native-iOS solutions using common steps you’ve used before. Prerequisites include Apple Xcode, CocoaPods and Maximo Asset Management V7.6.
The Maximo resources represent a graph of MBOs that provide an atomic view/object to create, update, delete and query the related set of MBOs. The sample app provides several examples that includes some of the most-used MBOs to demonstrate how to use the Maximo REST SDK.
- Query work orders from a ResourceSet (MXWODETAIL): Get instructions for how to query a work order from Maximo Asset Management by using the Maximo REST SDK framework.
- Create a new work order (MXWODETAIL): See how to create a new work order record by using the Maximo REST SDK.
- Update a purchase order (MXPO): See an example of using the PO resource (MXPO) to illustrate which method you might use for each scenario.
- Delete a service request (MXSR): Learn how to delete an existing service request by using the Maximo REST SDK.
- Attachments: View examples showing how to add and delete an attachment from a work order.
- Saved query: See how you can use the savedQuery() API method to select records based on defined filter criteria.
- Terms search: See an example where the “description” field is marked as a searchable attribute for the OSLCMXSR object structure so you can use the hasTerms() API method to define the search terms.
- Action: View an example that illustrates the use of the changeStatus action for the MXWODETAIL object structure.
Review the iOS Swift sample app for details.
Non-iOS Swift options
See the IBM Maximo Developer Center for more samples on how to integrate with Maximo Asset Management, such as using Android, Polymer and Node.js.
- View the Maximo Swift REST client readme.
- Read additional Maximo REST SDK documentation.
- Bookmark the IBM Maximo Developer Center.
Give us your Feedback
Let us know your opinion of this sample by completing this short (3 minute) survey—iOS Swift sample feedback.
IBM Maximo Developer Center
For more samples and content about integrating with Maximo Asset Management, see the IBM Maximo Developer Center.
Hari Narasimhamurthy is a Senior IT Architect and Offering Manager for IBM Watson Internet of Things. He has been an IBM Certified IT Architect for Maximo Asset Management solutions for more than 10 years. He is also an IBM Certified Consultant and The Open Group Certified Master IT Architect.