Monday 17 May 2021

Invoke End Point from Automation Script | Maximo

 To read from any webservice/rest as a client, just use below code to call any existing endpoint with http handler. 


from java.util import HashMap,Calendar

from com.ibm.json.java import JSONObject

response=service.invokeEndpoint("SURVEY-endpoint name",map,body1)

body = JSONObject.parse(response)

mbo.setValue("description",response[:200])

#mbo.setValue("description",body.get("data")[1].get("email"))

2 comments:

  1. Hi. Can you give an example of what is the value of map and body1 in the parameter for service.invokeEndpoint?

    ReplyDelete
  2. how can i add basic authorization to API call ?

    ReplyDelete