Forum Discussion
Satoshi_Toyosa1
Feb 03, 2017Employee
Just like a setup task on Configuration Utility, you may want to create a profile separately before attaching it to a virtual server. To create a new profile, just POST its name to the
/mgmt/tm/ltm/profile/serviceType
endpoint, where serviceType
is one of the services you see in the Local Traffic > Virtual Servers > Profiles > Services menu: e.g., http. For example, to create HTTP profile named "myProfile", run this.
curl -sku user:password -X POST -H "Content-type: application/json" \
-d '{"name":"myProfile"}' \
https:///mgmt/tm/ltm/profile/http
It inherits all the defaults from the parent http profile: You can modify the setting later. For example, to enable X-Forwarded-For insertion, simply PATCH it as below:
curl -sku user:password -X PATCH -H "Content-type: application/json" \
-d '{"insertXforwardedFor":"enabled"}' \
https:///mgmt/tm/ltm/profile/http/myProfile
Please refer to the Wiki: iControlREST /tm/ltm/profile for the ltm profile endpoints.
There may be version dependencies: The above examples work on 12.1.1.