# Modify the configuration of a VPN payload item within a profile To modify Ios Per App Vpn payload item ## Endpoint `PUT /api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id}` ## Request ### Request URL `https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id}` ### Scope `MDMDeviceMgmt.UPDATE` ### Header `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/ios-get-vpn-payload-ios.html) response | #### Request Body `application/json` | Parameter | Type | Required | Description | |---|---|---|---| | sub_config | string | Optional | Sub Config. Default: L2TP | | connection_name | string | Mandatory | Connection Name. Default: VPN Configuration | | connection_type | integer | Mandatory | VPN connection type. Allowed values: 0=L2TP, 1=PPTP, 2=IPSec, 3=Cisco Legacy AnyConnect, 4=Juniper SSL, 5=F5 SSL, 6=Custom SSL, 7=Pulse Secure, 8=IKEv2, 9=Cisco AnyConnect, 10=SonicWall, 11=Aruba VIA, 12=CheckPoint Mobile | | send_all_nw_traffic | boolean | Optional | Send All Nw Traffic. Default: false | | certificate_uuid | string | Optional | Certificate Uuid | | enable_vpn_on_demand | boolean | Optional | Enable Vpn On Demand. Default: false | | disconnect_on_idle_timeout | integer | Optional | Disconnect on idle timeout in seconds. 0 means disabled. Default: 0 | | l2tp | JSON Object | Optional | L2Tp | | pptp | JSON Object | Optional | Pptp | | ipsec | JSON Object | Optional | Ipsec | | cisco | JSON Object | Optional | Cisco | | juniperssl | JSON Object | Optional | Juniperssl | | pulsesecure | JSON Object | Optional | Pulsesecure | | f5ssl | JSON Object | Optional | F5Ssl | | customssl | JSON Object | Optional | Customssl | | ikev2 | JSON Object | Optional | Ikev2 | | ciscoanyconnect | JSON Object | Optional | Ciscoanyconnect | | sonicwall | JSON Object | Optional | Sonicwall | | arubavia | JSON Object | Optional | Arubavia | | checkpoint | JSON Object | Optional | Checkpoint | | proxy_type | integer | Optional | Proxy configuration type. Allowed values: 0=None, 1=Manual, 2=Automatic (PAC URL) | | proxy_server | string | Optional | Proxy Server | | proxy_server_port | integer | Optional | Proxy Server Port. Default: 0 | | proxy_user_name | string | Optional | Proxy User Name | | proxy_password | string | Optional | Proxy Password (sensitive - write-only) | | proxy_password_id | long | Optional | Proxy Password Id | | proxy_pac_url | string | Optional | Proxy Pac Url | | ondemand_user_override_disabled | boolean | Optional | Ondemand User Override Disabled. Default: false | | ondemandrules | JSON Array | Optional | List of VPN On Demand rules controlling when the VPN connects/disconnects | | vpn_type | integer | Mandatory | VPN scope type. Allowed values: 1=Device-level VPN, 2=Per-App VPN | | provider_type | integer | Optional | VPN provider type. Allowed values: 0=Packet Tunnel (default), 1=App Proxy | | vpnuuid | string | Optional | Vpnuuid | | ondemand_match_app_enabled | boolean | Optional | Ondemand Match App Enabled. Default: true | | custom_data | JSON Array | Optional | List of custom key-value pairs for vendor-specific VPN configuration | ### Sample Request ```curl curl --request PUT \ --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/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,"sub_config":"L2TP","ipsec":{},"pptp":{},"enable_vpn_on_demand":false,"certificate_uuid":"value","disconnect_on_idle_timeout":0,"vpn_type":1}' ``` ### Sample Request Body Modify VPN payload item ```json { "connection_name": "VPN Configuration", "send_all_nw_traffic": false, "l2tp": {}, "connection_type": 0, "sub_config": "L2TP", "ipsec": {}, "pptp": {}, "enable_vpn_on_demand": false, "certificate_uuid": "value", "disconnect_on_idle_timeout": 0, "vpn_type": 1 } ``` ## Response ### HTTP Code 200 Response Body: `application/json` | Parameter | Type | Description | |---|---|---| | payload_id | long | Unique identifier of the payload item | | sub_config | string | Sub Config. Default: L2TP | | connection_name | string | Connection Name. Default: VPN Configuration | | connection_type | integer | VPN connection type. Allowed values: 0=L2TP, 1=PPTP, 2=IPSec, 3=Cisco Legacy AnyConnect, 4=Juniper SSL, 5=F5 SSL, 6=Custom SSL, 7=Pulse Secure, 8=IKEv2, 9=Cisco AnyConnect, 10=SonicWall, 11=Aruba VIA, 12=CheckPoint Mobile | | send_all_nw_traffic | boolean | Send All Nw Traffic. Default: false | | certificate_uuid | string | Certificate Uuid | | enable_vpn_on_demand | boolean | Enable Vpn On Demand. Default: false | | disconnect_on_idle_timeout | integer | Disconnect on idle timeout in seconds. 0 means disabled. Default: 0 | | l2tp | JSON Object | L2Tp | | pptp | JSON Object | Pptp | | ipsec | JSON Object | Ipsec | | cisco | JSON Object | Cisco | | juniperssl | JSON Object | Juniperssl | | pulsesecure | JSON Object | Pulsesecure | | f5ssl | JSON Object | F5Ssl | | customssl | JSON Object | Customssl | | ikev2 | JSON Object | Ikev2 | | ciscoanyconnect | JSON Object | Ciscoanyconnect | | sonicwall | JSON Object | Sonicwall | | arubavia | JSON Object | Arubavia | | checkpoint | JSON Object | Checkpoint | | proxy_type | integer | Proxy configuration type. Allowed values: 0=None, 1=Manual, 2=Automatic (PAC URL) | | proxy_server | string | Proxy Server | | proxy_server_port | integer | Proxy Server Port. Default: 0 | | proxy_user_name | string | Proxy User Name | | proxy_password | string | Proxy Password (sensitive - write-only) | | proxy_password_id | long | Proxy Password Id | | proxy_pac_url | string | Proxy Pac Url | | ondemand_user_override_disabled | boolean | Ondemand User Override Disabled. Default: false | | ondemandrules | JSON Array | List of VPN On Demand rules controlling when the VPN connects/disconnects | | vpn_type | integer | VPN scope type. Allowed values: 1=Device-level VPN, 2=Per-App VPN | | provider_type | integer | VPN provider type. Allowed values: 0=Packet Tunnel (default), 1=App Proxy | | vpnuuid | string | Vpnuuid | | ondemand_match_app_enabled | boolean | Ondemand Match App Enabled. Default: true | | custom_data | JSON Array | List of custom key-value pairs for vendor-specific VPN configuration | ### Possible Response Codes | Code | Type | |---|---| | 200 | HTTP code | ### Sample Response: HTTP 200 VPN payload item successfully modified ```json { "connection_name": "VPN Configuration", "send_all_nw_traffic": false, "payload_id": 9007199254741000, "l2tp": {}, "connection_type": 0, "sub_config": "L2TP", "ipsec": {}, "pptp": {}, "enable_vpn_on_demand": false, "certificate_uuid": "value", "disconnect_on_idle_timeout": 0, "vpn_type": 1 } ``` ## Rate Limits ![ ](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.