Skip to content

Commit ff542a3

Browse files
angelampcostasdnts
authored andcommitted
Updates endpoint (cloudflare#23797)
1 parent 1d22ffc commit ff542a3

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

src/content/docs/spectrum/about/load-balancer.mdx

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 0
55

66
---
77

8-
import { Details, Render } from "~/components"
8+
import { Details, Render, APIRequest } from "~/components"
99

1010
You can configure Spectrum with Cloudflare [Load Balancing](/load-balancing/) to provide TCP healthchecks, failover, and traffic steering, bringing resiliency to your Spectrum applications.
1111

@@ -41,22 +41,43 @@ Under **Advanced health check settings**:
4141

4242
<Details header="TCP health check - API example">
4343

44-
```bash
45-
curl 'https://api.cloudflare.com/client/v4/organizations/{organization_id}/load_balancers/monitors' \
46-
--header "Authorization: Bearer <API_TOKEN>" \
47-
--header "Content-Type: application/json" \
48-
--data '{"description":"Spectrum Health Check","type":"tcp","port":2048,"interval":30,"retries":2,"timeout":5,"method":"connection_established"}'
49-
```
44+
<APIRequest
45+
method="POST"
46+
path="/accounts/{account_id}/load_balancers/monitors"
47+
json={{
48+
description: "Spectrum Health Check",
49+
type: "tcp",
50+
port: 2048,
51+
interval: 30,
52+
retries: 2,
53+
timeout: 5,
54+
method: "connection_established"
55+
}}
56+
/>
5057

5158
```json
5259
{
53-
"description": "Spectrum Health Check",
54-
"type": "tcp",
55-
"port": 2048,
56-
"interval": 30,
57-
"retries": 2,
58-
"timeout": 5,
59-
"method": "connection_established"
60+
"result": {
61+
"description": "TCP Monitor for Spectrum",
62+
"created_on": "2025-07-17T14:55:04.830009Z",
63+
"modified_on": "2025-07-17T14:55:04.830009Z",
64+
"id": "1d404721c660a8a7aaa28d68ed6d48d9",
65+
"type": "tcp",
66+
"port": 2048,
67+
"interval": 60,
68+
"retries": 2,
69+
"timeout": 5,
70+
"expected_body": "",
71+
"expected_codes": "",
72+
"follow_redirects": false,
73+
"allow_insecure": false,
74+
"probe_zone": "",
75+
"path": "",
76+
"method": "connection_established"
77+
},
78+
"success": true,
79+
"errors": [],
80+
"messages": []
6081
}
6182
```
6283

0 commit comments

Comments
 (0)