Skip to main content

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

NameTypeDescription
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
addressstringthe address to forward to
tlsStaticBackendTLStls configuration to use

StaticBackendTLS parameters

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

NameTypeDescription
idstringunique identifier for this static backend
uristringURI of the StaticBackend 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
addressstringthe address to forward to
tlsStaticBackendTLStls configuration to use

StaticBackendTLS fields

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

NameTypeDescription
idstringunique identifier for this static backend
uristringURI of the StaticBackend 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
addressstringthe address to forward to
tlsStaticBackendTLStls configuration to use

StaticBackendTLS fields

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

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

StaticBackend fields

NameTypeDescription
idstringunique identifier for this static backend
uristringURI of the StaticBackend 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
addressstringthe address to forward to
tlsStaticBackendTLStls configuration to use

StaticBackendTLS fields

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

NameTypeDescription
idstring
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
addressstringthe address to forward to
tlsStaticBackendTLStls configuration to use

StaticBackendTLS parameters

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

NameTypeDescription
idstringunique identifier for this static backend
uristringURI of the StaticBackend 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
addressstringthe address to forward to
tlsStaticBackendTLStls configuration to use

StaticBackendTLS fields

NameTypeDescription
enabledbooleanif TLS is checked