Updates a route of an HttpApi.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:UpdateHttpApiRoute |
none |
*HttpApi
|
None | None |
Request syntax
PUT /v1/http-apis/{httpApiId}/routes/{routeId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| httpApiId |
string |
No |
The ID of the HTTP API to which the route belongs. |
api-cqoub6tlhtgvof7*** |
| routeId |
string |
No |
The route ID. |
hr-cr82undlhtgrl*** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| domainIds |
array |
No |
The list of domain name IDs. |
|
|
string |
No |
The domain name ID. |
d-cr62ts5lhtgln*** |
|
| match | HttpRouteMatch |
No |
The route match rule. |
|
| backendConfig |
object |
No |
The backend service configuration of the route. |
|
| scene |
string |
No |
The backend service scenario. Valid values:
|
SingleService |
| services |
array<object> |
No |
The list of backend services. |
|
|
object |
No |
The backend service. |
||
| serviceId |
string |
No |
The service ID. |
svc-cr6pk4tlhtgm58e*** |
| protocol |
string |
No |
The service protocol. Valid values:
Valid values:
|
HTTP |
| version |
string |
No |
The service version. |
v1 |
| weight |
integer |
No |
The percentage value of the traffic ratio. |
49 |
| port |
integer |
No |
The service port. Do not specify this parameter for dynamic ports. |
8080 |
| environmentId |
string |
No |
The environment ID. |
env-cquqsollhtgid*** |
| description |
string |
No |
The route description. |
商品中心服务路由 |
| mcpRouteConfig |
object |
No |
The MCP route configuration. |
|
| protocol |
string |
No |
The MCP protocol. |
SSE |
| exposedUriPath |
string |
No |
The exposed URI path. |
/mcp/chat |
| mcpStatisticsEnable |
boolean |
No |
Specifies whether to enable MCP statistics. |
true |
| policyConfigs |
array |
No |
The route-level policy configurations. |
|
| HttpApiPolicyConfigs |
No |
object |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| requestId |
string |
The request ID. |
CBEEB8C1-108E-50F0-9BEA-DED79553C309 |
| code |
string |
The response status code. |
Ok |
| message |
string |
The response message. |
success |
Examples
Success response
JSON format
{
"requestId": "CBEEB8C1-108E-50F0-9BEA-DED79553C309",
"code": "Ok",
"message": "success"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.