PRASANTHMV
PRASANTHMV

Reputation: 299

How to Use Query Params With WSO2 API Manager 1.8?

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

Upvotes: 0

Views: 1104

Answers (2)

PRASANTHMV
PRASANTHMV

Reputation: 299

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).

enter image description here

enter image description here

Upvotes: 0

Ratha
Ratha

Reputation: 9702

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

Upvotes: 1

Related Questions