繁体   English   中英

如何在WSO2 API Manager 1.8中使用查询参数?

[英]How to Use Query Params With WSO2 API Manager 1.8?

我正在使用Wso2 API管理器1.8。 我创建了一个API http://example.com:8280/api/test/v1/user/ {userId} /content.json,这里的userID值是动态生成的。正常的API调用工作正常,即

http://example.com:8280/api/test/v1/user  /200/content.json ,I am   
getting the results fine.Now I want to apply pagination. I am passing   
some query-params with this ,ie http://example.com:8280/api/test/v1/user
/200/content.json?startIndex=0&count=1

But 403 forbidden error coming .  
<ams:fault>
     <ams:code>900906</ams:code>
    <ams:message>No matching resource found in the API for the given 
    request</ams:message>
    <ams:description>Access failure for API: /api/streams, version: v3 
     with key: b3672a32d5b152a979cc36cb4de7f9b</ams:description>

为什么会这样?

Here is my api xml source code .   
<resource methods="OPTIONS POST GET"
         uri-template="/user/{userId}/content.json"
         faultSequence="fault">
  <inSequence>

我该如何解决问题。 请提出一些解决方案

这里的问题是您的URL与资源模式不匹配。 查看此帖子以获取样本

感谢所有人的答复。 我已经得到了答案。 在创建API时在资源末尾提供*,即/user/{userId}/content.json*。 然后,它将接受您在结尾处给出的任何内容(也一无所获)。

在此处输入图片说明

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM