Domain name for API request: apigateway.tencentcloudapi.com.
This API is used to modify an API. You can call this API to edit/modify a configured API. The modified API takes effect only after its service is published to the corresponding environment again.
A maximum of 20 requests can be initiated per second for this API.
Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: apigateway.ap-shanghai-fsi.tencentcloudapi.com
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common parameter. The value used for this API: ModifyApi. |
Version | Yes | String | Common parameter. The value used for this API: 2018-08-08. |
Region | Yes | String | Common parameter. For more information, please see the list of regions supported by the product. |
ServiceId | Yes | String | Unique service ID of API. |
ServiceType | Yes | String | API backend service type. Valid values: HTTP, MOCK, TSF, CLB, SCF, WEBSOCKET, TARGET (in beta test). |
RequestConfig | Yes | RequestConfig | Request frontend configuration. |
ApiId | Yes | String | Unique API ID. |
ApiName | No | String | Custom API name. |
ApiDesc | No | String | Custom API description. |
ApiType | No | String | API type. Valid values: NORMAL, TSF. Default value: NORMAL. |
AuthType | No | String | API authentication type. Valid values: SECRET, NONE, OAUTH. Default value: NONE. |
AuthRequired | No | Boolean | Whether signature authentication is required. True: yes; False: no. This parameter is to be disused. |
ServiceTimeout | No | Integer | API backend service timeout period in seconds. |
Protocol | No | String | API frontend request type, such as HTTP, HTTPS, or HTTP and HTTPS. |
EnableCORS | No | Boolean | Whether to enable CORS. True: yes; False: no. |
ConstantParameters.N | No | Array of ConstantParameter | Constant parameter. |
RequestParameters.N | No | Array of ReqParameter | Frontend request parameter. |
ApiBusinessType | No | String | This field is valid if AuthType is OAUTH . NORMAL: business API; OAUTH: authorization API. |
ServiceMockReturnMessage | No | String | Returned message of API backend Mock, which is required if ServiceType is Mock . |
MicroServices.N | No | Array of MicroServiceReq | List of microservices bound to API. |
ServiceTsfLoadBalanceConf | No | TsfLoadBalanceConfResp | Load balancing configuration of microservice. |
ServiceTsfHealthCheckConf | No | HealthCheckConf | Health check configuration of microservice. |
TargetServicesLoadBalanceConf | No | Integer | target type load balancing configuration (in beta test). |
TargetServicesHealthCheckConf | No | HealthCheckConf | target health check configuration (in beta test). |
ServiceScfFunctionName | No | String | SCF function name, which takes effect if the backend type is SCF . |
ServiceWebsocketRegisterFunctionName | No | String | SCF WebSocket registration function, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceWebsocketCleanupFunctionName | No | String | SCF WebSocket cleanup function, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceWebsocketTransportFunctionName | No | String | SCF WebSocket transfer function, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceScfFunctionNamespace | No | String | SCF function namespace, which takes effect if the backend type is SCF . |
ServiceScfFunctionQualifier | No | String | SCF function version, which takes effect if the backend type is SCF . |
ServiceWebsocketRegisterFunctionNamespace | No | String | SCF WebSocket registration function namespace, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceWebsocketRegisterFunctionQualifier | No | String | SCF WebSocket transfer function version, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceWebsocketTransportFunctionNamespace | No | String | SCF WebSocket transfer function namespace, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceWebsocketTransportFunctionQualifier | No | String | SCF WebSocket transfer function version, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceWebsocketCleanupFunctionNamespace | No | String | SCF WebSocket cleanup function namespace, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceWebsocketCleanupFunctionQualifier | No | String | SCF WebSocket cleanup function version, which takes effect if the frontend type is WEBSOCKET and the backend type is SCF . |
ServiceScfIsIntegratedResponse | No | Boolean | Whether to enable response integration, which takes effect if the backend type is SCF . |
IsDebugAfterCharge | No | Boolean | Billing after debugging starts (reserved field for marketplace). |
TagSpecifications | No | Tag | Tag. |
IsDeleteResponseErrorCodes | No | Boolean | Whether to delete the error codes for custom response configuration. If the value is left empty or False , the error codes will not be deleted. If the value is True , all custom response configuration error codes of the API will be deleted. |
ResponseType | No | String | Return type. |
ResponseSuccessExample | No | String | Sample response for successful custom response configuration. |
ResponseFailExample | No | String | Sample response for failed custom response configuration. |
ServiceConfig | No | ServiceConfig | API backend service configuration. |
AuthRelationApiId | No | String | Unique ID of associated authorization API, which takes effect only if AuthType is OAUTH and ApiBusinessType is NORMAL . It is the unique ID of the OAuth 2.0 authorization API bound to the business API. |
ServiceParameters.N | No | Array of ServiceParameter | API backend service parameter. |
OauthConfig | No | OauthConfig | OAuth configuration, which takes effect if AuthType is OAUTH . |
ResponseErrorCodes.N | No | Array of ResponseErrorCodeReq | Custom error code configuration. |
Parameter Name | Type | Description |
---|---|---|
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
https://apigateway.tencentcloudapi.com/?Action=ModifyApi
&ServiceId=service-ody35h5e
&ApiId=api-lqd35zzq
&ApiName=xxx
&RequestConfig.Path=/xxxx
&RequestConfig.Method=get
&ServiceType=MOCK
&ServiceMockReturnMessage=test
&<Common request parameters>
{
"Response": {
"RequestId": "6e00553a-8158-4f70-ad43-e1b046af1502"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation.ApiError | API error. |
FailedOperation.ApiInOperation | The API is being manipulated. Please try again later. |
FailedOperation.GetRoleError | Failed to get the role. Please make sure that relevant API Gateway service APIs have been authorized. |
FailedOperation.ServiceError | Service error. |
InternalError.ApigwException | API Gateway internal request error. Please try again later. If the problem persists, please contact the intelligent customer service or submit a ticket. |
InternalError.OssException | OSS internal request error. Please try again. If the problem persists, please contact the intelligent customer service or submit a ticket. |
InternalError.ScfException | SCF internal request error. Please try again. If the problem persists, please contact the smart customer service or submit a ticket. |
InternalError.TsfException | TSF internal request error. Please try again. If the problem persists, please contact the smart customer service or submit a ticket. |
InvalidParameter.FormatError | Incorrect parameter format. |
InvalidParameterValue | The parameter value is incorrect. |
InvalidParameterValue.InvalidBackendPath | The backend service path configuration is incorrect. |
InvalidParameterValue.InvalidClb | Invalid CLB configuration. |
InvalidParameterValue.InvalidConstantParameters | The constant parameter is invalid. |
InvalidParameterValue.InvalidIPAddress | The value of the backend address parameter is incorrect. |
InvalidParameterValue.InvalidMethod | The method is incorrect. Only ANY, BEGIN, GET, POST, DELETE, HEAD, PUT, OPTIONS, TRACE, and PATCH methods are supported. Please modify and try again. |
InvalidParameterValue.InvalidPort | The backend service port is incorrect. |
InvalidParameterValue.InvalidRequestParameters | Invalid request parameter. |
InvalidParameterValue.InvalidServiceConfig | Invalid service configuration. |
InvalidParameterValue.InvalidServiceParam | The parameter configuration is incorrect, as the parameter is not configured in the backend parameter configuration list. |
InvalidParameterValue.InvalidServiceType | The backend service type is incorrect. For backend services in WEBSOCKET type, the frontend protocol should be configured as WEBSOCKET. |
InvalidParameterValue.InvalidWSMethod | The method is incorrect. For backend services in the WEBSOCKET type, the frontend method should be configured as GET. |
InvalidParameterValue.LengthExceeded | The length of the parameter exceeds the limit. |
InvalidParameterValue.LimitExceeded | |
InvalidParameterValue.ParameterNotMatch | The backend parameter configuration is incorrect, as the related frontend parameters are not configured. |
LimitExceeded.ApiCountLimitExceeded | The number of APIs exceeds the limit. |
ResourceNotFound.InvalidApi | Incorrect ApiId . |
UnsupportedOperation.ModifyProtocol | The frontend protocol type cannot be changed. |
Was this page helpful?