Modifies the definition of an API.
Operation description
This operation is intended for API providers.
- This API operation requires a full update. Updates of partial parameters are not supported.
- When you modify an API name, make sure that the name of each API within the same group is unique.
- When you modify the request path, make sure that each request path within the same group is unique.
- The QPS limit on this operation is 50 per user.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| apigateway:ModifyApi | update | *ApiGroup acs:apigateway:{#regionId}:{#accountId}:apigroup/{#GroupId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| GroupId | string | Yes | The ID of the API group. | 927d50c0f2e54b359919923d908bb015 |
| ApiId | string | Yes | The ID of the API. | 8afff6c8c4c6447abb035812e4d66b65 |
| ApiName | string | Yes | The name of the API. The name must be unique within the API group. The name must be 4 to 50 characters in length. It must start with a letter and can contain letters, digits, and underscores (_). | ApiName |
| Description | string | No | The description of the API. The description can be up to 180 characters in length. | Api description |
| Visibility | string | Yes | Specifies whether the API is public. Valid values:
| PUBLIC |
| AuthType | string | No | The configuration items of API requests sent by the consumer to API Gateway. | APP |
| RequestConfig | string | Yes | The configuration items of API requests sent by API Gateway to the backend service. | {"RequestProtocol":"HTTP","RequestHttpMethod":"GET","RequestPath":"/v3/getUserTest/[userId]","BodyFormat":"FORM","PostBodyDescription":""} |
| ServiceConfig | string | Yes | The parameters of API requests sent by the consumer to API Gateway. | {"ServiceProtocol":"HTTP","ServiceHttpMethod":"GET","ServiceAddress":"http://www.customerdomain.com","ServiceTimeout":"1000","ServicePath":"/v3/getUserTest/[userId]"} |
| RequestParameters | string | No | The parameters of API requests sent by the consumer to API Gateway. For more information, see RequestParameter . | \[{\\"ParameterName\\": \\"CaAppId\\", \\"Location\\": \\"HEAD\\", \\"ServiceParameterName\\": \\"x-ca-appid\\"}] |
| SystemParameters | string | No | The system parameters sent by API Gateway to the backend service. | [{\"ParameterName\": \"CaAppId\", \"Location\": \"HEAD\", \"ServiceParameterName\": \"x-ca-appid\"}] |
| ConstantParameters | string | No | The constant parameters sent by API Gateway to the backend service. | [{\"ServiceParameterName\":\"HOST\",\"ConstantValue\":\"uat-cgi.smarket.net.cn\",\"Location\":\"HEAD\",\"Description\":\"\\u540e\\u7aefVPC-HOST\"}] |
| ServiceParameters | string | No | The parameters of API requests sent by API Gateway to the back-end service. For more information, see ServiceParameter . | [{"ServiceParameterName":"age","Location":"Head","Type":"Number","ParameterCatalog":"REQUEST"},{"ServiceParameterName":"sex","Location":"Query","Type":"String","ParameterCatalog":"REQUEST"},{"ServiceParameterName":"userId","Location":"Path","Type":"Number","ParameterCatalog":"REQUEST"},{"ServiceParameterName":"clientIp","Location":"Head","Type":"String","ParameterCatalog":"SYSTEM"},{"ServiceParameterName":"constance","Location":"Head","Type":"String","ParameterCatalog":"CONSTANT"}] |
| ServiceParametersMap | string | No | The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the back-end service. For more information, see ServiceParameterMap . | [{"ServiceParameterName":"age","RequestParameterName":"age"},{"ServiceParameterName":"sex","RequestParameterName":"sex"},{"ServiceParameterName":"userId","RequestParameterName":"userId"},{"ServiceParameterName":"clientIp","RequestParameterName":"CaClientIp"},{"ServiceParameterName":"constance","RequestParameterName":"constance"}] |
| ResultType | string | Yes | The sample response from the backend service. | HTML |
| ResultSample | string | Yes | The sample response that is returned from the backend service. This value is used only to generate documents. It does not affect the actually returned result. | 200 |
| FailResultSample | string | No | The sample error response from the backend service. This value is used only to generate documents. It does not affect the returned result. | {"errorCode":"fail","errorMessage":"param invalid"} |
| ErrorCodeSamples | string | No | The sample error codes returned by the backend service. For more information, see ErrorCodeSample . | [{"Code":"400","Message":"Missing the userId","Description":"param invalid"}] |
| ResultDescriptions | string | No | The descriptions of API responses. | [] |
| OpenIdConnectConfig | string | No | The client-side request signature method of the API. Valid values:
| {\"OpenIdApiType\":\"IDTOKEN\",\"PublicKey\":\"lzlj1573\",\"IdTokenParamName\":\"\",\"PublicKeyId\":\"lzljorders\"} |
| AllowSignatureMethod | string | No | The type of the two-way communication API. Valid values:
| HmacSHA256 |
| WebSocketApiType | string | No | The returned description of the API. | COMMON |
| ResultBodyModel | string | No |
| {} |
| ForceNonceCheck | boolean | No |
Note
If you do not set this parameter, the original value is used.
| true |
| DisableInternet | boolean | No | The AppCode authentication type supported. Valid values:
| true |
| AppCodeAuthType | string | No | The ID of the backend service. | DEFAULT |
| BackendId | string | No | Specifies whether to enable backend services. | 0d105f80a8f340408bd34954d4e4ff22 |
| BackendEnable | boolean | No | Configuration Mode | true |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "6C87A26A-6A18-4B8E-8099-705278381A2C"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-01-26 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
