Get the list of all products and their custom attributes for a given apikey in the proxy.
I have an app and attached to multiple products. Each product has custom attrbiutes. I have a requirement to get the list of all custom attributes which are related to all products for an app/apikey.
Same response even after Attributes/Attribute path in array. I am just wondering is it because “App” entity type never loads attributes and proxies linked to it?
below my xml->json
Products to JSON
apiCredential
AccessEntity.ChildNodes.Access-App-Info.App.Credentials
Credentials/Credential
Credentials/Credential/ApiProducts/ApiProduct
Credentials/Credential/ApiProducts/ApiProduct/Attributes/Attribute
Ok this might not be possible declaratively through policy, another option would be to create a Proxy, which accepts product name, and then returns the custom attributes, you can call this proxy from javascript and pass productname as param..
var apiProductsList = ;
try {
if (appStatus == “approved”) {
credentials.forEach(function(credential) {
if (credential.ConsumerKey == apikey
&& (credential.ExpiresAt == -1 || credential.ExpiresAt > now)
&& credential.Status == “approved”) {
credential.ApiProducts.ApiProduct.forEach(function(apiProduct){
if (apiProduct.Status == “approved”) {
//Make a call to proxy which returns an products attributes…