@@ -24,22 +24,79 @@ 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+
2729<Render file = " routing" params = { { one: " Create" , two: " route" }} />
2830
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+
2950<Render file = " routing-path-variables" />
3051
3152### Edit a route
3253
3354<Render file = " routing" params = { { one: " Edit" , two: " routing" }} />
3455
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+
3574### Remove a route
3675
76+ #### Via the Cloudflare dashboard
77+
37781 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com/ ) and select your account and domain.
38792 . Select ** Security** > ** API Shield** .
39803 . In ** Endpoint Management** , select an existing endpoint and expand its details.
40814 . Under ** Routing** , select ** Edit routing** .
41825 . Select ** Delete route** .
4283
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+
43100### Test a route
44101
45102After 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