Unusual API behaviour for managing large Shared Record Groups

Nicola
edited June 6 in Automation

Greetings,

some time ago I wrote a script to help move several zones from their respective Shared Record Groups to another. This was accomplished by means of an API PUT by specyfing the "zone_associations" field of the Shared Record Groups that I needed to edit.

For example, for a Shared Record Group containing the zones “zone_1” and “zone_2”, if I wanted to add “zone_3” I did a PUT by specyfing the following JSON as payload:

{"zone_associations":[“zona_1”, “zona_2”, “zona_3”]}

This has worked for several months, and as I moved zones between Shared Record Groups, one group in particular has reached a remarkable size (~400 zones). I noticed that now, this particular groups can't be edited via API PUT (neither deleting or adding zones) as I always receive the following error: {'Error': 'AdmConDataError: expected single object, got 2', 'code': 'Client.Ibap.Data', 'text': 'expected single object, got 2'}.

Right now the same python script keeps working for the others Shared Record Groups, so I suspect that the size of the "zone_associations" field has something to do with it. My Infoblox has the following NIOS version: 9.0.3-50212-ee11d5834df9

Thanks in advance for any help or insights.

Best regards

Tagged:

Best Answer

  • Nicola
    Answer ✓

    I've found the cause of the problem. The API call to edit Shared Record Groups' members (that is the zones) does not take into account the fact that a zone might be defined in multiple "views", and thus returns the above mentioned error. In my case I had a zone defined as authoritative in a view, and the same zone defined as forward in another view.

    I haven't found any workaround for this, so I removed this "duplicate" zone from the Shared Record Group and made it independent so that the Python can perform its API calls without issues.