Original Message:
Sent: Wed February 21, 2024 10:22 AM
From: Mehedi Hashir
Subject: get
Clarified by IBM on a PMR we'd opened. There is an issue with the release of APIM in which the syntax as described in the documentation to get catalog specific properties is not working. The documentation is not in error.
Thanks
Mehedi
------------------------------
Mehedi Hashir
Original Message:
Sent: Tue February 20, 2024 09:32 AM
From: Mehedi Hashir
Subject: get
Looks like we are agreed on the documentation being in error. How do we get this info to IBM to update the documentation to be correct ?
Thanks
Mehedi
------------------------------
Mehedi Hashir
Original Message:
Sent: Sun February 18, 2024 11:44 PM
From: pratap vadlapati
Subject: get
Hi,
It works for me, we are using at present in our prod systems.
When ever we publish APIs to specific catalogue , API is available with those catalogue props, which we define in catalogue props in policy section.
Original Message:
Sent: 2/18/2024 6:56:00 PM
From: Mehedi mehedi
Subject: RE: get
Does this work in getting the QA catalog properties for the api, if api published to the DEV catalog and request run in DEV.
Var props = context.get('api.properties');
Var prop1 = props.definedCatalogPropertyName; // like say props.QA.mypropertyname
Var prop2 = props.definedCatalogPropertyName
------------------------------
Mehedi mehedi
Original Message:
Sent: Fri February 16, 2024 11:18 PM
From: pratap vadlapati
Subject: get
Hi,
We can get the props as below as well.
Var props = context.get('api.properties');
Var prop1 = props.definedCatalogPropertyName;
Var prop2 = props.definedCatalogPropertyName
Thx
Original Message:
Sent: 2/16/2024 1:35:00 PM
From: Mehedi mehedi
Subject: get
API Connect context variables
Ibm |
remove preview |
|
API Connect context variables |
List of IBM API Connect context variables that you can reference when defining default parameter values in an assembly operation, or by using the getContext() function when defining a policy. |
View this on Ibm > |
|
|
var mypropertyvalue = $(apim-mycatalog-mypropertyname)
Is this syntax correct to get a catalog variable value as described in the documentation. I tried it in a javascript policy and it returns the much admired "HTTP 500 Internal server" error ?
Thanks
Mehedi
------------------------------
Mehedi mehedi
------------------------------