Forum Discussion
Fred_Slater_856
Oct 14, 2015Historic F5 Account
The published library of iApps were designed before the REST API, and were not originally intended for this type of use, but it can be done. You're example almost works. I'm not sure that the extra escaped quotes are necessary. The following POST works for me on version 12.0:
{
"name": "test2",
"partition": "Common",
"template": "f5.http",
"tables": [
{
"name": "basic__snatpool_members"
},
{
"name": "net__snatpool_members"
},
{
"name": "optimizations__hosts"
},
{
"name": "pool__hosts",
"columnNames": [
"name"
],
"rows": [
{
"row": [
"www.me.com"
]
}
]
},
{
"name": "pool__members",
"columnNames": [
"addr",
"port",
"connection_limit"
],
"rows": [
{
"row": [
"9.3.6.9",
"80",
"0"
]
},
{
"row": [
"9.6.3.9",
"80",
"0"
]
}
]
},
{
"name": "server_pools__servers"
}
],
"variables": [
{
"name": "asm__use_asm",
"encrypted": "no",
"value": "/do_not_use"
},
{
"name": "client__http_compression",
"encrypted": "no",
"value": "/create_new"
},
{
"name": "client__use_wa",
"encrypted": "no",
"value": "yes"
},
{
"name": "monitor__monitor",
"encrypted": "no",
"value": "/create_new"
},
{
"name": "monitor__response",
"encrypted": "no",
"value": "Server Up"
},
{
"name": "monitor__uri",
"encrypted": "no",
"value": "/bigip.html"
},
{
"name": "net__client_mode",
"encrypted": "no",
"value": "wan"
},
{
"name": "net__server_mode",
"encrypted": "no",
"value": "lan"
},
{
"name": "pool__addr",
"encrypted": "no",
"value": "1.8.2.9"
},
{
"name": "pool__pool_to_use",
"encrypted": "no",
"value": "/create_new"
},
{
"name": "pool__port",
"encrypted": "no",
"value": "80"
},
{
"name": "ssl__mode",
"encrypted": "no",
"value": "no_ssl"
},
{
"name": "ssl_encryption_questions__advanced",
"encrypted": "no",
"value": "no"
},
{
"name": "ssl_encryption_questions__help",
"encrypted": "no",
"value": "hide"
}
]
}
- anoop1Oct 15, 2015NimbostratusThanks a lot for the help , extra escaped quotes was the problem i got it working , i can see the vip is created on the Device but i still see the the REST Response Status Code: 404 Not Found Cache-Control: no-cache Connection: Keep-Alive Content-Length: 1498 Content-Type: application/json; charset=UTF-8 Date: 15 Oct 2015 04:54:51 UTC Keep-Alive: timeout=4, max=99 Server: com.f5.rest.common.RestRequestSender Set-Cookie: BIGIPAuthCookie=00B046DBA0E566B064E84C00EDCC1F0FB7FF90EA; path=/; Secure; HttpOnly BIGIPAuthUsernameCookie=appviewx; path=/; Secure; HttpOnly X-Frame-Options: SAMEORIGIN "code": 404, "message": "Status code:404, uri:http://localhost:8110/tm/sys/application/service/, body: {\"errorResponse\":\"{\\\"error\\\":{\\\"code\\\":404,\\\"message\\\":\\\"The configuration was updated successfully but could not be retrieved. The error is \\\\\\\"01020036:3: The requested application (/Common/test2) was not found.\\\\\\\"\\\"}}\",\"errorStack\":[]}"