# Modify the configuration of a VPN payload item within a profile Modify Windows VPN policy payload ## Endpoint **PUT** `/api/v1/mdm/profiles/{profile_id}/payloads/windowsvpnpolicy/payloaditems/{payload_id}` ## Request URL ```text https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/windowsvpnpolicy/payloaditems/{payload_id} ``` ## Scope ```text MDMDeviceMgmt.UPDATE ``` ## Header ```text Authorization: d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Request Headers | Parameter | Type | Required | Value | |---|---|---|---| | Content-Type | string | Mandatory | application/json | | Accept | string | Mandatory | application/json | ### Path Parameters | Parameter | Type | Required | Description | |---|---|---|---| | profile_id | string | Mandatory | Unique identifier of the profile. Obtain from the [Create Profile](https://www.manageengine.com/products/desktop-central/help/api/onpremise/mdm-profiles-create-profile.html) or [Get Profiles](https://www.manageengine.com/products/desktop-central/help/api/onpremise/mdm-profiles-get-profile.html) response | | payload_id | string | Mandatory | Unique identifier of the payload item. Obtain from the [Get Payload Item IDs](https://www.manageengine.com/products/desktop-central/help/api/onpremise/windows-get-vpn-payload-windows.html) response | ### Request Body `application/json` | Attribute | Type | Required | Description | |---|---|---|---| | connection_name | string | Mandatory | Connection Name. Default: VPN Configuration | | connection_type | integer | Mandatory | Connection Type. Default: 0 | | l2tp | JSON Object | Optional | L2Tp | | pptp | JSON Object | Optional | Pptp | | customssl | JSON Object | Optional | Customssl | | ikev2 | JSON Object | Optional | Ikev2 | | proxy_type | integer | Optional | Proxy Type. Default: 0 | | proxy_server | string | Optional | Proxy Server | | proxy_server_port | integer | Optional | Proxy Server Port. Default: 0 | | proxy_pac_url | string | Optional | Proxy Pac Url | | vpn_type | integer | Mandatory | Vpn Type. Default: 1 | | allowed_apps | array | Optional | Allowed Apps | | custom_data | array | Optional | Custom Data | ## Sample Request ### Curl ```curl curl --request PUT \ --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/windowsvpnpolicy/payloaditems/{payload_id} \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"connection_name":"VPN Configuration","send_all_nw_traffic":false,"l2tp":{},"connection_type":0,"customssl":{},"sub_config":"L2TP","ipsec":{},"pptp":{},"enable_vpn_on_demand":false,"certificate_uuid":"value"}' ``` ## Sample Request Body ### Modify VPN payload item ```json { "connection_name": "VPN Configuration", "send_all_nw_traffic": false, "l2tp": {}, "connection_type": 0, "customssl": {}, "sub_config": "L2TP", "ipsec": {}, "pptp": {}, "enable_vpn_on_demand": false, "certificate_uuid": "value" } ``` ### Add VPN payload to the profile (IKEv2 with Password) ```json { "connection_name": "VPN Configuration", "connection_type": "8", "ikev2": { "authentication_method": 0, "server_name": "127.0.0.1" }, "allowed_apps": [], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (IKEv2 with Certificate) ```json { "connection_name": "VPN Configuration", "connection_type": "8", "ikev2": { "authentication_method": 2, "server_name": "127.0.0.1", "ca_certificate_id": "1" }, "allowed_apps": [], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (PPTP with Password) ```json { "connection_name": "VPN Configuration", "connection_type": "1", "allowed_apps": [], "pptp": { "server_name": "127.0.0.1", "user_authentication": 0 }, "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (PPTP with Certificate) ```json { "connection_name": "VPN Configuration", "connection_type": "1", "allowed_apps": [], "pptp": { "server_name": "127.0.0.1", "ca_certificate_id": "1", "user_authentication": 2 }, "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (L2TP with Password) ```json { "connection_name": "VPN Configuration", "l2tp": { "server_name": "127.0.0.1", "user_authentication": 0 }, "connection_type": "0", "allowed_apps": [], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (L2TP with Shared Secret) ```json { "connection_name": "VPN Configuration", "l2tp": { "server_name": "127.0.0.1", "user_authentication": 1, "shared_secret": "xxxxx" }, "connection_type": "0", "allowed_apps": [], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (L2TP with Certificate) ```json { "connection_name": "VPN Configuration", "l2tp": { "server_name": "127.0.0.1", "ca_certificate_id": "1", "user_authentication": 2 }, "connection_type": "0", "allowed_apps": [], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (F5 Access) ```json { "connection_name": "VPN Configuration", "connection_type": 6, "customssl": { "server_name": "127.0.0.1", "identifier": "F5Networks.vpn.client_btcnfmkykcjs2", "user_authentication": 0 }, "allowed_apps": [], "custom_data": [ { "custom_value": "true", "custom_key": "single-sign-on-credential" }, { "custom_value": "true", "custom_key": "optimize-for-low-cost-network" } ], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (Pulse Secure) ```json { "connection_name": "VPN Configuration", "connection_type": 6, "customssl": { "server_name": "127.0.0.1", "identifier": "951D7986.PulseSecureVPN_qzpvqh70t9a4p", "user_authentication": 0 }, "allowed_apps": [], "custom_data": [ { "custom_value": "true", "custom_key": "isSingleSignOnCredential" }, { "custom_value": "true", "custom_key": "optimizeForLowCostNetwork" }, { "custom_value": "1", "custom_key": "preferredRealm" }, { "custom_value": "1", "custom_key": "preferredRole" } ], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (SonicWall VPN) ```json { "connection_name": "VPN Configuration", "connection_type": 6, "customssl": { "server_name": "127.0.0.1", "identifier": "SonicWALL.MobileConnect_e5kpm93dbe93j", "user_authentication": 0 }, "allowed_apps": [], "custom_data": [ { "custom_value": "true", "custom_key": "SingleSignOn" }, { "custom_value": "false", "custom_key": "PacketCapture" }, { "custom_value": "false", "custom_key": "WindowsAuthUI" } ], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (CheckPoint) ```json { "connection_name": "VPN Configuration", "connection_type": 6, "customssl": { "server_name": "127.0.0.1", "identifier": "B4D42709.CheckPointVPN_wz4qkf3wxpc74", "user_authentication": 0 }, "allowed_apps": [], "custom_data": [ { "custom_value": "true", "custom_key": "sso" }, { "custom_value": "true", "custom_key": "lowcost" } ], "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (Per-App VPN) ```json { "connection_name": "VPN Configuration", "connection_type": "1", "allowed_apps": [ { "group_display_name": "Alarms and clock", "is_system_app": false, "app_id": "1" } ], "pptp": { "server_name": "127.0.0.1", "user_authentication": 0 }, "vpn_type": 2, "proxy_type": "0" } ``` ### Modify VPN payload to the profile (With Proxy Automatic) ```json { "connection_name": "VPN Configuration", "connection_type": "1", "allowed_apps": [], "pptp": { "server_name": "127.0.0.1", "user_authentication": 0 }, "proxy_pac_url": "127.0.0.1:3128", "vpn_type": 2, "proxy_type": "2" } ``` ### Modify VPN payload to the profile (With Proxy Manual) ```json { "connection_name": "VPN Configuration", "connection_type": "1", "allowed_apps": [], "proxy_server": "127.0.0.1", "pptp": { "server_name": "127.0.0.1", "user_authentication": 0 }, "proxy_server_port": "3128", "vpn_type": 2, "proxy_type": "1" } ``` ## Response Parameters ### HTTP Code 200 Response Body: `application/json` | Attribute | Type | Description | |---|---|---| | payload_id | long | Unique identifier of the payload item | | connection_name | string | Connection Name. Default: VPN Configuration | | connection_type | integer | Connection Type. Default: 0 | | send_all_nw_traffic | boolean | Send All Nw Traffic. Default: false | | enable_vpn_on_demand | boolean | Enable Vpn On Demand. Default: false | | l2tp | JSON Object | L2Tp | | pptp | JSON Object | Pptp | | customssl | JSON Object | Customssl | | ikev2 | JSON Object | Ikev2 | | proxy_type | integer | Proxy Type. Default: 0 | | proxy_server | string | Proxy Server | | proxy_server_port | integer | Proxy Server Port. Default: 0 | | proxy_user_name | string | Proxy User Name | | proxy_pac_url | string | Proxy Pac Url | | vpn_type | integer | Vpn Type. Default: 1 | | provider_type | integer | Provider Type. Default: 1 | | vpnuuid | string | Vpnuuid | | allowed_apps | array | Allowed Apps | | custom_data | array | Custom Data | ### Possible Response Codes | HTTP Code | |---| | 200 | ## Sample Response: HTTP 200 ### VPN payload item successfully modified ```json { "provider_type": "1", "payload_id": "9007199254741295", "connection_type": "6", "proxy_user_name": "", "proxy_server": "127.0.0.1", "allowed_apps": [ { "group_display_name": "Alarms and clock", "is_system_app": false, "app_id": "1" } ], "enable_vpn_on_demand": false, "vpnuuid": "", "proxy_server_port": "3128", "vpn_type": "2", "connection_name": "VPN Configuration", "send_all_nw_traffic": false, "customssl": { "certificate_id": "-1", "identifier": "951D7986.PulseSecureVPN_qzpvqh70t9a4p", "server_name": "127.0.0.1", "user_authentication": "0", "provider_identifier": "", "account": "" }, "proxy_pac_url": "", "custom_data": [ { "custom_value": "1", "custom_key": "preferredRealm" }, { "custom_value": "true", "custom_key": "optimizeForLowCostNetwork" }, { "custom_value": "1", "custom_key": "preferredRole" }, { "custom_value": "true", "custom_key": "isSingleSignOnCredential" } ], "proxy_type": "1" } ``` ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 60 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.