How can I extract JSON objects from calloutResponse.content by using EV policy?

I use service callout to call API for get data and this example of data.

suchansinee_0-1680872766877.png

 

suchansinee_1-1680872866666.png

after that, I use EV policy to extract calloutResponse.content.ApiKey keeps in data1 variable.

suchansinee_7-1680873464916.png

 

after that, I set the data1 variable in the header.

suchansinee_3-1680872967267.png

I debug calloutResponse.content but It doesn't have any data.

data1 variable doesn't have value.

How can I extract JSON objects from calloutResponse.content by using EV policy?

Thank you. 

@dknezic 

suchansinee_4-1680873168945.png

suchansinee_6-1680873209895.png

 

 

 

 

0 1 117
1 REPLY 1

Please checkout this sample and the ParseJsonResponse policy
https://github.com/apigee/api-platform-samples/tree/master/learn-edge/service-callout-1
https://github.com/apigee/api-platform-samples/blob/master/learn-edge/service-callout-1/apiproxy/pol...

Since you are indicating the response from ServiceCallout is blank, I would make the callout endpoint request from Postman/curl to confirm there is no issue with the endpoint irrespective of the calling source. 

Thanks



Thanks