首页 文章

WSO2 API管理器(1.9)发布者API - 无法使用“updateApi”操作更新查询参数

提问于
浏览
0

WSO2 API管理器(1.9)发布者API - 无法使用“Update Api”操作更新查询参数 .

我通过在请求中指定swagger,使用WSO2 API管理器(1.9)Publisher API“Add API”创建了一个API . 它为每个uritemplate提供了大量的头和查询参数 .

当我尝试使用Publisher APIs更新相同的API时,我找不到任何指定参数( Headers /查询)的选项 . 这个“Update Api”动作允许添加招摇定义 .

有人可以帮我吗?

有没有办法在使用Publisher APIs更新API时为每个URITemplate指定参数( Headers /查询)?

1 回答

  • 0

    您可以使用以下curl命令添加和更新带有查询参数的API .

    ADD API

    curl -X POST -b cookies http:// localhost:9763 / publisher / site / blocks / item-add / ajax / add.jag -d“action = addAPI&name = PhoneVerification&context = / phoneverify&version = 1.0.0&visibility = public&thumbUrl =&description =验证电话号码和标签=电话,移动电话,多媒体和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”:{}},“参数”:[{“name”:“PhoneNumber”,“paramType”:“que ry“,”required“:false,”type“:”string“,”description“:”Phone Number“,”in“:”query“},{”name“:”LicenseKey“,”paramType“:”query “,”“required”:false,“type”:“string”,“description”:“License Key”,“in”:“query”}]}},“/”:{“put”:{“response” :{“200”:{}}},“get”:{“response”:{“200”:{}}}}},“swagger”:“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“action = updateAPI&name = PhoneVerification&context = / phoneverify&version = 1.0.0&visibility = public&thumbUrl =&description =验证电话号码和标签=电话,移动电话,多媒体和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”:{}},“参数”:[{“name”:“PhoneNumberCHANGED”,“paramTy pe“:”query“,”required“:false,”type“:”string“,”description“:”Phone Number“,”in“:”query“},{”name“:”LicenseKeyCHANGED“,”paramType “:”query“,”required“:false,”type“:”string“,”description“:”License Key“,”in“:”query“}]}},”/“:{”put“: {“回复”:{“200”:{}}},“获取”:{“回复”:{“200”:{}}}}},“swagger”:“2.0”,“securityDefinitions”:{“ apim“:{”x-wso2-scopes“:[{”description“:”“,”name“:”read_number“,”roles“:”admin“,”key“:”read_number“}]}},” info“:{”title“:”PhoneVerification“,”version“:”1.0.0“}}'

相关问题