Skip to main content

HTTPS Edge Route IP Restriction Module


Replace HTTPS Edge Route IP Restriction Module

Request

PUT /edges/https/{edge_id}/routes/{id}/ip_restriction

Example Request

curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"enabled":true,"ip_policy_ids":["ipp_2NTVHfsAe0RwGMd2f1V0Kg6nJcS","ipp_2NTVHiiPOhvA6FyU3EcG7mauomN"]}' \
https://api.ngrok.com/edges/https/edghts_2NTVHdHnxWG4DKM1etjSzuv5lTL/routes/edghtsrt_2NTVHiffef0QKZ42EhgQi31MZbW/ip_restriction

Parameters

   
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
ip_policy_idsList<string>list of all IP policies that will be used to check if a source IP is allowed access to the endpoint

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"ip_policies": [
{
"id": "ipp_2NTVHfsAe0RwGMd2f1V0Kg6nJcS",
"uri": "https://api.ngrok.com/ip_policies/ipp_2NTVHfsAe0RwGMd2f1V0Kg6nJcS"
},
{
"id": "ipp_2NTVHiiPOhvA6FyU3EcG7mauomN",
"uri": "https://api.ngrok.com/ip_policies/ipp_2NTVHiiPOhvA6FyU3EcG7mauomN"
}
]
}

Fields

   
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
ip_policiesRef

Ref fields

   
idstringa resource identifier
uristringa uri for locating a resource

Get HTTPS Edge Route IP Restriction Module

Request

GET /edges/https/{edge_id}/routes/{id}/ip_restriction

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2NTVHdHnxWG4DKM1etjSzuv5lTL/routes/edghtsrt_2NTVHiffef0QKZ42EhgQi31MZbW/ip_restriction

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"ip_policies": [
{
"id": "ipp_2NTVHfsAe0RwGMd2f1V0Kg6nJcS",
"uri": "https://api.ngrok.com/ip_policies/ipp_2NTVHfsAe0RwGMd2f1V0Kg6nJcS"
},
{
"id": "ipp_2NTVHiiPOhvA6FyU3EcG7mauomN",
"uri": "https://api.ngrok.com/ip_policies/ipp_2NTVHiiPOhvA6FyU3EcG7mauomN"
}
]
}

Fields

   
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
ip_policiesRef

Ref fields

   
idstringa resource identifier
uristringa uri for locating a resource

Delete HTTPS Edge Route IP Restriction Module

Request

DELETE /edges/https/{edge_id}/routes/{id}/ip_restriction

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2NTVHdHnxWG4DKM1etjSzuv5lTL/routes/edghtsrt_2NTVHiffef0QKZ42EhgQi31MZbW/ip_restriction

Response

Returns a 204 response with no body on success