Hi Viduranga,

You can achieve this by adding a new method in a file in the store/modules
directory to get the particular value from the registry path.
Then you can call this function from the
store/site/blocks/api/api-info/block.jag file as follows,

Assuming that your function name is getAuthorization(domain)

jagg.module(<your module name>).getAuthorization(domain);

The assign it as follows,
{
                                        "title": i18n.localize("API
Console"),
                                        "body": [
                                            {
                                                "name": "api/swagger",
                                                "inputs": {
                                                    "api": api,
                                                    "subscriptions":
subscriptions,
                           * "authorization": <value read through the new
function created in the modules directory>*
                                                }
                                            }
                                        ]
                                    }


Then you can simply access this value from the template.jag as
outputs.authorization .

Hope this helps.

Thanks & Regards,
Mushthaq

On Thu, Dec 7, 2017 at 10:48 AM, Viduranga Gunarathne <[email protected]>
wrote:

> Hi,
>
> I'm working on APIM 2.1.0 and I need to read a configuration in the tenant
> registry that is specific to each tenant, from the jaggery layer so that it
> can be displayed in the Store UI.
>
> Any tips on how to do this?
>
> Also, The media type of the "tenant-conf" is json and can that be accessed
> as a json object or is it returned as a resource and we have to convert it
> to a json object at the jaggery level ?
>
> Thanks in advance!
> Viduranga.
> --
> Regards,
>
> *Viduranga Gunarathne*
>
> *Software Engineer Intern*
>
>
> *WSO2*
> Email : [email protected]
> Mobile : +94712437484 <+94%2071%20243%207484>
> Web : http://wso2.com
> [image: https://wso2.com/signature] <https://wso2.com/signature>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Mushthaq Rumy
*Software Engineer*
Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
Email : [email protected]
WSO2, Inc.; http://wso2.com/
lean . enterprise . middleware.

<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to