DX NetOps

  • 1.  How add Global Collection Search Criteria by Rest API

    Posted Aug 09, 2018 01:11 PM
    Hi everyone,  We added a Global Collection through the Rest API with no problem, however we do not know 
    how to add a Search Criteria in the same URL. Does the Search Criteria have to be in a
    different URL or can it be in the same URL as the creation of the Global Collection?

    What is the structure of the URL to add the Search Criteria through the Rest API?
    URL of the Global Collection:

    http://10.180.199.12:8080/spectrum/restful/model?landscapeid=0x100000&mtypeid=0x10474&attr=0x1006e&val=GC01

     

     

     

     



  • 2.  Re: How add Global Collection Search Criteria by Rest API

    Posted Aug 28, 2018 07:47 AM

    From what I remember there is an attribute that contains the XML used to filter. There is also a unique ID attribute. You need to create the Unique ID.

     

    When you add the XML for the global collection you need to 'escape' the XML code so it works within the XML used to perform the XML post. I know python has some modules to do this. I'll try to find out what I did and post later this week but this was the most frustrating part (took me a while to figure this part out!!!)

     

    Also I'm sure you have already worked this out but you need to create the GC on each landscape in a domain if you have more than one server!).

     

    See:

    REST API Global Collection creation issues 

    How to create a model within a static global collection via REST API? 

     

    Regards,

    Frank