October 22, 2015

Create attachments through MIF

Starting from Maximo it is possible to import an attachment (aka doclink) to an objects through MIF.
In this example I will show how to add a short text file to an asset record.

First of all you have to create an Object Structure with DOCLINKS as a child object of ASSET.

Now you can use HTTP or REST calls to add an attachment to an asset. If you are not familiar with this things I suggest you to take a look at this post.

After server attempts I have managed to find the minumum set of attributes to do the job.

<SyncMYASSET xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ibm.com/maximo">
<ASSET action="AddChange">

Modify the XML above for your case:
  • ASSETNUM and SITE uniquely identify the asset record
  • DOCTYPE is the folder where you want to put your attachment
  • DESCRIPTION is the descriptive name of the file
  • DOCUMENTDATA is the binary content of your file encoded with Base64 algorithm


  1. What would the REST call be to remove the attachment from the Asset?

  2. Hi Bruno,

    Here one more important thing is populate the URLNAME field with file name along with extension.
    For e.g.as below
    < max:URLNAME >Info.docx < / max:URLNAME >

    If we do not populate this field, then file gets created in doclinks path without extension.

    Manoj Sawant

  3. Does mxloader support this Bruno?

  4. Yes MxLoader supports any MIF object structure. I actually tested the described procedure using MxLoader.