Failover Backends
Create Failover Backend
Create a new Failover backend
Request
POST /backends/failover
Example Request
curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"backends":["bkdhr_2hrGynsNV58qoe9YZ4AcTch8S3u"],"description":"acme failover","metadata":"{\"environment\": \"staging\"}"}' \
https://api.ngrok.com/backends/failover
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 |
backends | List<string> | the ids of the child backends in order |
Response
Returns a 201 response on success
Example Response
{
"backends": ["bkdhr_2hrGynsNV58qoe9YZ4AcTch8S3u"],
"created_at": "2024-06-14T06:03:59Z",
"description": "acme failover",
"id": "bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2",
"metadata": "{\"environment\": \"staging\"}",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this Failover backend |
uri | string | URI of the FailoverBackend 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 |
backends | List<string> | the ids of the child backends in order |
Delete Failover Backend
Delete a Failover backend by ID.
Request
DELETE /backends/failover/{id}
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/failover/bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2
Response
Returns a 204 response with no body on success
Get Failover Backend
Get detailed information about a Failover backend by ID
Request
GET /backends/failover/{id}
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/failover/bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2
Response
Returns a 200 response on success
Example Response
{
"backends": ["bkdhr_2hrGynsNV58qoe9YZ4AcTch8S3u"],
"created_at": "2024-06-14T06:03:59Z",
"description": "acme failover",
"id": "bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2",
"metadata": "{\"environment\": \"staging\"}",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this Failover backend |
uri | string | URI of the FailoverBackend 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 |
backends | List<string> | the ids of the child backends in order |
List Failover Backends
List all Failover backends on this account
Request
GET /backends/failover
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/backends/failover
Response
Returns a 200 response on success
Example Response
{
"backends": [
{
"backends": ["bkdhr_2hrGynsNV58qoe9YZ4AcTch8S3u"],
"created_at": "2024-06-14T06:03:59Z",
"description": "acme failover",
"id": "bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2",
"metadata": "{\"environment\": \"staging\"}",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2"
}
],
"next_page_uri": null,
"uri": "https://api.ngrok.com/backends/failover"
}
Fields
Name | Type | Description |
---|---|---|
backends | FailoverBackend | the list of all Failover backends on this account |
uri | string | URI of the Failover backends list API resource |
next_page_uri | string | URI of the next page, or null if there is no next page |
FailoverBackend fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this Failover backend |
uri | string | URI of the FailoverBackend 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 |
backends | List<string> | the ids of the child backends in order |
Update Failover Backend
Update Failover backend by ID
Request
PATCH /backends/failover/{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/failover/bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2
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 |
backends | List<string> | the ids of the child backends in order |
Response
Returns a 200 response on success
Example Response
{
"backends": [],
"created_at": "2024-06-14T06:03:59Z",
"description": "acme failover",
"id": "bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2",
"metadata": "{\"environment\": \"production\"}",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2hrGymEE3ZdQ878wzBrmCgpBvA2"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this Failover backend |
uri | string | URI of the FailoverBackend 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 |
backends | List<string> | the ids of the child backends in order |