Forum Discussion

questions's avatar
questions
Icon for Nimbostratus rankNimbostratus
Mar 28, 2024

Update existing address list via API call?

I'm able to add an address list via a POST to /mgmt/cm/adc-core/working-config/net/ip-address-lists with a header containing the appropriate API token:
Content-Type: application/json
X-F5-Auth-Token: [token]

and JSON body of:

{
    "name"          : "address_list_1",
    "addresses" : [
			{ 
				"address" : "10.13.2.3",
				"description" : "none"
			},
			{ 
				"address" : "10.11.12.13",
				"description" : "none"
			}
		],
    "partition" : "Common",
    "description"   : "this is an address list"
}

This works fine as long as the address list does not already exist. 

For an existing address list, I get:

	"code": 400,
	"message": "Duplicate item. Key already exists: partition : Common, name : address_list_1"

 

However, I would like to be able to update an existing address list. How does one do that?

 

I have tried changing the POST to PATCH:

"code": 400,
"message": "PATCH to collection not supported",

or PUT:

	"code": 400,
	"message": "Collection PUT operations are not supported in collections that support references to items in the same collection"

or DELETE, with the intention of recreating it:

	"code": 400,
	"message": "Collection DELETE operations are not supported in collections that support references to items in the same collection"

I would appreciate any assistance. Being able to manipulate address lists seems like it should be a pretty basic function, but I'm stuck. Thanks!