Forum Discussion

misch42's avatar
misch42
Icon for Nimbostratus rankNimbostratus
Dec 14, 2022

Update an internal Data Group via API?

Hi,

I want to update a Data Group via an IP call. I can list the contents of the group with:

curl -sk -u "user:pass" -H "Content-Type: application/json" -X GET https://192.2.0.1/mgmt/tm/ltm/data-group/internal/myDataGroup | jq

The command

curl -sk -u "user:pass" -H "Content-Type: application/json" -X PATCH -d '{"records": [ {"name": "1.2.3.4" }]}' https://192.2.0.1/mgmt/tm/ltm/data-group/internal/myDataGroup |jq

will replace (!) the contents of the data group.

How can I add an entry to the data group?

The same command but with POST instead of PATCH, results in a

{
"code": 400,
"message": "one or more configuration identifiers must be provided",
"errorStack": [],
"apiError": 26214401
}

 

Any ideas how to deal?

 

Michael