Search This Blog

Friday, May 26, 2023

MAXIMO: Sample Automation script to access the IBM Maximo REST API

Here is an example of an automation script that can be used to access the IBM Maximo REST API: 

Code snippet

This script will make a GET request to the /api/v1/resources endpoint of the Maximo REST API. 
The request will be authenticated using the API key that is specified in the apiKey variable.

If the request is successful, the response body will be parsed as JSON and the data will be processed. 

If the request is not successful, an error will be handled. 

This is just a simple example of how you can use an automation script to access the IBM Maximo REST API. 

You can use this script as a starting point to create your own scripts that can be used to perform a variety of tasks.

MAXIMO: REST API Inbound Integration Example

The Maximo REST API provides a way to programmatically interact with Maximo data from external applications. 

This can be used for a variety of purposes, such as: Retrieving data from Maximo Updating data in Maximo Creating new records in Maximo Deleting records from Maximo.

In this blog post, I will show an example of how to use the Maximo REST API to import data into Maximo. 

Prerequisites: 
To follow this example, you will need: 
        A Maximo system with the REST API enabled 
        An external application that can make HTTP requests 
        A sample dataset to import into Maximo 

Example: 
     The following example shows how to import a sample dataset into Maximo using the REST API: 


     First, we need to create a new request object. The request object will contain the data that we want  
     to import into Maximo. 

 Code snippet

Next, we need to make a POST request to the Maximo REST API endpoint. 
e.g. The endpoint for importing data is /api/v1/import.
If the request is successful, the response will be a JSON object with the following properties:
   status: The status of the import operation. 
               Possible values are success and error. errors: 
   An array of error objects, if the import operation failed.

Thursday, May 11, 2023

MAXIMO BASICS: Broken Sequence BMXAA8010E - Record Already exists erros

Problem :
    When attempting to add a new Asset into Maximo using the Assets application, the following message  
    is displayed when you click Save Record. 

    BMXAA8010E - An asset with the asset identifier 16,058 already exists. Enter a new asset identifier.

Cause :
    This error can occur after a data load or Migration . 

Resolving The Problem:

  To fix tis error we have two possible solutions: 

     1) Run the script: 
            update maxsequence set maxvalue = ( select max(ASSETID) + 1 from asset)  where                                name = 'ASSETID'; 
 or 2) Run this script: 
            ALTER SEQUENCE assetidseq INCREMENT BY 5000; 
            select assetidseq.nextval from dual; 
            ALTER SEQUENCE assetidseq INCREMENT BY 1; 

Because the example above could have been caused by data load in Maximo, the scripts should help to fix the problem, however Support does not engage on fixing data issues in Maximo environments, so the information above is a reference that should help.