Challenges in Managing Dictionaries and Dynamic Properties on Celigo APIM Portal
We are facing the following issues on the Celigo APIM Portal:
Issue 1: In the Celigo UI, we can see the Dictionary section, but there is no option to create a dictionary (see the screenshot).
Issue 2: In the API Properties section, we have created a dynamic property. However, when the remote resource returns a response, we applied a Jolt transformation to extract data from the response, but we can't find any option to store this data. After some research, we found information in the APIM documentation stating that the Jolt-transformed data is stored in the global API properties.
How can we access this data returned from the remote resource throughout the API using EL?
Clarification: We have not thoroughly understood this section. Could you please provide brief information regarding the actual purpose of dynamic properties?
Comments
Hi Shabnam, thanks for your questions.
Issue 1: Due to the recently added help icon, the "+" icon got hidden which we're already fixing and will be available soon.
Issue 2: Can you please share screenshot of what you have tried? Unlike static properties, the dynamic properties are meant to dynamically invoke an endpoint to get a property and then inject it into the EL context. Can you also share the use case, so that we can also suggest an alternate way to achieve it?
Thanks,
Kaustav
Hi Kaustav Roy,
Thanks for your response.
Regarding Issue 1, please keep us updated once this issue is resolved.
For Issue 2, in my use case, we are fetching Zoho contacts, and we need to send the refresh access token as authorization. To achieve this, we have implemented dynamic properties (see the details below):
Scheduler:
*/58 * * * *
(This cron expression will run the job every 58 minutes.)Method: POST
URL:
https://accounts.zoho.in/oauth/v2/token?refresh_token=1000.5d.....
Header:
Content-type: application/json
JOLT Transformation:
[
{
"operation": "shift",
"spec": {
"access_token": "access_token"
}
}
]
The remote URL is sending the following response, from which we are extracting the
access_token
using JOLT transformation:{
"access_token": "1000.7a5746d......",
"scope": "ZohoCRM.modules.ALL ZohoCRM.settings.ALL",
"api_domain": "https://www.zohoapis.in",
"token_type": "Bearer",
"expires_in": 3600
}
Please refer to the screenshot below for your reference.
Additionally, what EL expression should be used to access the
access_token
in the Transform Headers policy?Hi Shabnam,
Thanks for sharing the details.
Regarding Issue 1, you should be able to see the "+" button now in the Dictionaries page.
Regarding Issue 2, for dynamic properties to work, the JSON should be in the key and value format, like below.
If the HTTP service doesn’t return the expected output, you will need to transform the JSON using JOLT. Can you try using this JOLT?
Then you can use the EL: {#properties["access_token"]} in the Transform Headers policy to extract the access token. If you're using V4, you can use {#api.properties["access_token"]}. Please let us know if this works.
Thanks
Hi Kaustav Roy,
We attempted to use the Jolt transformation you provided, but the
access_token
is not accessible when we use{#properties["access_token"]}
in V2 or{#api.properties["access_token"]}
in V4 APIs.We also tested dynamic properties using a different API URL (details provided below) but are still facing the same issue.
Scheduler:
0 */5 * * * *
(Every 5 minutes)Method: GET
URL: https://jsonplaceholder.typicode.com/posts/1
Jolt Transformation:
The remote URL is sending the following response, from which we are extracting the
title
using the Jolt transformation:To access the
title
, we are using the{#properties['title']}
EL expression. Please provide a solution for this issue.Regarding dictionaries, we created a dictionary and tried accessing it in the policies using
{#dictionaries['dictionary_name']['key']}
EL, but we are still encountering the same issue. Kindly provide a solution for this as well.Hi Shabnam,
The output of the JOLT should be in the below format (i.e. array of objects):
For example, using the JOLT I used below, the output is that expected format.
If you configure the other fields properly in the dynamic properties page, you should see the key and value populated like below (in your case, if you use the JOLT like I mentioned, the key name would be "root").
Once you see this (which gets updated on a schedule you've configured), you can use the EL: {#properties['root']} in any of the policies in Policy studio.
Thanks Kaustav Roy,
We are now able to access dynamic properties. Could you please advise how we can encrypt the value of dynamic properties in the same way we do with static properties?
Hi Shabnam, thanks for confirming that the dynamic properties is working for you. There is no way to encrypt the value of dynamic property as of today. Since it changes dynamically and the APIM console is only allowed for internal use, it will be secure.
Thanks Kaustav Roy, this is understood.
Please sign in to leave a comment.