Wackitron_36350
Feb 12, 2019Altocumulus
Create / Modify the Internal Datagroup of type Internal fails using iControl REST cURL call
SID@kalamari:~$ curl -k -u admin:admin -H "Content-Type: application/json" -X POST -d '{"generation": 1, "type": "ip", "records": [{"name": "10.10.10.10/32", "data": ""}]}' https://10.20.30.40/mgmt/tm/ltm/data-group/internal/~Common~TEST_iRule | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 200 100 115 100 85 37 27 0:00:03 0:00:03 --:--:-- 39
{
"code": 400,
"message": "one or more configuration identifiers must be provided",
"errorStack": [],
"apiError": 26214401
}
SID@kalamari:~$ curl -k -u admin:admin -H "Content-Type: application/json" -X PUT -d '{"generation": 1, "type": "ip", "records": [{"name": "10.10.10.10/32", "data": ""}]}' https://10.20.30.40/mgmt/tm/ltm/data-group/internal/~Common~TEST_iRule | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 292 100 207 100 85 88 36 0:00:02 0:00:02 --:--:-- 95
{
"code": 400,
"message": "\"type\" may not be specified in the context of the \"modify\" command. \"type\" may be specified using the following commands: create, edit, list",
"errorStack": [],
"apiError": 26214401
}
Hi F5 Folks,
I am trying to create the Internal Datagroup of type: IP using POST iControl REST call, but I am getting a 400 error back. Seems like I am doing something wrong on the BODY content of the POST call.
I also tried to use the PUT call to modify the existing Datagroup, but that one failed too. Above the Request and Response of the Payload.
Help is much appreciated.
SID