Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Extract Variable policy is not extracting the desired variable from a response of POST method

Extract Variable policy is not extracting the desired variable from a response of POST method

I have created an apiproxy with no target and on that created apigee endpoint i am sending body data using a rest api "POST" method via apigee rest client. In apigee Preflow response i have added an extract variable policy with some desired variables to be extracted from the response, but the variables are not being extracted.

Below is my Extract variable policy :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExtractVariables async="false" continueOnError="false" enabled="true" name="Extract-Variables-json-payload">
    <DisplayName>Extract Variables-json payload</DisplayName>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
    <JSONPayload>
        <Variable name="data_1">
            <JSONPath>$.matrics..weighted_io_time</JSONPath>
        </Variable>
        <Variable name="data_2">
            <JSONPath>$.matrics..inodes_total</JSONPath>
        </Variable>
    </JSONPayload>
    <Source clearPayload="false">response</Source>
</ExtractVariables>

Please find attached my api proxy

no-target-with-data-rev1-2018-10-02.zip

Note : The data what we are sending via POST method contains the desired variables to be extracted.

Solved Solved
0 12 1,557
1 ACCEPTED SOLUTION

Hi @Siddharth Barahalikar Can you please help me in this.

View solution in original post

12 REPLIES 12