Publishes HTTP APIs, including routes for REST and HTTP APIs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:DeployHttpApi |
none |
*HttpApi
|
None | None |
Request syntax
POST /v1/http-apis/{httpApiId}/deploy HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| httpApiId |
string |
No |
The unique identifier of the HTTP API. |
api-cr68g1dlhtgm31fb*** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| routeId |
string |
No |
The route ID. Required when deploying a route for an HTTP API. |
hr-cr82undlhtgrl*** |
| restApiConfig |
object |
No |
The REST API deployment configuration. Required when deploying an HTTP API as a REST API. |
|
| revisionId |
string |
No |
The revision ID. If specified, the deployment uses the configuration from that revision. |
apr-xxx |
| description |
string |
No |
The deployment description. |
用户服务API发布。 |
| environment |
object |
No |
The deployment environment configuration. |
|
environmentId
deprecated
|
string |
No |
The environment ID. |
env-cpqnr6tlhtgubc*** |
| customDomainIds |
array |
No |
A list of custom domain IDs. |
|
|
string |
No |
The domain ID. |
d-cr62ts5lhtgln*** |
|
backendScene
deprecated
|
string |
No |
The API deployment scenario. Valid values:
|
SingleService |
serviceConfigs
deprecated
|
array<object> |
No |
The service configurations. Specify a single configuration for a single service deployment, or multiple configurations for canary release by ratio and canary release by content. |
|
|
object |
No |
The service configuration. |
||
| serviceId |
string |
No |
The service ID. |
svc-cr6pk4tlhtgm58e*** |
| protocol |
string |
No |
The service protocol:
Valid values:
|
HTTP |
| port |
integer |
No |
The service port. Omit this parameter when using a dynamic port. |
8080 |
| weight |
integer |
No |
The weight. An integer from 1 to 100. Used only for the canary release by ratio scenario. |
49 |
| version |
string |
No |
The service version. |
v1 |
| match | HttpApiBackendMatchConditions |
No |
The match conditions for routing requests to this service configuration. This parameter is applicable only to the canary release by content scenario. |
{\"change_order_revision\":\"3.657.33_fc-hz-yunqi.1662568293908382_faas-eerouter\"} |
operationIds
deprecated
|
array |
No |
The operation IDs. |
|
|
string |
No |
An operation ID. |
xxxxxx |
|
| gatewayId |
string |
No |
The gateway ID. |
gw-cvn2u46m1hkun04oll8g |
| operationDeployments |
array<object> |
No |
A list of operation-level deployment configurations. |
|
|
object |
No |
An operation-level deployment configuration. |
||
| operationId |
string |
No |
The operation ID. |
op-xxx |
| action |
string |
No |
The action type. |
Publish |
httpApiConfig
deprecated
|
object |
No |
The HTTP API deployment configuration. |
|
| gatewayId |
string |
No |
The gateway ID. |
gw-csrhgfmm1hknf0hu6o3g |
| routeIds |
array |
No |
The route IDs. |
|
|
string |
No |
A route ID. |
xxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| requestId |
string |
The unique identifier for the request. |
0C2D1C68-0D93-5561-8EE6-FDB7BF067A30 |
| code |
string |
The status code of the response. |
Ok |
| message |
string |
The response message. |
success |
| data |
object |
||
| httpApiId |
string |
Examples
Success response
JSON format
{
"requestId": "0C2D1C68-0D93-5561-8EE6-FDB7BF067A30",
"code": "Ok",
"message": "success",
"data": {
"httpApiId": ""
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.