DX NetOps

  • 1.  OneClick connection to external API

    Posted Apr 05, 2018 10:10 AM

    Hi, 

     

    Is there a way to create a subview in OneClick which connects to an external REST API someplace, retrieves some data, and shows it in a table within OC subview? 

     

    Cheers,

    Oz



  • 2.  Re: OneClick connection to external API

    Broadcom Employee
    Posted Apr 11, 2018 10:52 PM

    Hi Oz,

     

    This requires some degree of customisation. You can customise the the views for a model under the Information tab as per our docops guide:

     

    Customizing a Model's Information View - CA Spectrum - 10.2 to 10.2.3 - CA Technologies Documentation 

     

    However, to use an external REST API call and then format the returned output into a table, you would need to call a separate script that is launched from within the XML file that defines the view. For example, you could possibly add the <command> tag along with any necessary attributes (represented by {0} ) to be passed as parameters arguments and use it:

     

    <command>PATH_TO_SCRIPT {0}</command>
    <param>


    <attribute>

    ...

    </attribute>


    </param>