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 '{"description":"acme failover","metadata":"{\"environment\": \"staging\"}","backends":["bkdhr_2TMGJ2TIm31qPPearUgcXAX7vrq"]}' \
https://api.ngrok.com/backends/failover
Parameters
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
{
"id": "bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme failover",
"metadata": "{\"environment\": \"staging\"}",
"backends": ["bkdhr_2TMGJ2TIm31qPPearUgcXAX7vrq"]
}
Fields
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_2TMGJ3FeKAYmICgpcWcmXv3wPSl
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_2TMGJ3FeKAYmICgpcWcmXv3wPSl
Response
Returns a 200 response on success
Example Response
{
"id": "bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme failover",
"metadata": "{\"environment\": \"staging\"}",
"backends": ["bkdhr_2TMGJ2TIm31qPPearUgcXAX7vrq"]
}
Fields
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": [
{
"id": "bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme failover",
"metadata": "{\"environment\": \"staging\"}",
"backends": ["bkdhr_2TMGJ2TIm31qPPearUgcXAX7vrq"]
}
],
"uri": "https://api.ngrok.com/backends/failover",
"next_page_uri": null
}
Fields
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
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_2TMGJ3FeKAYmICgpcWcmXv3wPSl
Parameters
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
{
"id": "bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2TMGJ3FeKAYmICgpcWcmXv3wPSl",
"created_at": "2023-07-31T23:17:40Z",
"description": "acme failover",
"metadata": "{\"environment\": \"production\"}",
"backends": []
}
Fields
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 |