2015-02-10 31 views
0

我正在使用Wso2 API管理器1.8。我已創建了一個API http://example.com:8280/api/test/v1/user/ {} userId的/content.json, 這裏用戶ID值即將動態。正常API調用做工精細,即如何使用WSO2 API Manager 1.8使用查詢參數?

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> 

我該如何解決這個問題。請建議一些解決方案

回答

1

這裏的問題是你的URL與資源模式不匹配。 查詢post樣本

0

感謝所有的答覆。我已經得到了答案。在創建API時,在資源的末尾添加*,即/user/{userId}/content.json*。然後,它會接受你在最後給予的任何東西(也沒有)。

enter image description here

enter image description here

+0

你真幸運路徑參數後,有 「/content.json」。 URL模式「/ user/{userId} *」不適用於URL/user/200和/ user/200?startIndex = 0&count = 1。來自WSO2的任何人都想分享他們的意見? – 2015-06-04 13:31:41

相關問題