Hello,
Currently I'm working on adding an application profile to a load balancer on an ESG (Edge Service Gateway). I am using the REST API to add the app profile, below is the REST API operation I am trying to use.
POST https://NSX-Manager-IP-Address/api/4.0/edges/edgeId/loadbalancer/config/applicationprofiles
It is working okay but I can not add a type to the post body. From the documentation there seems to be no field to add the "type" or protocol for the application profile as you can see below,
<applicationProfile>
<name>http_application_profile_2</name>
<insertXForwardedFor>true</insertXForwardedFor>
<sslPassthrough>true</sslPassthrough>
<persistence>
<method>cookie</method>
<cookieName>JSESSIONID</cookieName>
<cookieMode>insert</cookieMode>
</persistence>
</applicationProfile>
Is there any way I can add a type or protocol to the app profile (ie, HTTP, HTTPS, TCP or UDP)?? Is there a field I am missing??
Cheers,
Dean
What is called "type" in the WebUI, is actually called "template" in the API.
Here is an API example for the type TCP below
<applicationProfile>
<applicationProfileId>applicationProfile-3</applicationProfileId>
<name>testAPI</name>
<insertXForwardedFor>false</insertXForwardedFor>
<sslPassthrough>false</sslPassthrough>
<template>TCP</template>
<serverSslEnabled>false</serverSslEnabled>
</applicationProfile>
The simplest way to figure out the API call:
. Create it on the WebUI
. Check out the xml doing a GET "https://{{nsxmanager}}/api/4.0/edges/edge-xx/loadbalancer/config/applicationprofiles"
Dimitri
What is called "type" in the WebUI, is actually called "template" in the API.
Here is an API example for the type TCP below
<applicationProfile>
<applicationProfileId>applicationProfile-3</applicationProfileId>
<name>testAPI</name>
<insertXForwardedFor>false</insertXForwardedFor>
<sslPassthrough>false</sslPassthrough>
<template>TCP</template>
<serverSslEnabled>false</serverSslEnabled>
</applicationProfile>
The simplest way to figure out the API call:
. Create it on the WebUI
. Check out the xml doing a GET "https://{{nsxmanager}}/api/4.0/edges/edge-xx/loadbalancer/config/applicationprofiles"
Dimitri
Hi Dimitri.
Worked perfectly! You are a lifesaver!...I had a feeling it was called something else. I'll do GET operations in future to get proper fields! Thanks for the advice!
Cheers,
Dean