Skip to main content

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

   
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
labelsMap<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_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"created_at": "2023-03-24T19:59:31Z",
"description": "acme tunnel group",
"metadata": "{\"environment\": \"staging\"}",
"labels": {
"baz": "qux",
"foo": "bar"
},
"tunnels": []
}

Fields

   
idstringunique identifier for this TunnelGroup backend
uristringURI of the TunnelGroupBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
labelsMap<string, string>labels to watch for tunnels on, e.g. app->foo, dc->bar
tunnelsReftunnels matching this backend

Ref fields

   
idstringa resource identifier
uristringa 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_2NTVHWU05lVKLHPIooJ2aX4qvKT

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_2NTVHWU05lVKLHPIooJ2aX4qvKT

Response

Returns a 200 response on success

Example Response

{
"id": "bkdtg_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"created_at": "2023-03-24T19:59:31Z",
"description": "acme tunnel group",
"metadata": "{\"environment\": \"staging\"}",
"labels": {
"baz": "qux",
"foo": "bar"
},
"tunnels": []
}

Fields

   
idstringunique identifier for this TunnelGroup backend
uristringURI of the TunnelGroupBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
labelsMap<string, string>labels to watch for tunnels on, e.g. app->foo, dc->bar
tunnelsReftunnels matching this backend

Ref fields

   
idstringa resource identifier
uristringa 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_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"created_at": "2023-03-24T19:59:31Z",
"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

   
backendsTunnelGroupBackendthe list of all TunnelGroup backends on this account
uristringURI of the TunnelGroup backends list API resource
next_page_uristringURI of the next page, or null if there is no next page

TunnelGroupBackend fields

   
idstringunique identifier for this TunnelGroup backend
uristringURI of the TunnelGroupBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
labelsMap<string, string>labels to watch for tunnels on, e.g. app->foo, dc->bar
tunnelsReftunnels matching this backend

Ref fields

   
idstringa resource identifier
uristringa 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_2NTVHWU05lVKLHPIooJ2aX4qvKT

Parameters

   
idstring
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
labelsMap<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_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2NTVHWU05lVKLHPIooJ2aX4qvKT",
"created_at": "2023-03-24T19:59:31Z",
"description": "acme tunnel group",
"metadata": "{\"environment\": \"production\"}",
"labels": null,
"tunnels": []
}

Fields

   
idstringunique identifier for this TunnelGroup backend
uristringURI of the TunnelGroupBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
labelsMap<string, string>labels to watch for tunnels on, e.g. app->foo, dc->bar
tunnelsReftunnels matching this backend

Ref fields

   
idstringa resource identifier
uristringa uri for locating a resource