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 '{"backends":["bkdhr_2hrGynsNV58qoe9YZ4AcTch8S3u"],"description":"acme failover","metadata":"{\"environment\": \"staging\"}"}' \
https://api.ngrok.com/backends/failover

Parameters

NameTypeDescription
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

{
"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

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

NameTypeDescription
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": [
{
"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

NameTypeDescription
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

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

Parameters

NameTypeDescription
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

{
"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

NameTypeDescription
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