Tunnel Group Backends
Create Tunnel Group Backend
Create a new TunnelGroup backend
Request
POST /backends/tunnel_group
Example Request
curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"description":"acme tunnel group","metadata":"{\"environment\": \"staging\"}","labels":{"baz":"qux","foo":"bar"}}' \
https://api.ngrok.com/backends/tunnel_group
Parameters
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
labels | Map<string, string> | labels to watch for tunnels on, e.g. app->foo, dc->bar |
Response
Returns a 201 response on success
Example Response
{
"id": "bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme tunnel group",
"metadata": "{\"environment\": \"staging\"}",
"labels": {
"baz": "qux",
"foo": "bar"
},
"tunnels": []
}
Fields
id | string | unique identifier for this TunnelGroup backend |
uri | string | URI of the TunnelGroupBackend API resource |
created_at | string | timestamp when the backend was created, RFC 3339 format |
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
labels | Map<string, string> | labels to watch for tunnels on, e.g. app->foo, dc->bar |
tunnels | Ref | tunnels matching this backend |
Ref fields
id | string | a resource identifier |
uri | string | a uri for locating a resource |
Delete Tunnel Group Backend
Delete a TunnelGroup backend by ID.
Request
DELETE /backends/tunnel_group/{id}
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/tunnel_group/bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2
Response
Returns a 204 response with no body on success
Get Tunnel Group Backend
Get detailed information about a TunnelGroup backend by ID
Request
GET /backends/tunnel_group/{id}
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/tunnel_group/bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2
Response
Returns a 200 response on success
Example Response
{
"id": "bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme tunnel group",
"metadata": "{\"environment\": \"staging\"}",
"labels": {
"baz": "qux",
"foo": "bar"
},
"tunnels": []
}
Fields
id | string | unique identifier for this TunnelGroup backend |
uri | string | URI of the TunnelGroupBackend API resource |
created_at | string | timestamp when the backend was created, RFC 3339 format |
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
labels | Map<string, string> | labels to watch for tunnels on, e.g. app->foo, dc->bar |
tunnels | Ref | tunnels matching this backend |
Ref fields
id | string | a resource identifier |
uri | string | a uri for locating a resource |
List Tunnel Group Backends
List all TunnelGroup backends on this account
Request
GET /backends/tunnel_group
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/tunnel_group
Response
Returns a 200 response on success
Example Response
{
"backends": [
{
"id": "bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme tunnel group",
"metadata": "{\"environment\": \"staging\"}",
"labels": {
"baz": "qux",
"foo": "bar"
},
"tunnels": []
}
],
"uri": "https://api.ngrok.com/backends/tunnel_group",
"next_page_uri": null
}
Fields
backends | TunnelGroupBackend | the list of all TunnelGroup backends on this account |
uri | string | URI of the TunnelGroup backends list API resource |
next_page_uri | string | URI of the next page, or null if there is no next page |
TunnelGroupBackend fields
id | string | unique identifier for this TunnelGroup backend |
uri | string | URI of the TunnelGroupBackend API resource |
created_at | string | timestamp when the backend was created, RFC 3339 format |
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
labels | Map<string, string> | labels to watch for tunnels on, e.g. app->foo, dc->bar |
tunnels | Ref | tunnels matching this backend |
Ref fields
id | string | a resource identifier |
uri | string | a uri for locating a resource |
Update Tunnel Group Backend
Update TunnelGroup backend by ID
Request
PATCH /backends/tunnel_group/{id}
Example Request
curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"metadata":"{\"environment\": \"production\"}"}' \
https://api.ngrok.com/backends/tunnel_group/bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2
Parameters
id | string | |
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
labels | Map<string, string> | labels to watch for tunnels on, e.g. app->foo, dc->bar |
Response
Returns a 200 response on success
Example Response
{
"id": "bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2TMGJ0p8YLgpI9NPZ1mlMjKd1Y2",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme tunnel group",
"metadata": "{\"environment\": \"production\"}",
"labels": null,
"tunnels": []
}
Fields
id | string | unique identifier for this TunnelGroup backend |
uri | string | URI of the TunnelGroupBackend API resource |
created_at | string | timestamp when the backend was created, RFC 3339 format |
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
labels | Map<string, string> | labels to watch for tunnels on, e.g. app->foo, dc->bar |
tunnels | Ref | tunnels matching this backend |
Ref fields
id | string | a resource identifier |
uri | string | a uri for locating a resource |