# Retrieve the full configuration details of a VPN payload item To get VPN policy payload item ## Endpoints **GET** `/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id}` ## Request URL ``` https://{serverurl}/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id} ``` ## Scope ``` MDMOnDemand.MDMDeviceMgmt.READ ``` ## Header ``` Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Path Parameters - **profile_id** (string) — Mandatory Unique identifier of the profile. Obtain from the [Create Profile](https://www.manageengine.com/mobile-device-management/help/api/cloud/profiles-create-profile.html) or [Get Profiles](https://www.manageengine.com/mobile-device-management/help/api/cloud/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/mobile-device-management/help/api/cloud/ios-get-vpn-payload-ios.html) response. ### Query Parameters - **include** (string) — Optional Comma-separated list of related fields to include in the response (e.g., assigned_to, payload_details). When omitted, only top-level fields are returned. ## Sample Request ### Curl ```bash curl --request GET \ --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id} \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ### Java ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; import java.net.http.HttpTimeoutException; public class Main { public static void main(String[] args) { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id}")) .header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") .method("GET", HttpRequest.BodyPublishers.noBody()) .build(); HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("appdomain") headers = { 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("GET", "/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id}", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript headersMap = Map(); headersMap.put("Accept", "application/json"); response = invokeUrl [ url: "https://appDomain/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id}" type: GET headers: headersMap connection: connection_name ] info response; ``` ### PowerShell ```powershell $headers=@{} $headers.Add("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") $response = Invoke-WebRequest -Uri 'https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/vpnpolicy/payloaditems/{payload_id}' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP 200 **Response Body**: `application/json` - **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 configuration object - **pptp** (JSON object) PPTP configuration object - **ipsec** (JSON object) IPSec configuration object - **cisco** (JSON object) Cisco configuration object - **juniperssl** (JSON object) Juniper SSL configuration object - **pulsesecure** (JSON object) Pulse Secure configuration object - **f5ssl** (JSON object) F5 SSL configuration object - **customssl** (JSON object) Custom SSL configuration object - **ikev2** (JSON object) IKEv2 configuration object - **ciscoanyconnect** (JSON object) Cisco AnyConnect configuration object - **sonicwall** (JSON object) SonicWall configuration object - **arubavia** (JSON object) Aruba VIA configuration object - **checkpoint** (JSON object) CheckPoint configuration object - **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 - **rule_order** (integer) Order in which the rule is evaluated - **action** (integer) Action to take. Allowed values: 0 = Disconnect 1 = Connect 2 = Ignore 3 = Evaluate Connection - **type** (integer) Match type. Allowed values: 0 = Always 1 = DNS Domain Match 2 = DNS Server Address Match 3 = Interface Type Match 4 = SSID Match 5 = URL String Probe - **value** (array) List of match values (domains, addresses, SSIDs, etc.) based on the match type - **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) VPN UUID - **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 - **custom_key** (string) Custom configuration key name - **custom_value** (string) Custom configuration key value ## Sample Response: HTTP 200 Full configuration details of VPN payload item ```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 } ``` ## Possible Response Codes - **200** — HTTP code