Returning null value while calling GET restAPI through groovy
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
20DCode 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)
Tagged:
0