DX NetOps

 View Only
Expand all | Collapse all

Where to get an action_code list to use with REST API?

  • 1.  Where to get an action_code list to use with REST API?

    Posted Sep 04, 2015 10:21 AM

    We need to create SNMP models and add them to previously created Global Collections using REST. We tried using the parentmh attribute, but it us only useful to add these created models to containers. We haven't found the way to add the models to Global Collections, and we also tried using the CollectionsModelNameString's attribute when POSTing the model creation, but as it is not a writeable attribute, we got an error.

     

    So, we think the model should be created first using POST, and then a GET tunneling action to add that model to the Global Collection. But we don't know what are the actions available.



  • 2.  Re: Where to get an action_code list to use with REST API?
    Best Answer

    Broadcom Employee
    Posted Sep 07, 2015 07:15 PM

    You can use "POST associations" to add a model into a Global Collection (refer associations - CA Spectrum - 10.0 - CA Technologies Documentation).

     

    The URL is:

     

       http://<hostname><:portnumber>/spectrum/restful/associations/relation/<rel_handle>/leftmodel/<LMhandle>/rightmodel/<RMhandle>

     

    In this case the relation/association is staticGlobalCollects (relation id/handle is 0x1003b).

    I have used Model Type Editor tool to identify the relation id/handle.



  • 3.  Re: Where to get an action_code list to use with REST API?

    Posted Sep 10, 2015 10:39 AM

    Thank you very much!