You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Udara Liyanage <ud...@wso2.com> on 2014/12/02 08:28:34 UTC

What is the use of /init in Rest API

Hi,

What is the use of following init().

@GET
@Path("/init")
@AuthorizationAction("/permission/admin/restlogin")
public Response initialize()
        throws RestAPIException {
    StratosApiResponse response = new StratosApiResponse();
    response.setMessage("Successfully authenticated");
    return Response.ok(response).build();
}


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: What is the use of /init in Rest API

Posted by Mariangela Hills <ma...@wso2.com>.
+1 It will be very useful to others if there were comments for each method.
In fact, I raised a JIRA [1] regarding this recently.

[1] https://issues.apache.org/jira/browse/STRATOS-987

Regards,
Mariangela




*--*
Mariangela Hills
Senior Technical Writer

*WSO2, Inc.*lean.enterprise.middleware.
w: http://wso2.com
<http://wso2.com/events/>

On Wed, Dec 3, 2014 at 11:44 AM, Isuru Perera <is...@wso2.com> wrote:

> Hi,
>
> On Tue, Dec 2, 2014 at 2:21 PM, Manula Chathurika Thantriwatte <
> manulac@wso2.com> wrote:
>
>> Hi,
>>
>> Yes, it used to validate Stratos Manager URL in CLI.
>>
> Please add some comments to the methods.
>
>>
>> Thanks !
>>
>> On Tue, Dec 2, 2014 at 1:07 PM, Shiroshica Kulatilake <sh...@wso2.com>
>> wrote:
>>
>>> I think this is used by CLI to validate stratos manager url
>>>
>>> On Tue, Dec 2, 2014 at 12:58 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> What is the use of following init().
>>>>
>>>> @GET
>>>> @Path("/init")
>>>> @AuthorizationAction("/permission/admin/restlogin")
>>>> public Response initialize()
>>>>         throws RestAPIException {
>>>>     StratosApiResponse response = new StratosApiResponse();
>>>>     response.setMessage("Successfully authenticated");
>>>>     return Response.ok(response).build();
>>>> }
>>>>
>>>>
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>> Shiroshica Kulatilake
>>>
>>> Architect,
>>> WSO2, Inc. http://wso2.com/
>>> Phone: +94 776523867
>>>
>>
>>
>>
>> --
>> Regards,
>> Manula Chathurika Thantriwatte
>> Software Engineer
>> WSO2 Inc. : http://wso2.com
>> lean . enterprise . middleware
>>
>> email : manulac@wso2.com / manula@apache.org
>> phone : +94 772492511
>> blog : http://manulachathurika.blogspot.com/
>>
>>
>>
>>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>

Re: What is the use of /init in Rest API

Posted by Isuru Perera <is...@wso2.com>.
Hi,

On Tue, Dec 2, 2014 at 2:21 PM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Hi,
>
> Yes, it used to validate Stratos Manager URL in CLI.
>
Please add some comments to the methods.

>
> Thanks !
>
> On Tue, Dec 2, 2014 at 1:07 PM, Shiroshica Kulatilake <sh...@wso2.com>
> wrote:
>
>> I think this is used by CLI to validate stratos manager url
>>
>> On Tue, Dec 2, 2014 at 12:58 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> What is the use of following init().
>>>
>>> @GET
>>> @Path("/init")
>>> @AuthorizationAction("/permission/admin/restlogin")
>>> public Response initialize()
>>>         throws RestAPIException {
>>>     StratosApiResponse response = new StratosApiResponse();
>>>     response.setMessage("Successfully authenticated");
>>>     return Response.ok(response).build();
>>> }
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> Shiroshica Kulatilake
>>
>> Architect,
>> WSO2, Inc. http://wso2.com/
>> Phone: +94 776523867
>>
>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: What is the use of /init in Rest API

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

Thanks Shiro and Manula

On Tue, Dec 2, 2014 at 2:21 PM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Hi,
>
> Yes, it used to validate Stratos Manager URL in CLI.
>
> Thanks !
>
> On Tue, Dec 2, 2014 at 1:07 PM, Shiroshica Kulatilake <sh...@wso2.com>
> wrote:
>
>> I think this is used by CLI to validate stratos manager url
>>
>> On Tue, Dec 2, 2014 at 12:58 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> What is the use of following init().
>>>
>>> @GET
>>> @Path("/init")
>>> @AuthorizationAction("/permission/admin/restlogin")
>>> public Response initialize()
>>>         throws RestAPIException {
>>>     StratosApiResponse response = new StratosApiResponse();
>>>     response.setMessage("Successfully authenticated");
>>>     return Response.ok(response).build();
>>> }
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> Shiroshica Kulatilake
>>
>> Architect,
>> WSO2, Inc. http://wso2.com/
>> Phone: +94 776523867
>>
>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: What is the use of /init in Rest API

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi,

Yes, it used to validate Stratos Manager URL in CLI.

Thanks !

On Tue, Dec 2, 2014 at 1:07 PM, Shiroshica Kulatilake <sh...@wso2.com>
wrote:

> I think this is used by CLI to validate stratos manager url
>
> On Tue, Dec 2, 2014 at 12:58 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> What is the use of following init().
>>
>> @GET
>> @Path("/init")
>> @AuthorizationAction("/permission/admin/restlogin")
>> public Response initialize()
>>         throws RestAPIException {
>>     StratosApiResponse response = new StratosApiResponse();
>>     response.setMessage("Successfully authenticated");
>>     return Response.ok(response).build();
>> }
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> Shiroshica Kulatilake
>
> Architect,
> WSO2, Inc. http://wso2.com/
> Phone: +94 776523867
>



-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: What is the use of /init in Rest API

Posted by Shiroshica Kulatilake <sh...@wso2.com>.
I think this is used by CLI to validate stratos manager url

On Tue, Dec 2, 2014 at 12:58 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> What is the use of following init().
>
> @GET
> @Path("/init")
> @AuthorizationAction("/permission/admin/restlogin")
> public Response initialize()
>         throws RestAPIException {
>     StratosApiResponse response = new StratosApiResponse();
>     response.setMessage("Successfully authenticated");
>     return Response.ok(response).build();
> }
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Shiroshica Kulatilake

Architect,
WSO2, Inc. http://wso2.com/
Phone: +94 776523867