Disable a Route with Kong API Gateway

We have a service pointing to the backend in the Kong API Gateway. And each service has multiple routes associated with it.

I would like to disable/enable individual Routes in Production. Looking at the Admin API documentation, ‘Update Route’ API does not have any property to disable/enable the route.

Hi,
The way that I would do it :
Put the request-termination plugins on each route that you want to disable/enable.
And then PATCH the plugins with enabled=false (for route enabled) or enabled=true (for route disabled).
You can configure the request-termination plugins with http code and message that you want to return when you consider that a route is disabled. (cf. https://docs.konghq.com/hub/kong-inc/request-termination/)

Thanks Yohann :slight_smile: