hahayyum commented on issue #7949:
URL: https://github.com/apache/apisix/issues/7949#issuecomment-1275502060

   @kingluo 
   It does not call the get route interface in the admin api.
   steps:
   1、create route
   upstreamid = random_string_generator(12, string.ascii_letters)
   curl http://ipl:9180/apisix/admin/upstreams/upstreamid    -X PUT -H 
'X-API-KEY: {}' -i -d 
   {"scheme": "http",
       "nodes": [
           {{
               "host": "10.33.30.31",
               "weight": 100,
               "priority": 0,
               "port": 8001
           }}
       ],
       "pass_host": "pass",
       "desc": "Created by apisix-ingress-controller, DO NOT modify it 
manually",
       "name": "ns_deployment1_8001",
       "hash_on": "vars",
       "labels": {
          "managed-by": "apisix-ingress-controller"
        },
       "type": "roundrobin"
   }
   randomId = random_string_generator(12, string.ascii_letters)
   randomPath = random_string_generator(6, string.ascii_letters)
   curl http://ip:9180/apisix/admin/routes/randomId  -X PUT -H 'X-API-KEY: {}' 
-i -d
   {"uris": ["/http/randomPath ","/http/randomPath/*"],
       "priority": 0,
       "name": "http-test",
       "status": 1,
       "upstream_id": "upstreamid ",
       "labels": {
       "svcPort": "8001", "sourceName": "deployment1", "serviceName": 
"deployment1", "sourceType": "ingress", "managed-by": 
"apisix-ingress-controller", "path": "/http/randomPath"}
       }
   
   2、Request url address
   curl http://ip:9080/http/randomPath
   
   3、delete route & delete upstream (Simple examples)
   curl http://ip:9180/apisix/admin/upstreams/upstreamid    -X DELETE -H 
'X-API-KEY: {}'
   curl http://ip:9180/apisix/admin/routes/randomId  -X DELETE -H 'X-API-KEY: 
{}'
   
   Note: Ensure that the values of upstream, randomId and randomPath change 
each time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to