How to Use Query Params With WSO2 API Manager 1.8?

十年热恋 提交于 2019-12-12 01:55:05

问题


I am using Wso2 API manager 1.8 . I have created one API http://example.com:8280/api/test/v1/user/{userId}/content.json , Here userID value Coming dynamically .Normal API call working fine , ie

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>

Why this happening ?.

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

How can I solve the Problem. Please suggest some solution


回答1:


Issue here is your URL does not match with resource pattern. Check this post for a sample




回答2:


Thanks to all for reply. I have got the answer for this. Give * at the end of resource i.e. /user/{userId}/content.json* at the time when you create the API. Then it will accecpt anything you give at the end of that (also for nothing).



来源:https://stackoverflow.com/questions/28424387/how-to-use-query-params-with-wso2-api-manager-1-8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!