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","labels":{"baz":"qux","foo":"bar"},"metadata":"{\"environment\": \"staging\"}"}' \
https://api.ngrok.com/backends/tunnel_group

Parameters

NameTypeDescription
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

{
"created_at": "2024-08-02T07:15:39Z",
"description": "acme tunnel group",
"id": "bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO",
"labels": {
"baz": "qux",
"foo": "bar"
},
"metadata": "{\"environment\": \"staging\"}",
"tunnels": [],
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO"
}

Fields

NameTypeDescription
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

NameTypeDescription
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_2k5okE3nJhMvCgk1qvZepXJyUxO

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_2k5okE3nJhMvCgk1qvZepXJyUxO

Response

Returns a 200 response on success

Example Response

{
"created_at": "2024-08-02T07:15:39Z",
"description": "acme tunnel group",
"id": "bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO",
"labels": {
"baz": "qux",
"foo": "bar"
},
"metadata": "{\"environment\": \"staging\"}",
"tunnels": [],
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO"
}

Fields

NameTypeDescription
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

NameTypeDescription
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": [
{
"created_at": "2024-08-02T07:15:39Z",
"description": "acme tunnel group",
"id": "bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO",
"labels": {
"baz": "qux",
"foo": "bar"
},
"metadata": "{\"environment\": \"staging\"}",
"tunnels": [],
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO"
}
],
"next_page_uri": null,
"uri": "https://api.ngrok.com/backends/tunnel_group"
}

Fields

NameTypeDescription
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

NameTypeDescription
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

NameTypeDescription
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_2k5okE3nJhMvCgk1qvZepXJyUxO

Parameters

NameTypeDescription
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

{
"created_at": "2024-08-02T07:15:39Z",
"description": "acme tunnel group",
"id": "bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO",
"labels": {
"baz": "qux",
"foo": "bar"
},
"metadata": "{\"environment\": \"production\"}",
"tunnels": [],
"uri": "https://api.ngrok.com/backends/tunnel_group/bkdtg_2k5okE3nJhMvCgk1qvZepXJyUxO"
}

Fields

NameTypeDescription
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

NameTypeDescription
idstringa resource identifier
uristringa uri for locating a resource