Modify the configuration of a VPN payload item within a profile

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

To modify Mac Vpn policy payload item

Request URL

https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/macvpnpolicy/payloaditems/{payload_id}

Scope

MDMDeviceMgmt.UPDATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Path Parameters

profile_idstringMandatory

Unique identifier of the profile. Obtain from the Create Profile or Get Profiles response

payload_idstringMandatory

Unique identifier of the payload item. Obtain from the Get Payload Item IDs response

- Request Body

application/json
JSON Object
Hide Sub-Attributes
sub_configstringOptional

VPN sub-configuration type indicating the active VPN protocol. Corresponds to the connection_type value (e.g., L2TP, PPTP, IPSEC, IKEV2, CUSTOMSSL). Default: L2TP

connection_namestringMandatory

Display name for the VPN connection shown to the user in System Preferences. Default: VPN Configuration

connection_typeintegerMandatory

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_trafficbooleanOptional

Whether all network traffic is routed through the VPN tunnel (full tunnel mode). When false, split tunneling is used. Default: false

certificate_uuidstringOptional

UUID of the identity certificate payload used for VPN authentication. Obtain from the Upload Certificate API

enable_vpn_on_demandbooleanOptional

Whether VPN On Demand is enabled, allowing the system to automatically establish the VPN connection based on configured rules. Default: false

disconnect_on_idle_timeoutintegerOptional

Disconnect on idle timeout in seconds. 0 means disabled. Default: 0

l2tpJSON ObjectOptional

L2Tp

Show Sub-Attributes
pptpJSON ObjectOptional

Pptp

Show Sub-Attributes
ipsecJSON ObjectOptional

Ipsec

Show Sub-Attributes
ciscoJSON ObjectOptional

Cisco

Show Sub-Attributes
junipersslJSON ObjectOptional

Juniperssl

Show Sub-Attributes
pulsesecureJSON ObjectOptional

Pulsesecure

Show Sub-Attributes
f5sslJSON ObjectOptional

F5Ssl

Show Sub-Attributes
customsslJSON ObjectOptional

Customssl

Show Sub-Attributes
ikev2JSON ObjectOptional

Ikev2

Show Sub-Attributes
ciscoanyconnectJSON ObjectOptional

Ciscoanyconnect

Show Sub-Attributes
sonicwallJSON ObjectOptional

Sonicwall

Show Sub-Attributes
arubaviaJSON ObjectOptional

Arubavia

Show Sub-Attributes
checkpointJSON ObjectOptional

Checkpoint

Show Sub-Attributes
proxy_typeintegerOptional

Proxy configuration type. Allowed values: 0=None, 1=Manual, 2=Automatic (PAC URL)

proxy_serverstringOptional

Hostname or IP address of the HTTP proxy server. Required when proxy_type is 1 (Manual)

proxy_server_portintegerOptional

Port number of the HTTP proxy server. Valid range: 0-65535. Default: 0

proxy_user_namestringOptional

Username for proxy server authentication

proxy_passwordstringOptional

Password for proxy server authentication (sensitive - write-only, not returned in responses)

proxy_password_idlongOptional

Internal identifier for the stored proxy password credential

proxy_pac_urlstringOptional

URL of the Proxy Auto-Configuration (PAC) file. Required when proxy_type is 2 (Automatic)

ondemand_user_override_disabledbooleanOptional

Whether the user is prevented from overriding VPN On Demand settings. When true, the user cannot manually disconnect an on-demand VPN. Default: false

ondemandrulesJSON ArrayOptional

List of VPN On Demand rules controlling when the VPN connects/disconnects

Show Sub-Attributes
JSON Object
Show Sub-Attributes
rule_orderintegerOptional

Order in which the rule is evaluated

actionintegerOptional

Action to take. Allowed values: 0=Disconnect, 1=Connect, 2=Ignore, 3=Evaluate Connection

typeintegerOptional

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

valuearrayOptional

List of match values (domains, addresses, SSIDs, etc.) based on the match type

vpn_typeintegerMandatory

VPN scope type. Allowed values: 1=Device-level VPN, 2=Per-App VPN

provider_typeintegerOptional

VPN provider type. Allowed values: 0=Packet Tunnel (default), 1=App Proxy

vpnuuidstringOptional

Unique identifier (UUID) for this VPN configuration, used to reference this VPN from Per-App VPN app assignments

ondemand_match_app_enabledbooleanOptional

Whether Per-App VPN automatically connects when associated apps launch. When enabled, the VPN triggers on app launch matching. Default: true

custom_dataJSON ArrayOptional

List of custom key-value pairs for vendor-specific VPN configuration

Show Sub-Attributes
JSON Object
Show Sub-Attributes
custom_keystringOptional

Custom configuration key name

custom_valuestringOptional

Custom configuration key value

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request PUT \
  --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/macvpnpolicy/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

Copied!
  {
    "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
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
payload_idlong

Unique identifier of the payload item

sub_configstring

VPN sub-configuration type indicating the active VPN protocol. Corresponds to the connection_type value (e.g., L2TP, PPTP, IPSEC, IKEV2, CUSTOMSSL). Default: L2TP

connection_namestring

Display name for the VPN connection shown to the user in System Preferences. Default: VPN Configuration

connection_typestring

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_trafficboolean

Whether all network traffic is routed through the VPN tunnel (full tunnel mode). When false, split tunneling is used. Default: false

certificate_uuidstring

UUID of the identity certificate payload used for VPN authentication. Obtain from the Upload Certificate API

enable_vpn_on_demandboolean

Whether VPN On Demand is enabled, allowing the system to automatically establish the VPN connection based on configured rules. Default: false

disconnect_on_idle_timeoutstring

Disconnect on idle timeout in seconds. 0 means disabled. Default: 0

l2tpJSON Object

L2Tp

Show Sub-Attributes
pptpJSON Object

Pptp

Show Sub-Attributes
ipsecJSON Object

Ipsec

Show Sub-Attributes
ciscoJSON Object

Cisco

Show Sub-Attributes
junipersslJSON Object

Juniperssl

Show Sub-Attributes
pulsesecureJSON Object

Pulsesecure

Show Sub-Attributes
f5sslJSON Object

F5Ssl

Show Sub-Attributes
customsslJSON Object

Customssl

Show Sub-Attributes
ikev2JSON Object

Ikev2

Show Sub-Attributes
ciscoanyconnectJSON Object

Ciscoanyconnect

Show Sub-Attributes
sonicwallJSON Object

Sonicwall

Show Sub-Attributes
arubaviaJSON Object

Arubavia

Show Sub-Attributes
checkpointJSON Object

Checkpoint

Show Sub-Attributes
proxy_typestring

Proxy configuration type. Allowed values: 0=None, 1=Manual, 2=Automatic (PAC URL)

proxy_serverstring

Hostname or IP address of the HTTP proxy server. Required when proxy_type is 1 (Manual)

proxy_server_portstring

Port number of the HTTP proxy server. Valid range: 0-65535. Default: 0

proxy_user_namestring

Username for proxy server authentication

proxy_passwordstring

Password for proxy server authentication (sensitive - write-only, not returned in responses)

proxy_password_idlong

Internal identifier for the stored proxy password credential

proxy_pac_urlstring

URL of the Proxy Auto-Configuration (PAC) file. Required when proxy_type is 2 (Automatic)

ondemand_user_override_disabledboolean

Whether the user is prevented from overriding VPN On Demand settings. When true, the user cannot manually disconnect an on-demand VPN. Default: false

ondemandrulesJSON Array

List of VPN On Demand rules controlling when the VPN connects/disconnects

Show Sub-Attributes
JSON Object
Show Sub-Attributes
rule_orderinteger

Order in which the rule is evaluated

actioninteger

Action to take. Allowed values: 0=Disconnect, 1=Connect, 2=Ignore, 3=Evaluate Connection

typeinteger

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

valuearray

List of match values (domains, addresses, SSIDs, etc.) based on the match type

vpn_typestring

VPN scope type. Allowed values: 1=Device-level VPN, 2=Per-App VPN

provider_typestring

VPN provider type. Allowed values: 0=Packet Tunnel (default), 1=App Proxy

vpnuuidstring

Unique identifier (UUID) for this VPN configuration, used to reference this VPN from Per-App VPN app assignments

ondemand_match_app_enabledboolean

Whether Per-App VPN automatically connects when associated apps launch. When enabled, the VPN triggers on app launch matching. Default: true

custom_dataJSON Array

List of custom key-value pairs for vendor-specific VPN configuration

Show Sub-Attributes
JSON Object
Show Sub-Attributes
custom_keystring

Custom configuration key name

custom_valuestring

Custom configuration key value

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

VPN payload item successfully modified

Copied!
  {
    "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
  }
                
Show full

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.