Forum Discussion

S__233_bastien2's avatar
Icon for Nimbostratus rankNimbostratus
Jul 06, 2017

Update/modify an iApp instance with iControlREST

Hi, I've build an iApp, and I would like to create/update services using iControl REST.


Creation is working fine:


↪ curl -sk -u admin:password -H "Content-Type: application/json" -X POST --data @iapp.json https://172.31.X.X/mgmt/tm/sys/application/service/ | jq .
  "kind": "tm:sys:application:service:servicestate",
  "name": "test",
  "partition": "Common",
  "subPath": "",
  "fullPath": "/Common/",
  "generation": 1120,
  "selfLink": "https://localhost/mgmt/tm/sys/application/service/",
  "deviceGroup": "none",
  "inheritedDevicegroup": "false",
  "inheritedTrafficGroup": "false",
  "strictUpdates": "enabled",
  "template": "/Common/mytemplate",
  "templateReference": {
    "link": "https://localhost/mgmt/tm/sys/application/template/~Common~mytemplate?ver=13.0.0"
  "templateModified": "no",
  "trafficGroup": "none",
  "tables": [
      "name": "hosts__ip_host",
      "columnNames": [
      "rows": [ ..... ]
  "variables": [
      "name": "vip__vip",
      "encrypted": "no",
      "value": ""

Update is not easy :
`↪ curl -sk -u admin:password -H "Content-Type: application/json" -X POST --data @iapp.json https://172.31.X.X/mgmt/tm/sys/application/service/
{"code":400,"message":"01020066:3: The requested application instance (/Common/ already exists in partition Common.","errorStack":[],"apiError":3}

↪ curl -sk -u admin:password -H "Content-Type: application/json" -X PUT --data @iapp.json https://172.31.X.X/mgmt/tm/sys/application/service/
{"code":403,"message":"Operation is not supported on component /sys/application/service.","errorStack":[],"apiError":1}

Do you see where I'm wrong ?


Do you know how to use the "Reconfigure" action that I use to have in WebUI?


Thank you in advance,


Best regards,


- Sébastien B.


1 Reply

  • Use the

    method to modify the field(s).

    Check the

    field in the output you got when you created the iApp. That's where the endpoint (URL) is. In your case, that's

    "selfLink": "https://localhost/mgmt/tm/sys/application/service/",

    For example,

    Create an iApp (TestApp):

     curl -sku admin: https:///mgmt/tm/sys/application/service \
      -H "Content-Type: application/json" \
      -X POST -d@iAppMakeDel.dat

    The output says:


    Get the iApp (equivalent to

    tmsh list sys application service

     curl -sku admin: \

    Modify the Description field:

     curl -D - -sku admin: \ 
      https:///mgmt/tm/sys/application/service/ \
      -X PATCH -H "Content-Type: application/json" \
      -d '{"description":"Hello World"}'