Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
Returning null value while calling GET restAPI through groovy — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Returning null value while calling GET restAPI through groovy

Accepted answer
edited Nov 12, 2020 5:59AM in B2B Service 3 comments


Hi Team,

I want to consume a rest API (GET method) through groovy script. For that I have registered the below API in webservices section and invoking through groovy script.

I have just print the response but it is returning null value. Not only this particular rest API, I have tried with custom object APIs and other Standard object APIs too. Also I have tried with getting exactly one record but that also not working.

Please let me know if anybody knows the issue.







Code Snippet

//Webservice Registration for getall (Name: Get_Contract)

//Calling the API through groovy

def Conn = adf.webServices.Get_Contract.GET()

println("Conn : " + Conn)
//Webservice Registration for gt one record(Name: Get_Contract)

//Calling the API through groovy

def contractId = 303938383

def Conn = adf.webServices.Get_Contract.GET(contractId )

println("Conn : " + Conn)

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!