Skip to Content
0
Jun 24 at 04:49 PM

Statistics Collector Policy Error in API Management

141 Views Last edit Jun 24 at 04:52 PM 2 rev

Hello,

I am trying to implement custom dashboard with payload metrics using Sven Huberti blog (https://blogs.sap.com/2016/10/10/sap-api-management-custom-dashboard-payload-metrics/comment-page-1/#comment-578051)but am getting this error while saving the flow. "Please create some custom fields before using them in Statistics Collector Policy" but I have created the policy to extract variable and in debug I am able to see the variable value. Below are the code in the policies

Extract Variable:


<Source>response</Source>
<XMLPayload>
<Namespaces>
http://schemas.microsoft.com/ado/2007/08/dataservices>
</Namespaces>
<Variable name="variantid" type="string">
<XPath>//d:variantid</XPath>
</Variable>
</XMLPayload>
</ExtractVariables>

Statistics Collector:

http://www.sap.com/apimgmt" async="false" continueOnError="false" enabled="true">
<Statistics>
<Statistic name="variantid1" ref="variantid" type="string">No Variant Id</Statistic>
</Statistics>
</StatisticsCollector>

Please advise me if am missing anything. Appreciate the help.

-Senthil