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

edited Nov 12, 2020 5:59AM in Fusion Service 3 comments

Content

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.

 

Thanks,

Shaheela

 

Version

20D

Code Snippet

//Webservice Registration for getall (Name: Get_Contract)

https://ekkz-dev1.fa.em2.oraclecloud.com/fscmRestApi/resources/latest/contracts

//Calling the API through groovy

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

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

https://ekkz-dev1.fa.em2.oraclecloud.com/fscmRestApi/resources/latest/contracts/##contractId##

//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.

Register

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