Skip to main content

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_2NTVHakkOGd8LzjwMdXE5tUjtwC"]}' \
https://api.ngrok.com/backends/failover

Parameters

   
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
backendsList<string>the ids of the child backends in order

Response

Returns a 201 response on success

Example Response

{
"id": "bkdfo_2NTVHW2R9GdGVp08TuLqaJqELcW",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2NTVHW2R9GdGVp08TuLqaJqELcW",
"created_at": "2023-03-24T19:59:31Z",
"description": "acme failover",
"metadata": "{\"environment\": \"staging\"}",
"backends": [
"bkdhr_2NTVHakkOGd8LzjwMdXE5tUjtwC"
]
}

Fields

   
idstringunique identifier for this Failover backend
uristringURI of the FailoverBackend 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
backendsList<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_2NTVHW2R9GdGVp08TuLqaJqELcW

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_2NTVHW2R9GdGVp08TuLqaJqELcW

Response

Returns a 200 response on success

Example Response

{
"id": "bkdfo_2NTVHW2R9GdGVp08TuLqaJqELcW",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2NTVHW2R9GdGVp08TuLqaJqELcW",
"created_at": "2023-03-24T19:59:31Z",
"description": "acme failover",
"metadata": "{\"environment\": \"staging\"}",
"backends": [
"bkdhr_2NTVHakkOGd8LzjwMdXE5tUjtwC"
]
}

Fields

   
idstringunique identifier for this Failover backend
uristringURI of the FailoverBackend 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
backendsList<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_2NTVHW2R9GdGVp08TuLqaJqELcW",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2NTVHW2R9GdGVp08TuLqaJqELcW",
"created_at": "2023-03-24T19:59:31Z",
"description": "acme failover",
"metadata": "{\"environment\": \"staging\"}",
"backends": [
"bkdhr_2NTVHakkOGd8LzjwMdXE5tUjtwC"
]
}
],
"uri": "https://api.ngrok.com/backends/failover",
"next_page_uri": null
}

Fields

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

FailoverBackend fields

   
idstringunique identifier for this Failover backend
uristringURI of the FailoverBackend 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
backendsList<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_2NTVHW2R9GdGVp08TuLqaJqELcW

Parameters

   
idstring
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
backendsList<string>the ids of the child backends in order

Response

Returns a 200 response on success

Example Response

{
"id": "bkdfo_2NTVHW2R9GdGVp08TuLqaJqELcW",
"uri": "https://api.ngrok.com/backends/failover/bkdfo_2NTVHW2R9GdGVp08TuLqaJqELcW",
"created_at": "2023-03-24T19:59:31Z",
"description": "acme failover",
"metadata": "{\"environment\": \"production\"}",
"backends": []
}

Fields

   
idstringunique identifier for this Failover backend
uristringURI of the FailoverBackend 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
backendsList<string>the ids of the child backends in order