APISIX-MCP

Official
by api7

update_route

Modify specific attributes of an existing route, such as host, methods, plugins, or upstream configuration, to adapt to changing requirements or optimize performance.

Instructions

Update specific attributes of an existing route

Input Schema

NameRequiredDescriptionDefault
idYesroute id
routeYesroute configuration

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "description": "route id", "type": "string" }, "route": { "additionalProperties": true, "description": "route configuration", "properties": { "desc": { "description": "route description", "maxLength": 256, "type": "string" }, "enable_websocket": { "description": "enable websocket", "type": "boolean" }, "filter_func": { "description": "route filter function", "type": "string" }, "host": { "description": "route host", "type": "string" }, "hosts": { "description": "allowed hosts", "items": { "type": "string" }, "type": "array" }, "labels": { "additionalProperties": { "type": "string" }, "description": "route labels", "type": "object" }, "methods": { "description": "allowed HTTP methods", "items": { "enum": [ "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE", "CONNECT", "PURGE" ], "type": "string" }, "type": "array" }, "name": { "description": "route name", "type": "string" }, "plugins": { "additionalProperties": {}, "description": "plugins", "type": "object" }, "priority": { "default": 0, "description": "route priority", "type": "number" }, "remote_addr": { "description": "allowed remote address", "type": "string" }, "remote_addrs": { "description": "allowed remote addresses", "items": { "type": "string" }, "type": "array" }, "script": { "additionalProperties": {}, "description": "route script configuration", "type": "object" }, "service_id": { "description": "service id", "type": "string" }, "service_protocol": { "description": "service protocol", "type": "string" }, "status": { "description": "route status", "enum": [ 0, 1 ], "type": "number" }, "upstream": { "additionalProperties": true, "description": "upstream configuration", "properties": { "checks": { "additionalProperties": false, "description": "health check configuration", "properties": { "active": { "additionalProperties": false, "description": "active health check configuration", "properties": { "healthy": { "additionalProperties": false, "properties": { "interval": { "description": "check interval for healthy status", "type": "number" }, "successes": { "description": "success count threshold", "type": "number" } }, "type": "object" }, "host": { "description": "host for health check", "type": "string" }, "http_path": { "description": "HTTP path for health check", "type": "string" }, "https_verify_certificate": { "description": "verify HTTPS certificate", "type": "boolean" }, "port": { "description": "port for health check", "type": "number" }, "timeout": { "description": "timeout for health check", "type": "number" }, "unhealthy": { "additionalProperties": false, "properties": { "http_failures": { "description": "HTTP failure count threshold", "type": "number" }, "interval": { "description": "check interval for unhealthy status", "type": "number" } }, "type": "object" } }, "type": "object" }, "passive": { "additionalProperties": false, "description": "passive health check configuration", "properties": { "healthy": { "additionalProperties": false, "properties": { "http_statuses": { "description": "HTTP status codes for healthy state", "items": { "type": "number" }, "type": "array" }, "successes": { "description": "success count threshold", "type": "number" } }, "type": "object" }, "unhealthy": { "additionalProperties": false, "properties": { "http_failures": { "description": "HTTP failure count threshold", "type": "number" }, "http_statuses": { "description": "HTTP status codes for unhealthy state", "items": { "type": "number" }, "type": "array" }, "timeout": { "description": "timeout threshold", "type": "number" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "desc": { "description": "upstream description", "maxLength": 256, "type": "string" }, "hash_on": { "description": "hash on type for chash algorithm", "enum": [ "vars", "header", "cookie", "consumer", "vars_combinations" ], "type": "string" }, "keepalive_pool": { "additionalProperties": false, "description": "keepalive pool configuration", "properties": { "idle_timeout": { "default": 60, "description": "idle timeout", "type": "number" }, "requests": { "default": 1000, "description": "requests", "type": "number" }, "size": { "default": 320, "description": "size", "type": "number" } }, "type": "object" }, "key": { "description": "hash key for chash algorithm", "type": "string" }, "labels": { "additionalProperties": { "type": "string" }, "description": "upstream labels", "type": "object" }, "name": { "description": "upstream name", "type": "string" }, "nodes": { "description": "upstream nodes with weights", "items": { "additionalProperties": false, "properties": { "host": { "description": "upstream host", "type": "string" }, "port": { "description": "upstream port", "type": "number" }, "priority": { "description": "upstream priority", "minimum": 0, "type": "number" }, "weight": { "description": "upstream weight", "minimum": 0, "type": "number" } }, "required": [ "host", "port" ], "type": "object" }, "type": "array" }, "pass_host": { "default": "pass", "description": "host passing mode", "enum": [ "pass", "node", "rewrite" ], "type": "string" }, "retries": { "description": "retry count", "minimum": 0, "type": "number" }, "retry_timeout": { "description": "retry timeout", "minimum": 0, "type": "number" }, "scheme": { "default": "http", "description": "upstream scheme", "enum": [ "http", "https", "grpc", "grpcs", "tcp", "tls", "udp", "kafka" ], "type": "string" }, "timeout": { "additionalProperties": false, "description": "timeout configuration", "properties": { "connect": { "description": "connection timeout in seconds", "type": "number" }, "read": { "description": "read timeout in seconds", "type": "number" }, "send": { "description": "send timeout in seconds", "type": "number" } }, "type": "object" }, "tls": { "additionalProperties": false, "description": "TLS configuration", "properties": { "client_cert": { "description": "TLS certificate", "type": "string" }, "client_cert_id": { "description": "TLS certificate id", "items": { "type": "string" }, "type": "array" }, "client_key": { "description": "TLS key", "type": "string" }, "verify": { "description": "TLS verification", "type": "boolean" } }, "type": "object" }, "type": { "default": "roundrobin", "description": "load balancing algorithm", "enum": [ "roundrobin", "chash", "ewma", "least_conn" ], "type": "string" }, "upstream_host": { "description": "upstream host for rewrite mode", "type": "string" } }, "type": "object" }, "upstream_id": { "description": "upstream id", "type": "string" }, "uri": { "description": "route path", "type": "string" }, "uris": { "description": "multiple route paths", "items": { "type": "string" }, "type": "array" }, "vars": { "description": "route match variables", "items": { "type": "array" }, "type": "array" } }, "type": "object" } }, "required": [ "id", "route" ], "type": "object" }
ID: s62o271u37