WSO2 API管理器(1.9)发布商API - 无法使用" Update Api"更新查询参数动作。
我使用WSO2 API管理器创建了一个API(1.9)Publisher API" Add API"通过在请求中指定swagger。它为每个uritemplate提供了大量的头和查询参数。
当我尝试使用Publisher APIs更新相同的API时,我找不到任何指定参数(标题/查询)的选项。这" Update Api"动作允许添加招摇定义。
有人可以帮我吗?
有没有办法在使用Publisher APIs更新API时为每个URITemplate指定参数(标题/查询)?
答案 0 :(得分:0)
您可以使用以下curl命令添加和更新带有查询参数的API。
ADD API
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d “动作= addAPI&安培;名称= PhoneVerification&安培;上下文= / phoneverify&安培;版本= 1.0.0&安培;能见度=公共&安培; thumbUrl =安培;描述=验证 一部手机 数量和放大器;标签=电话,移动,多媒体和放大器; endpointType =不安全和放大器; tiersCollection =金,青铜和放大器; http_checked = HTTP和放大器; https_checked = HTTPS和放大器; default_version_checked = default_version和放大器; bizOwner = XX和放大器; bizOwnerMail=xx@ee.com& techOwner = XX和放大器; techOwnerMail = ggg@ww.com” -d'enerpoint_config = {“production_endpoints”:{“url”:“http://ws.cdyne.com/phoneverify/phoneverify.asmx”,“config”:null},“endpoint_type”:“http”}' -d'swagger = {“paths”:{“/ CheckPhoneNumber”:{“post”:{“x-auth-type”:“Application%20%26%20Application%20User”,“x-scope”:“read_number ” “x-throttling-tier”:“无限制”,“回复”:{“200”:{}}},“获取” :{“x-auth-type”:“应用程序%20%26%20Application%20User”, “x-throttling-tier”:“无限制”,“回应”:{“200”:{}}, “parameters”:[{“name”:“PhoneNumber”,“paramType”:“query”, “required”:false,“type”:“string”,“description”:“电话号码”, “in”:“query”},{“name”:“LicenseKey”,“paramType”:“query”, “required”:false,“type”:“string”,“description”:“License Key”, “in”:“query”}]}},“/”:{“put”:{“answers”:{“200”:{}}},“get” :{“回复”:{“200”:{}}}}},“招摇”:“2.0”, “securityDefinitions”:{“apim”:{“x-wso2-scopes”:[{“description”: “”,“name”:“read_number”,“roles”:“admin”,“key”: “read_number”}]}},“info”:{“title”:“PhoneVerification”,“version” :“1.0.0”}}'
`
更新API
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d “动作= updateAPI&安培;名称= PhoneVerification&安培;上下文= / phoneverify&安培;版本= 1.0.0&安培;能见度=公共&安培; thumbUrl =安培;描述=验证 一部手机 数量和放大器;标签=电话,移动,多媒体和放大器; endpointType =不安全和放大器; tiersCollection =金,青铜和放大器; http_checked = HTTP和放大器; https_checked = HTTPS和放大器; default_version_checked = default_version和放大器; bizOwner = XX和放大器; bizOwnerMail=xx@ee.com& techOwner = XX和放大器; techOwnerMail = ggg@ww.com” -d'enerpoint_config = {“production_endpoints”:{“url”:“http://ws.cdyne.com/phoneverify/phoneverify.asmx”,“config”:null},“endpoint_type”:“http”}' -d'swagger = {“paths”:{“/ CheckPhoneNumber”:{“post”:{“x-auth-type”:“Application%20%26%20Application%20User”,“x-scope”:“read_number ” “x-throttling-tier”:“无限制”,“回复”:{“200”:{}}},“获取” :{“x-auth-type”:“应用程序%20%26%20Application%20User”, “x-throttling-tier”:“无限制”,“回应”:{“200”:{}}, “parameters”:[{“name”:“PhoneNumberCHANGED”,“paramType”:“query”, “required”:false,“type”:“string”,“description”:“电话号码”, “in”:“query”},{“name”:“LicenseKeyCHANGED”,“paramType”:“query”, “required”:false,“type”:“string”,“description”:“License Key”, “in”:“query”}]}},“/”:{“put”:{“answers”:{“200”:{}}},“get” :{“回复”:{“200”:{}}}}},“招摇”:“2.0”, “securityDefinitions”:{“apim”:{“x-wso2-scopes”:[{“description”: “”,“name”:“read_number”,“roles”:“admin”,“key”: “read_number”}]}},“info”:{“title”:“PhoneVerification”,“version” :“1.0.0”}}'