curl --request POST \
--url https://api.ngrok.com/edges/https/{edge_id}/routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'ngrok-version: <ngrok-version>' \
--data '
{
"match_type": "<string>",
"match": "<string>",
"edge_id": "<string>",
"description": "<string>",
"metadata": "<string>",
"backend": {
"enabled": true,
"backend_id": "<string>"
},
"ip_restriction": {
"enabled": true,
"ip_policy_ids": [
"<string>"
]
},
"circuit_breaker": {
"enabled": true,
"tripped_duration": 123,
"rolling_window": 123,
"num_buckets": 123,
"volume_threshold": 123,
"error_threshold_percentage": 123
},
"compression": {
"enabled": true
},
"request_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"response_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"webhook_verification": {
"enabled": true,
"provider": "<string>",
"secret": "<string>"
},
"oauth": {
"enabled": true,
"provider": {
"github": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
],
"teams": [
"<string>"
],
"organizations": [
"<string>"
]
},
"facebook": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"microsoft": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"google": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"linkedin": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"gitlab": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"twitch": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"amazon": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
}
},
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"auth_check_interval": 123
},
"saml": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"idp_metadata": "<string>",
"force_authn": true,
"allow_idp_initiated": true,
"authorized_groups": [
"<string>"
],
"nameid_format": "<string>"
},
"oidc": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
]
},
"websocket_tcp_converter": {
"enabled": true
},
"user_agent_filter": {
"enabled": true,
"allow": [
"<string>"
],
"deny": [
"<string>"
]
},
"traffic_policy": {
"enabled": true,
"value": "<string>"
}
}
'{
"edge_id": "<string>",
"id": "<string>",
"created_at": "<string>",
"match_type": "<string>",
"match": "<string>",
"uri": "<string>",
"description": "<string>",
"metadata": "<string>",
"backend": {
"enabled": true,
"backend": {
"id": "<string>",
"uri": "<string>"
}
},
"ip_restriction": {
"enabled": true,
"ip_policies": [
{
"id": "<string>",
"uri": "<string>"
}
]
},
"circuit_breaker": {
"enabled": true,
"tripped_duration": 123,
"rolling_window": 123,
"num_buckets": 123,
"volume_threshold": 123,
"error_threshold_percentage": 123
},
"compression": {
"enabled": true
},
"request_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"response_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"webhook_verification": {
"enabled": true,
"provider": "<string>",
"secret": "<string>"
},
"oauth": {
"enabled": true,
"provider": {
"github": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
],
"teams": [
"<string>"
],
"organizations": [
"<string>"
]
},
"facebook": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"microsoft": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"google": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"linkedin": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"gitlab": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"twitch": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"amazon": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
}
},
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"auth_check_interval": 123
},
"saml": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"idp_metadata": "<string>",
"force_authn": true,
"allow_idp_initiated": true,
"authorized_groups": [
"<string>"
],
"entity_id": "<string>",
"assertion_consumer_service_url": "<string>",
"single_logout_url": "<string>",
"request_signing_certificate_pem": "<string>",
"metadata_url": "<string>",
"nameid_format": "<string>"
},
"oidc": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
]
},
"websocket_tcp_converter": {
"enabled": true
},
"user_agent_filter": {
"enabled": true,
"allow": [
"<string>"
],
"deny": [
"<string>"
]
},
"traffic_policy": {
"enabled": true,
"value": "<string>"
}
}Create a new route on a specific HTTPS edge for matching and processing incoming requests.
curl --request POST \
--url https://api.ngrok.com/edges/https/{edge_id}/routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'ngrok-version: <ngrok-version>' \
--data '
{
"match_type": "<string>",
"match": "<string>",
"edge_id": "<string>",
"description": "<string>",
"metadata": "<string>",
"backend": {
"enabled": true,
"backend_id": "<string>"
},
"ip_restriction": {
"enabled": true,
"ip_policy_ids": [
"<string>"
]
},
"circuit_breaker": {
"enabled": true,
"tripped_duration": 123,
"rolling_window": 123,
"num_buckets": 123,
"volume_threshold": 123,
"error_threshold_percentage": 123
},
"compression": {
"enabled": true
},
"request_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"response_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"webhook_verification": {
"enabled": true,
"provider": "<string>",
"secret": "<string>"
},
"oauth": {
"enabled": true,
"provider": {
"github": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
],
"teams": [
"<string>"
],
"organizations": [
"<string>"
]
},
"facebook": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"microsoft": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"google": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"linkedin": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"gitlab": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"twitch": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"amazon": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
}
},
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"auth_check_interval": 123
},
"saml": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"idp_metadata": "<string>",
"force_authn": true,
"allow_idp_initiated": true,
"authorized_groups": [
"<string>"
],
"nameid_format": "<string>"
},
"oidc": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
]
},
"websocket_tcp_converter": {
"enabled": true
},
"user_agent_filter": {
"enabled": true,
"allow": [
"<string>"
],
"deny": [
"<string>"
]
},
"traffic_policy": {
"enabled": true,
"value": "<string>"
}
}
'{
"edge_id": "<string>",
"id": "<string>",
"created_at": "<string>",
"match_type": "<string>",
"match": "<string>",
"uri": "<string>",
"description": "<string>",
"metadata": "<string>",
"backend": {
"enabled": true,
"backend": {
"id": "<string>",
"uri": "<string>"
}
},
"ip_restriction": {
"enabled": true,
"ip_policies": [
{
"id": "<string>",
"uri": "<string>"
}
]
},
"circuit_breaker": {
"enabled": true,
"tripped_duration": 123,
"rolling_window": 123,
"num_buckets": 123,
"volume_threshold": 123,
"error_threshold_percentage": 123
},
"compression": {
"enabled": true
},
"request_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"response_headers": {
"enabled": true,
"add": {},
"remove": [
"<string>"
]
},
"webhook_verification": {
"enabled": true,
"provider": "<string>",
"secret": "<string>"
},
"oauth": {
"enabled": true,
"provider": {
"github": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
],
"teams": [
"<string>"
],
"organizations": [
"<string>"
]
},
"facebook": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"microsoft": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"google": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"linkedin": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"gitlab": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"twitch": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
},
"amazon": {
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"email_addresses": [
"<string>"
],
"email_domains": [
"<string>"
]
}
},
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"auth_check_interval": 123
},
"saml": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"idp_metadata": "<string>",
"force_authn": true,
"allow_idp_initiated": true,
"authorized_groups": [
"<string>"
],
"entity_id": "<string>",
"assertion_consumer_service_url": "<string>",
"single_logout_url": "<string>",
"request_signing_certificate_pem": "<string>",
"metadata_url": "<string>",
"nameid_format": "<string>"
},
"oidc": {
"enabled": true,
"options_passthrough": true,
"cookie_prefix": "<string>",
"inactivity_timeout": 123,
"maximum_duration": 123,
"issuer": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
]
},
"websocket_tcp_converter": {
"enabled": true
},
"user_agent_filter": {
"enabled": true,
"allow": [
"<string>"
],
"deny": [
"<string>"
]
},
"traffic_policy": {
"enabled": true,
"value": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
unique identifier of this edge
Type of match to use for this route. Valid values are "exact_path" and "path_prefix".
Route selector: "/blog" or "example.com" or "example.com/blog"
unique identifier of this edge
human-readable description of what this edge will be used for; optional, max 255 bytes.
arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes.
backend module configuration or null
Show child attributes
ip restriction module configuration or null
Show child attributes
circuit breaker module configuration or null
Show child attributes
compression module configuration or null
Show child attributes
request headers module configuration or null
Show child attributes
response headers module configuration or null
Show child attributes
webhook verification module configuration or null
Show child attributes
oauth module configuration or null
Show child attributes
saml module configuration or null
Show child attributes
oidc module configuration or null
Show child attributes
websocket to tcp adapter configuration or null
Show child attributes
n/a
Show child attributes
the traffic policy associated with this edge or null
Show child attributes
Create an HTTPS Edge Route
unique identifier of this edge
unique identifier of this edge route
timestamp when the edge configuration was created, RFC 3339 format
Type of match to use for this route. Valid values are "exact_path" and "path_prefix".
Route selector: "/blog" or "example.com" or "example.com/blog"
URI of the edge API resource
human-readable description of what this edge will be used for; optional, max 255 bytes.
arbitrary user-defined machine-readable data of this edge. Optional, max 4096 bytes.
backend module configuration or null
Show child attributes
ip restriction module configuration or null
Show child attributes
circuit breaker module configuration or null
Show child attributes
compression module configuration or null
Show child attributes
request headers module configuration or null
Show child attributes
response headers module configuration or null
Show child attributes
webhook verification module configuration or null
Show child attributes
oauth module configuration or null
Show child attributes
saml module configuration or null
Show child attributes
oidc module configuration or null
Show child attributes
websocket to tcp adapter configuration or null
Show child attributes
n/a
Show child attributes
the traffic policy associated with this edge or null
Show child attributes
Was this page helpful?