Hi Sourabh,
target-url is just a variable in context, and specifically it is most probably an api property. In GatewayScript you could use context.get('target-url') for example. The invoke is using the value of target-url at that point in time. If indeed in an api property that shouldn't change, but you could create your own context variables which could change values at any time and then reference them in your invoke target-url, so it that is the case, you would need to save that variable into another variable before you change the value.
Best Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------
Original Message:
Sent: Thu July 06, 2023 06:22 PM
From: sourabh singhal
Subject: Analytics not showing target URL
Hi Chris,
Thanks for replying.
Could you please also help me about :
Also can how can we read target-url from invoke assembly? Is it possible to read any I build assembly parameters?
------------------------------
sourabh singhal
Original Message:
Sent: Thu July 06, 2023 03:29 AM
From: Chris Dudley
Subject: Analytics not showing target URL
Hiya,
The docs here should explain how to add additional data to the analytics log record: https://www.ibm.com/docs/en/api-connect/10.0.5.x_lts?topic=analytics-modifying-api-event-data
Note that you will want to add the extra data to the custom_data array, that way you will be able to query it from the analytics API and UI. If you just add it to the route of the log record as you are doing then it likely will not be stored in analytics in the first place, but it definitely will not be queryable via the API/UI. This is precisely what the custom_data array is for.
Hope that helps!
Chris
------------------------------
Chris Dudley
Original Message:
Sent: Wed July 05, 2023 12:24 PM
From: sourabh singhal
Subject: Analytics not showing target URL
Hi All,
We want to see the target-URL in the APIC connect Analytics logs, currently we are using DPOD to check the target-URL but if we can see them in Analytics server it will save our time.
I have gone though IBM documentations to create a custom flag here is the example of that, but do we have any simpler solution to check the target_URL, without tweaking the code.
Custom Code:
- log:
version: 2.1.0
title: log
log-level: default
mode: gather-only
- gatewayscript:
version: 2.0.0
title: gatewayscript
source: "var logs = context.get('log');\r\n if (logs) {\r\n if (!logs.target_url) { \r\n logs.target_url = {};\r\n }\r\n logs.target_url = '$(targeturl)';\r\n \r\n context.set('log', logs);\r\n }"
Also can how can we read target-url from invoke assembly? Is it possible to read invoke assembly attributes, I'm majorly concerned about target-url?

------------------------------
sourabh singhal
------------------------------