Problem deleting routes - version": "0.13.1"

HI.
I have a problem Deleting a route using it’s id:

curl -X GET localhost:8001/services/example-service/routes | python -m json.tool
{
“data”: [
{
“created_at”: 1524798428,
“hosts”: [
example.com
],
“id”: “c9f10c22-08ab-483d-a2b0-64f051b05671”,
“methods”: null,
“paths”: null,
“preserve_host”: false,
“protocols”: [
“http”,
“https”
],
“regex_priority”: 0,
“service”: {
“id”: “dd0c6dd3-0e54-467f-b1fd-0144ac171036”
},
“strip_path”: true,
“updated_at”: 1524798428
}
],
“next”: null
}

curl -i -X DELETE “http://localhost:8001/services/example-service/routes/c9f10c22-08ab-483d-a2b0-64f051b05671

HTTP/1.1 404 Not Found
Date: Thu, 26 Apr 2018 22:27:25 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
Server: kong/0.13.1

{“message”:“Not found”}

any help?

I don’t think this endpoint is documented anywhere? Issue that DELETE requests on :8001/routes/:route_id instead

That’s right
the correct endpoint is

curl -i -X DELETE “http://localhost:8001/routes/c9f10c22-08ab-483d-a2b0-64f051b05671

Best

@Juan_Carlos_Mendez_M we decided that we don’t want to go too deep. So we decided that these are enough:

  • /routes (POST | GET)
  • /routes/<uuid> (GET | PUT | PATCH | DELETE) (PUT is only in next branch)
  • /routes/<uuid>/service (GET | PUT | PATCH | DELETE) (PUT is only in next branch and allows only updating, slightly different than PATCH which allows partial updating)

And similar to services:

  • /services (POST | GET)
  • /services/<uuid> (GET | PUT | PATCH | DELETE) (PUT is only in next branch)
  • /services/<uuid>/routes (POST | GET) (service is automatically attached to route)
  • /services/<name> (GET | PUT | PATCH | DELETE) (PUT is only in next branch)
  • /services/<name>/routes (POST | GET) (service is automatically attached to route)

Going deeper didn’t make a lot of sense.

1 Like