09-Apr-2018 00:17
I am trying to call my F5 Big IP REST API to update some VIP configurations, for example I want to update the VIP description using this command:
curl -s -k --tlsv1.2 -u admin:password -H "Content-Type: application/json" -X PUT {"description":"THIS IS JUST A TEST"}
I am getting this error:
{"code":400,"message":"0107028c:3: The source (::%10) and destination (10.62.185.3%10) addresses for virtual server (/MyPool/MyVIP_887) must be be the same type (IPv4 or IPv6).","errorStack":[],"apiError":3}
My F5 Big IP version: BIG-IP 12.1.3 Build 0.0.378 Final
Am I missing something?
09-Apr-2018
02:07
- last edited on
05-Jun-2023
13:10
by
JimmyPackets
You have to use -d 'data' =
The JSON data to send. Note that you need to quote the entire json blob, and each "name":"value" pairs must be quoted. When you have nested quotes, make sure you escape (\) them.
Refer the cookbook if it helps.
So something like,
curl -sku admin -H "Content-Type: application/json" -X PATCH https:///mgmt/tm/ltm/virtual/ -d '{"description": "Hello World!"}'
28-Sep-2023 02:15
I tried the same thing with PATCH, I want to add IRules, it works but the issue is it overwrites the existing iRules on the virtual server. How can I go about that? Thank you