88 content : Get Started — Regional Services
99---
1010
11- import { Details } from " ~/components" ;
11+ import { Details , APIRequest } from " ~/components" ;
1212
1313:::note
1414
@@ -45,10 +45,10 @@ These are some examples of API requests.
4545
4646<Details header = " List all the available regions" >
4747
48- ``` bash title="Request"
49- curl " https://api.cloudflare.com/client/v4/ accounts/{account_id}/addressing/regional_hostnames/regions" \
50- --header " Authorization: Bearer <API_TOKEN> " | jq .
51- ```
48+ < APIRequest
49+ path = " / accounts/{account_id}/addressing/regional_hostnames/regions"
50+ method = " GET "
51+ />
5252
5353``` json title="Response"
5454{
@@ -72,12 +72,14 @@ curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/addressing/regi
7272
7373<Details header = " Create a new regional hostname entry" >
7474
75- ``` bash title="Request"
76- curl " https://api.cloudflare.com/client/v4/zones/{zone_id}/addressing/regional_hostnames" \
77- --header " Authorization: Bearer <API_TOKEN>" \
78- --header " Content-Type: application/json" \
79- --data ' {"hostname": "ca.regional.ipam.rocks", "region_key": "ca"}' | jq .
80- ```
75+ <APIRequest
76+ path = " /zones/{zone_id}/addressing/regional_hostnames"
77+ method = " POST"
78+ json = { {
79+ hostname: " ca.regional.ipam.rocks" ,
80+ region_key: " ca"
81+ }}
82+ />
8183
8284``` json title="Response"
8385{
@@ -96,10 +98,10 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/addressing/regional_h
9698
9799<Details header = " List all regional hostnames for a zone or get a specific one" >
98100
99- ``` bash title="Request"
100- curl " https://api.cloudflare.com/client/v4/ zones/{zone_id}/addressing/regional_hostnames" \
101- --header " Authorization: Bearer <API_TOKEN> " | jq .
102- ```
101+ < APIRequest
102+ path = " / zones/{zone_id}/addressing/regional_hostnames"
103+ method = " GET "
104+ />
103105
104106``` json title="Response"
105107{
@@ -120,10 +122,10 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/addressing/regional_h
120122
121123<Details header = " List all regional hostnames for a specific zone" >
122124
123- ``` bash title="Request"
124- curl " https://api.cloudflare.com/client/v4/ zones/{zone_id}/addressing/regional_hostnames/ca.regional.ipam.rocks " \
125- --header " Authorization: Bearer <API_TOKEN> " | jq .
126- ```
125+ < APIRequest
126+ path = " / zones/{zone_id}/addressing/regional_hostnames/{hostname} "
127+ method = " GET "
128+ />
127129
128130``` json title="Response"
129131{
@@ -142,13 +144,13 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/addressing/regional_h
142144
143145<Details header = " Patch the region for a specific hostname" >
144146
145- ``` bash title="Request"
146- curl --request PATCH \
147- " https://api.cloudflare.com/client/v4/zones/{zone_id}/addressing/regional_hostnames/ca.regional.ipam.rocks " \
148- --header " Authorization: Bearer <API_TOKEN> " \
149- --header " Content-Type: application/json " \
150- --data ' {"region_key": "eu"} ' | jq .
151- ```
147+ < APIRequest
148+ path = " /zones/{zone_id}/addressing/regional_hostnames/{hostname} "
149+ method = " PATCH "
150+ json = { {
151+ region_key: " eu "
152+ } }
153+ />
152154
153155``` json title="Response"
154156{
@@ -167,11 +169,10 @@ curl --request PATCH \
167169
168170<Details header = " Delete the region configuration" >
169171
170- ``` bash title="Request"
171- curl --request DELETE \
172- " https://api.cloudflare.com/client/v4/zones/{zone_id}/addressing/regional_hostnames/ca.regional.ipam.rocks" \
173- --header " Authorization: Bearer <API_TOKEN>" | jq .
174- ```
172+ <APIRequest
173+ path = " /zones/{zone_id}/addressing/regional_hostnames/{hostname}"
174+ method = " DELETE"
175+ />
175176
176177``` json title="Response"
177178{
0 commit comments