Skip to content

Commit 2312be4

Browse files
Use APIRequest for create and validate endpoints
1 parent 27802c8 commit 2312be4

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

src/content/docs/byoip/get-started.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,15 @@ The process described on this page does not support onboarding IP prefixes for u
4646

4747
Use the [Add Prefix endpoint](/api/resources/addressing/subresources/prefixes/methods/create/) to create a prefix in the Cloudflare account that should own the BYOIP prefix.
4848

49-
```bash
50-
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/addressing/prefixes \
51-
-H 'Content-Type: application/json' \
52-
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
53-
-H "X-Auth-Key: $CLOUDFLARE_API_KEY" \
54-
-X POST \
55-
-d '{"cidr": "203.0.113.0/24",
56-
"asn": 13335,
57-
"delegate_loa_creation": true
58-
}
59-
```
49+
<APIRequest
50+
path="/accounts/{account_id}/addressing/prefixes"
51+
method="POST"
52+
json={{
53+
"cidr": "203.0.113.0/24",
54+
"asn": 13335,
55+
"delegate_loa_creation": true
56+
}}
57+
/>
6058

6159
```json title="Response" {15-19} ""id": "72823e95d6c64d48a8111fec81179816""
6260

src/content/docs/byoip/troubleshooting/prefix-validation.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ import { APIRequest, GlossaryTooltip } from "~/components";
4545

4646
3. After applying the necessary changes, use the Validate Prefix endpoint to re-trigger the validation checks.
4747

48-
```bash
49-
curl https://api.cloudflare.com/accounts/{account_id}/addressing/prefixes/{prefix_id}/validate \
50-
--header "X-Auth-Email: <EMAIL>" \
51-
--header "X-Auth-Key: <API_KEY>"
52-
```
48+
<APIRequest
49+
path="/accounts/{account_id}/addressing/prefixes/{prefix_id}/validate"
50+
method="POST"
51+
/>

0 commit comments

Comments
 (0)