Forum Discussion
Actually I've made some progress... I didn't have the icrd running on my LTM. I can now run the first example you gave to describe my VS.
It's still failing with the below though:
curl -s -k -u admin:ourpassword -H "Content-Type: application/json" -X PUT -d '{"enabled":true}' https://10.241.100.11/mgmt/tm/ltm/virtual/~Common~Bens_Test_VIP
{"code":400,"message":"Status code:400, uri:http://localhost:8110/tm/ltm/virtual/~Common~Bens_Test_VIP, body: {\"errorResponse\":\"{\\\"error\\\":{\\\"code\\\":400,\\\"message\\\":\\\"Found unexpected data at property /ltm/virtual/~Common~Bens_Test_VIP/enabled. The data is true.\\\"}}\",\"errorStack\":[]}","originalRequestBody":"{\"errorResponse\":\"{\\\"error\\\":{\\\"code\\\":400,\\\"message\\\":\\\"Found unexpected data at property /ltm/virtual/~Common~Bens_Test_VIP/enabled. The data is true.\\\"}}\",\"errorStack\":[]}","restOperationId":2290260,"errorStack":["java.net.ProtocolException: Status code:400, uri:http://localhost:8110/tm/ltm/virtual/~Common~Bens_Test_VIP, body: {\"errorResponse\":\"{\\\"error\\\":{\\\"code\\\":400,\\\"message\\\":\\\"Found unexpected data at property /ltm/virtual/~Common~Bens_Test_VIP/enabled. The data is true.\\\"}}\",\"errorStack\":[]}","at com.f5.rest.common.RestRequestSender.finish(RestRequestSender.java:412)","at com.f5.rest.common.RestRequestSender.processNext(RestRequestSender.java:397)","at com.f5.rest.common.RestHelper$2.run(RestHelper.java:1478)","at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)","at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)","at java.lang.Thread.run(Unknown Source)\n"]}
- Feb 19, 2015The syntax looks good. I tested in v11.5.1HF7. Will downgrade. Perhaps the attributes were renamed. To pull full list of attributes please just run: curl -s -k -u admin:admin -H "Content-Type: application/json" -X GET https://localhost/mgmt/tm/ltm/virtual? | sed -r 's/,(\{?")/,\n\1/g'
- Feb 19, 2015Yepp, it was due to syntax change. This one works in v11.4.1: curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT -d '{"disabled":null}' https://localhost/mgmt/tm/ltm/virtual/vs_apitest curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT -d '{"enabled":null}' https://localhost/mgmt/tm/ltm/virtual/vs_apitest
- damian_19221Feb 19, 2015NimbostratusAWESOME! That works,thanks a lot Stephan!!
- Feb 19, 2015Thanks for the feedback! :)