Hi,

In API Manager when we create an API , we can put more that one resource.
Default they have put a one resource.
*-0 *is the prefix for that, if there are more than one resource then
prefix will grow -1, -2 ...
* *


*Harsha Thirimanna*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
* <http://www.apache.org/>**
email: **[email protected]* <[email protected]>* cell: +94 71 5186770**
twitter: **http://twitter.com/ <http://twitter.com/afkham_azeez>**
harshathirimann
linked-in: **http: <http://lk.linkedin.com/in/afkhamazeez>**//
www.linkedin.com/pub/harsha-thirimanna/10/ab8/122*
*
*
*Lean . Enterprise . Middleware*
*
*


On Sat, Jul 20, 2013 at 12:57 PM, Bhathiya Jayasekara <[email protected]>wrote:

> Hi Lakmali,
>
> On Sat, Jul 20, 2013 at 10:02 PM, Lakmali Baminiwatta <[email protected]>wrote:
>
>> Hi Bhathiya,
>>
>>
>> On 20 July 2013 20:59, Bhathiya Jayasekara <[email protected]> wrote:
>>
>>> Hi devs,
>>>
>>> I want to create an API with both GET and DELETE verbs allowed. I tried
>>> to do it with following request. But it only allows the verb specified in
>>> *resourceMethod-0. *
>>>
>>
>> You can give multiple verbs as a comma seperated string. The 
>> **resourceMethodAuthType-0
>> also needs to be defined accordingly as a comma seperated string with Auth
>> types you want.
>> *
>> *
>> *ex: If you want to create **both resource verbs with Application User
>> Auth type ,
>> *
>> *resourceMethod-0=GET,DELETE&resourceMethodAuthType-0=Application_User,**
>> Application_User
>> *
>>
>
> Thanks for the reply. That worked great.
>
> By the way, what's the meaning of *-0* in *resourceMethod-0*?
> *
> *
> Thanks.
> --Bhathiya
>
>
>
>> *
>> *
>> I will update the document for multiple verb case as well. *
>> *
>> *
>> *
>> Thanks,
>> Lakmali*
>> *
>> *
>> *
>> *
>> *
>>
>>>
>>> *POST http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag*
>>> *
>>> *
>>> *POST data:*
>>> *action=addAPI&name=xx&context=/xx&version=1.0.0&description=This API
>>> has been added by Jmeter 
>>> Test&visibility=public&endpoint=127.0.0.1:6789&tags=finder,open,social&tier=Unlimited&tiersCollection=Unlimited,Gold&resourceCount=0&endpointType=nonsecured&resourceTemplate=/*&resourceMethod-0=DELETE&uriTemplate-0=/*&resourceMethodAuthType-0=Application
>>> User&uriTemplate-1=/*&resourceMethod-1=GET&resourceMethodAuthType-1=Application
>>> User&addNewAPIButton=Create&roles=public*
>>> *
>>> *
>>> *Cookie Data:*
>>> *$Version=0; JSESSIONID=B72F44E85F3129EF5A08DF09E05F60DC;
>>> $Path=/publisher/*
>>> *
>>> *
>>> *Request Headers:*
>>> *Content-Length: 469*
>>> *Connection: keep-alive*
>>> *Content-Type: application/x-www-form-urlencoded*
>>> *
>>> *
>>> Am I doing something wrong here? Please advise.
>>> *
>>> *
>>> *Thanks.*
>>>
>>> --
>>> *Bhathiya Jayasekara*
>>> *Software Engineer,*
>>> *WSO2 inc., http://wso2.com*
>>> *
>>> *
>>> *Phone: +94715478185*
>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj*
>>> *Twitter: https://twitter.com/bhathiyax*
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Lakmali Baminiwatta*
>> *
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean.enterprise.middleware
>> mobile:  +94 71 2335936
>> blog : lakmali.com
>> *
>> *
>>
>
>
>
> --
> *Bhathiya Jayasekara*
> *Software Engineer,*
> *WSO2 inc., http://wso2.com*
> *
> *
> *Phone: +94715478185*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj*
> *Twitter: https://twitter.com/bhathiyax*
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to