API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Analytics

    Posted Tue November 05, 2024 09:01 AM

    Hi Team

    I want to add custom field on analytics

    like status code 

    How can I add custom field on it. please help me out about it.



    ------------------------------
    Shah Wajahat
    ------------------------------


  • 2.  RE: Analytics

    Posted Wed November 06, 2024 01:21 AM

    Hiya

    it might help if you explained your scenario?

    Status code already is a field so I assume you don't want to add that again?

    Do you want to customise the data stored or just change what columns are shown in the Discover table?

    It is not possible to customise the api event record - our database is an internal component and no direct access is permitted. That means the field template is locked. You can however add additional data to the custom_data array as documented here: https://www.ibm.com/docs/en/api-connect/10.0.8?topic=data-customizing-gateway-script-set-variable-operation

    You can then query for that data via the UI and API.

    If you just wanted to customise the columns shown on the Discover view then you can do that from the New Filter accordion, you can select what fields you want displayed as columns.



    ------------------------------
    Chris Dudley
    ------------------------------



  • 3.  RE: Analytics

    Posted Wed November 06, 2024 04:53 AM

    Hi chris

    I added the customized value is added but didn't show on filter. but show in discover shown in screenshot



    ------------------------------
    Shah Wajahat
    ------------------------------



  • 4.  RE: Analytics
    Best Answer

    Posted Wed November 06, 2024 05:44 AM

    As i said above, you can add custom data to the custom_data array. There is no support for randomly adding custom fields to the root of the event object itself.

    Thats why the documentation specifically guides you to adding custom data to custom_data.

    Adding custom data to the root of the event object will mean they pick up a dynamic field type - e.g. your bank_id there is being stored as a string, but depending on what the first value is received it might be stored as an number and then any string values would be rejected in the future. This is a really bad idea and you have no control over it as we do not allow custom field templating. Please keep any custom data to the custom_data array. You can then query for them from the UI and API.



    ------------------------------
    Chris Dudley
    ------------------------------



  • 5.  RE: Analytics

    Posted Wed November 06, 2024 06:36 AM

    Hi Chis

    Thanks for you quick response i understood it.

    i want to know about it

    If you just wanted to customize the columns shown on the Discover view then you can do that from the New Filter accordion, you can select what fields you want displayed as columns.

    Yes i want to do that their is any documentation for it ?



    ------------------------------
    Shah Wajahat
    ------------------------------



  • 6.  RE: Analytics

    Posted Wed November 06, 2024 06:40 AM

    No docs needed.

    just click the Filter accordion and there's a button to manage the Discover columns, you can then select which ones you want.

    Note this allows you to select from standard fields, it will not allow you to add any custom ones (because we don't support them!)



    ------------------------------
    Chris Dudley
    ------------------------------



  • 7.  RE: Analytics

    Posted Wed November 06, 2024 07:00 AM

    Hi chris

    There is no option to show customize column



    ------------------------------
    Shah Wajahat
    ------------------------------



  • 8.  RE: Analytics

    Posted Wed November 06, 2024 08:43 AM

    What APIC version are you using?

    Its certainly there in APIC 10.0.8.



    ------------------------------
    Chris Dudley
    ------------------------------