Forum Discussion

Steph's avatar
Icon for Nimbostratus rankNimbostratus
Oct 04, 2021

ASM Rest API Policy Merge - itemFilter not working

Dear All,


I am trying to merge ASM policies through rest API.

It works partially. I try to exclude Hostname & Redirection from being merged, but this seems to be ignored.


Here the settings I use:


eltPOSTMergeDiff    = "https://{}/mgmt/tm/asm/tasks/policy-merge".format(host)

eltPOSTMergeDiffArgs = \


       "policyDiffReference": {"link": "https://{}/mgmt/tm/asm/policy-diffs/{}".format(host, DiffResultID)},

       "addMissingEntitiesToFirst": "true",

       "addMissingEntitiesToSecond": "false",

       "handleCommonEntities": "accept-from-second",

       "handleMissingEntitiesEnum": ["ignore", "accept-from-first", "accept-from-second"],

       "itemFilter": "entityKind ne 'tm:asm:policies:redirection-protection:redirection-protectionstate' or entityKind ne 'tm:asm:policies:host-names:host-namestate'"




The (limited) documentation mentions that itemFilter should work as $filter.


When, in a browser, I'm using the $filter with above content (of itemFilter) it works as expected


Any provided idea would be more than welcome



No RepliesBe the first to reply