@@ -24,79 +24,22 @@ Once your Source Endpoints are added to Endpoint Management, use the following s
2424
2525### Create a route
2626
27- #### Via the Cloudflare dashboard
28-
2927<Render file = " routing" params = { { one: " Create" , two: " route" }} />
3028
31- #### Via the API
32-
33- ``` bash title="cURL command"
34- curl --request PUT " https://api.cloudflare.com/client/v4/zones/{zoneID}/api_gateway/operations/{operationID}/route" \
35- --header " Content-Type: application/json" \
36- --data ' {"route": "https://api.example.com/api/service"}'
37- ```
38-
39- ``` json title="Response"
40- {
41- "result" : {
42- "route" : " https://api.example.com/api/service"
43- },
44- "success" : true ,
45- "errors" : [],
46- "messages" : []
47- }
48- ```
49-
5029<Render file = " routing-path-variables" />
5130
5231### Edit a route
5332
5433<Render file = " routing" params = { { one: " Edit" , two: " routing" }} />
5534
56- ### Verify a Route
57-
58- ``` bash title="cURL command"
59- curl --request GET " https://api.cloudflare.com/client/v4/zones/{zoneID}/api_gateway/operations/{operationID}/route" \
60- --header " Content-Type: application/json"
61- ```
62-
63- ``` json title="Response"
64- {
65- "result" : {
66- "route" : " https://api.example.com/api/service"
67- },
68- "success" : true ,
69- "errors" : [],
70- "messages" : []
71- }
72- ```
73-
7435### Remove a route
7536
76- #### Via the Cloudflare dashboard
77-
78371 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com/ ) and select your account and domain.
79382 . Select ** Security** > ** API Shield** .
80393 . In ** Endpoint Management** , select an existing endpoint and expand its details.
81404 . Under ** Routing** , select ** Edit routing** .
82415 . Select ** Delete route** .
8342
84- #### Via the API
85-
86- ``` bash title="cURL command"
87- curl --request DELETE " https://api.cloudflare.com/client/v4/zones/{zoneID}/api_gateway/operations/{operationID}/route" \
88- --header " Content-Type: application/json"
89- ```
90-
91- ``` json title="Response"
92- {
93- "result" :{},
94- "success" :true ,
95- "errors" :[],
96- "messages" :[]
97- }
98- ```
99-
10043### Test a route
10144
10245After sending a request to your Source Endpoint, you should see the contents of the back-end service as if you called the Target Endpoint directly.
0 commit comments