Static Backends
Create Static Backend
Create a new static backend
Request
POST /backends/static
Example Request
curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"address":"example.com:8080","description":"acme weighted","metadata":"{\"environment\": \"staging\"}","tls":{}}' \
https://api.ngrok.com/backends/static
Parameters
Name | Type | Description |
---|---|---|
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
address | string | the address to forward to |
tls | StaticBackendTLS | tls configuration to use |
StaticBackendTLS parameters
Name | Type | Description |
---|---|---|
enabled | boolean | if TLS is checked |
Response
Returns a 201 response on success
Example Response
{
"address": "example.com:8080",
"created_at": "2024-10-17T20:26:46Z",
"description": "acme weighted",
"id": "bkdsc_2na2L2Xi1jWBX7SMWy5Q1Jo4I7y",
"metadata": "{\"environment\": \"staging\"}",
"tls": {
"enabled": false
},
"uri": "https://api.ngrok.com/backends/static/bkdsc_2na2L2Xi1jWBX7SMWy5Q1Jo4I7y"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this static backend |
uri | string | URI of the StaticBackend 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 |
address | string | the address to forward to |
tls | StaticBackendTLS | tls configuration to use |
StaticBackendTLS fields
Name | Type | Description |
---|---|---|
enabled | boolean | if TLS is checked |
Delete Static Backend
Delete a static backend by ID.
Request
DELETE /backends/static/{id}
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/static/bkdsc_2na2L38XG7eaKLFzlf6ZZdPaHdj
Response
Returns a 204 response with no body on success
Get Static Backend
Get detailed information about a static backend by ID
Request
GET /backends/static/{id}
Example Request
curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"address":"example.com:8080","description":"acme weighted","metadata":"{\"environment\": \"staging\"}","tls":{}}' \
https://api.ngrok.com/backends/static
Response
Returns a 200 response on success
Example Response
{
"address": "example.com:8080",
"created_at": "2024-10-17T20:26:46Z",
"description": "acme weighted",
"id": "bkdsc_2na2L2qntwvPkxsTMvDIKUAFOt5",
"metadata": "{\"environment\": \"staging\"}",
"tls": {
"enabled": false
},
"uri": "https://api.ngrok.com/backends/static/bkdsc_2na2L2qntwvPkxsTMvDIKUAFOt5"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this static backend |
uri | string | URI of the StaticBackend 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 |
address | string | the address to forward to |
tls | StaticBackendTLS | tls configuration to use |
StaticBackendTLS fields
Name | Type | Description |
---|---|---|
enabled | boolean | if TLS is checked |
List Static Backends
List all static backends on this account
Request
GET /backends/static
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/static
Response
Returns a 200 response on success
Example Response
{
"backends": [
{
"address": "example.com:8080",
"created_at": "2024-10-17T20:26:46Z",
"description": "acme weighted",
"id": "bkdsc_2na2L38XG7eaKLFzlf6ZZdPaHdj",
"metadata": "{\"environment\": \"staging\"}",
"tls": {
"enabled": false
},
"uri": "https://api.ngrok.com/backends/static/bkdsc_2na2L38XG7eaKLFzlf6ZZdPaHdj"
},
{
"address": "example.com:8080",
"created_at": "2024-10-17T20:26:46Z",
"description": "acme weighted",
"id": "bkdsc_2na2L2Xi1jWBX7SMWy5Q1Jo4I7y",
"metadata": "{\"environment\": \"staging\"}",
"tls": {
"enabled": false
},
"uri": "https://api.ngrok.com/backends/static/bkdsc_2na2L2Xi1jWBX7SMWy5Q1Jo4I7y"
},
{
"address": "example.com:8080",
"created_at": "2024-10-17T20:26:46Z",
"description": "acme weighted",
"id": "bkdsc_2na2L2qntwvPkxsTMvDIKUAFOt5",
"metadata": "{\"environment\": \"staging\"}",
"tls": {
"enabled": false
},
"uri": "https://api.ngrok.com/backends/static/bkdsc_2na2L2qntwvPkxsTMvDIKUAFOt5"
}
],
"next_page_uri": null,
"uri": "https://api.ngrok.com/backends/static"
}
Fields
Name | Type | Description |
---|---|---|
backends | StaticBackend | the list of all static backends on this account |
uri | string | URI of the static backends list API resource |
next_page_uri | string | URI of the next page, or null if there is no next page |
StaticBackend fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this static backend |
uri | string | URI of the StaticBackend 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 |
address | string | the address to forward to |
tls | StaticBackendTLS | tls configuration to use |
StaticBackendTLS fields
Name | Type | Description |
---|---|---|
enabled | boolean | if TLS is checked |
Update Static Backend
Update static backend by ID
Request
PATCH /backends/static/{id}
Example Request
curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"address":"example.com:8080","metadata":"{\"environment\": \"production\"}","tls":{}}' \
https://api.ngrok.com/backends/static/bkdsc_2na2L38XG7eaKLFzlf6ZZdPaHdj
Parameters
Name | Type | Description |
---|---|---|
id | string | |
description | string | human-readable description of this backend. Optional |
metadata | string | arbitrary user-defined machine-readable data of this backend. Optional |
address | string | the address to forward to |
tls | StaticBackendTLS | tls configuration to use |
StaticBackendTLS parameters
Name | Type | Description |
---|---|---|
enabled | boolean | if TLS is checked |
Response
Returns a 200 response on success
Example Response
{
"address": "example.com:8080",
"created_at": "2024-10-17T20:26:46Z",
"description": "acme weighted",
"id": "bkdsc_2na2L38XG7eaKLFzlf6ZZdPaHdj",
"metadata": "{\"environment\": \"production\"}",
"tls": {
"enabled": false
},
"uri": "https://api.ngrok.com/backends/static/bkdsc_2na2L38XG7eaKLFzlf6ZZdPaHdj"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this static backend |
uri | string | URI of the StaticBackend 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 |
address | string | the address to forward to |
tls | StaticBackendTLS | tls configuration to use |
StaticBackendTLS fields
Name | Type | Description |
---|---|---|
enabled | boolean | if TLS is checked |