Partial Updates to Metadata for GTM and LTM
I'd like to add metadata to WIPs without overwriting any existing data (or, if the same metadata exists, to update that).
I connect to iControl REST with HTTP "PATCH" method and a JSON payload, and that works well enough, but the payload totally overwrites whatever already existed. Looking in the LTM audit log, I see:
Jul 24 13:12:55 <snip/> notice icrd_child[17595]: 01420002:5: AUDIT - pid=17595 user=myUser folder=/Common module=(tmos)# status=[Command OK] cmd_data=modify ltm virtual /Common/myPool-443 { metadata replace-all-with { dummyMetadata { persist false value IgnoreMe } } }
Is there an alternative to replace-all-with? If so, is there a different method or request I should use?
I presume you have a number of meta-data names and associated values inside the metadata property as shown in an example below and you want to replace/delete/modify just one of them. Unfortunately, you can perform only replace-all-with. If you need to partially replace, you need to first get the array (as shown in the square bracket), manipulate it, and send it back.
"metadata": [ { "name": "satMeta", "persist": "true", "value": "Sat" }, { "name": "toyoMeta", "persist": "false", "value": "Toyo" } ],
This limitation is also discussed in ltm internal datagroup (can't modify a subset of records and need to replace-all).