942
英雄聯盟
修改API__API管理相關接口_API_API 網關-阿裏雲
修改API(ModifyApi)
描述
修改API定義
- 此接口麵向開放API的用戶
- 修改ApiName時需要注意,同一個分組內API不允許重名
- 修改RequestPath時需要注意,同一個分組內Path不允許重複
- 該接口調用的QPS限製為:單用戶QPS不超過50
請求參數
名稱 | 類型 | 是否必須 | 描述 |
---|---|---|---|
Action | String | 是 | 操作接口名,係統規定參數,取值:ModifyApi |
GroupId | String | 是 | 指定的分組編號 |
ApiId | String | 是 | API的Id標識 |
ApiName | String | 是 | API的名稱,組內不允許重複。支持漢字,英文,數字,下劃線,且隻能以英文和漢字開頭,4~50個字符 |
Visibility | String | 是 | API是否公開,目前可以取值:
|
Description | String | 是 | API描述信息,最多180個字符 |
AuthType | String | 是 | API安全認證類型,目前可以取值:
|
OpenIdConnectConfig | String | 是 | 第三方賬號認證OpenID Connect相關配置項,詳情見ApiAttributesType.md#OpenIdConnectConfig |
RequestConfig | String | 是 | Consumer向網關發送API請求的相關配置項,詳情見ApiAttributesType.md#RequestConfig |
ServiceConfig | String | 是 | 網關向後端服務發送API請求的相關配置項,詳情見ApiAttributesType.md#ServiceConfig |
RequestParameters | String | 是 | Consumer向網關發送API請求的參數描述,詳情見ApiAttributesType.md#RequestParameters |
ServiceParameters | String | 是 | 網關向後端服務發送API請求的參數描述,詳情見ApiAttributesType.md#ServiceParameters |
ServiceParametersMap | String | 是 | Consumer向網關發送請求的參數和網關向後端服務發送的請求的參數的映射關係,詳情見ApiAttributesType.md#ServiceParametersMap |
ResultType | String | 是 | 後端服務返回應答的格式,目前可以設置為:JSON、TEXT、BINARY、XML、HTML |
ResultSample | String | 是 | 後端服務返回應答的示例 |
FailResultSample | String | 否 | 後端服務失敗返回應答的示例 |
ErrorCodeSamples | String | 否 | 後端服務返回的錯誤碼示例,詳情見ApiAttributesType.md#ErrorCodeSamples |
返回參數
名稱 | 類型 | 描述 |
---|---|---|
RequestId | String | 本次創建API的請求Id |
示例
請求示例
https://ecs.aliyuncs.com/?Action=ModifyApi
&GroupId=08ae4aa0f95e4321849ee57f4e0b3077
&ApiName=ApiName
&ApiId=8afff6c8c4c6447abb035812e4d66b65
&Visibility=PUBLIC
&Description=Api description
&AuthType=APP
&RequestConfig={"RequestProtocol":"HTTP","RequestHttpMethod":"GET","RequestPath":"/v3/getUserTest/[userId]","BodyFormat":"FORM","PostBodyDescription":""}
&ServiceConfig={"ServiceProtocol":"HTTP","ServiceHttpMethod":"GET","ServiceAddress":"https://www.customerdomain.com","ServiceTimeout":"1000","ServicePath":"/v3/getUserTest/[userId]"}
&RequestParameters=[{"ParameterLocation":{"name":"Head","orderNumber":1},"ParameterType":"Number","Required":"OPTIONAL","isHide":false,"ApiParameterName":"age","DefaultValue":"20","DemoValue":"20","Description":"年齡","MinValue":18,"MaxValue":100,"Location":"Head"},{"ParameterLocation":{"name":"Query","orderNumber":2},"ParameterType":"String","Required":"OPTIONAL","isHide":false,"ApiParameterName":"sex","DefaultValue":"boy","DemoValue":"boy","Description":"性別","EnumValue":"boy,girl","Location":"Query"},{"ParameterLocation":{"name":"Parameter Path","orderNumber":3},"ParameterType":"Number","Required":"REQUIRED","isHide":false,"ApiParameterName":"userId","MaxLength":10,"MinValue":10000000,"MaxValue":100000000,"Location":"Path"},{"ApiParameterName":"CaClientIp","ParameterLocation":{"name":"Head","orderNumber":0},"Location":"Head","ParameterType":"String","Required":"REQUIRED","Description":"客戶端IP"},{"ApiParameterName":"constance","ParameterLocation":{"name":"Head","orderNumber":0},"Location":"Head","ParameterType":"String","Required":"REQUIRED","DefaultValue":"constance","Description":"constance"}]
&ServiceParameters=[{"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=[{"ServiceParameterName":"age","RequestParameterName":"age"},{"ServiceParameterName":"sex","RequestParameterName":"sex"},{"ServiceParameterName":"userId","RequestParameterName":"userId"},{"ServiceParameterName":"clientIp","RequestParameterName":"CaClientIp"},{"ServiceParameterName":"constance","RequestParameterName":"constance"}]
&ResultType=HTML
&ResultSample=200
&<公共請求參數>
返回示例
XML
格式
<ModifyApiResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
</ModifyApiResponse>
JSON
格式
{
"RequestId":"6C87A26A-6A18-4B8E-8099-705278381A2C"
}
最後更新:2016-12-15 09:04:14
上一篇:
刪除域名證書__域名相關接口_API_API 網關-阿裏雲
下一篇:
快速切換API版本__API管理相關接口_API_API 網關-阿裏雲
常見錯誤說明__附錄_大數據計算服務-阿裏雲
發送短信接口__API使用手冊_短信服務-阿裏雲
接口文檔__Android_安全組件教程_移動安全-阿裏雲
運營商錯誤碼(聯通)__常見問題_短信服務-阿裏雲
設置短信模板__使用手冊_短信服務-阿裏雲
OSS 權限問題及排查__常見錯誤及排除_最佳實踐_對象存儲 OSS-阿裏雲
消息通知__操作指南_批量計算-阿裏雲
設備端快速接入(MQTT)__快速開始_阿裏雲物聯網套件-阿裏雲
查詢API調用流量數據__API管理相關接口_API_API 網關-阿裏雲
使用STS訪問__JavaScript-SDK_SDK 參考_對象存儲 OSS-阿裏雲