On Sat, Jan 20, 2018 at 9:25 AM, Rukshan Premathunga <[email protected]>
wrote:

> Hi Nishadi,
>
> In APIM you cannot grantee the behavior when you have conflict resources.
> Also i don't think your rest implementation is comply with restful service.
>
> GET /books/{book-id}
>
> GET /books/healthcheck
>
> After the path/books it should represent book's id or something. So we
> cannot have a sub resource with /healthcheck after resource /books.
>
> I think you can do something like following. here GET /books resource
> should return all the books in the system and HEAD /books resource can
> return some metadata of the system. Similar way you can check the
> connectivity of the system.
>
> Yes it would be best to design the swagger and review it to avoid
conflicting cases. We should be able to differentiate cases with different
HTTP verbs depends on the usecase.

> HEAD /books
>
>
> Thanks and Regards
>
> On Fri, Jan 19, 2018 at 3:55 PM, Nadeeshaan Gunasinghe <
> [email protected]> wrote:
>
>> Hi Nishadi,
>>
>> Since this model has the conflict as you have mentioned, IMO I think it
>> would be better to use a query parameter for the book-id instead of using
>> the path parameter.
>>
>> Cheers,
>> *Nadeeshaan Gunasinghe*
>> Senior Software Engineer, WSO2 Inc. http://wso2.com
>> +94770596754 | [email protected] | Skype: nadeeshaan.gunasinghe
>> <#m_-2824082901054859133_m_-965835132707708105_>
>> <http://www.facebook.com/nadeeshaan.gunasinghe>
>> <http://lk.linkedin.com/in/nadeeshaan> <http://twitter.com/Nadeeshaan>
>> <http://nadeeshaan.blogspot.com/>
>> Get your own email signature
>> <https://wisestamp.com/email-install?utm_source=promotion&utm_medium=signature&utm_campaign=get_your_own>
>>
>> On Fri, Jan 19, 2018 at 3:33 PM, Nishadi Kirielle <[email protected]>
>> wrote:
>>
>>> Hi all,
>>>
>>> I have several REST APIs that need to be exposed via API Manager 2.1.0.
>>> For example, I have a micro service that manages books and in that micro
>>> service the following two APIs need to be exposed via the API manager.
>>>
>>>    - GET /books/{book-id}
>>>       - Retrieve the information of a particular book
>>>    - GET /books/healthcheck
>>>       - Checks the health status of the books micro service
>>>
>>> (In here, /books is the base path of the micro service)
>>>
>>> I exposed these two resources via API manager locally and without any
>>> conflict the APIs got resolved.
>>> I need to get verified whether this is the expected behavior such that
>>> when the user calls to the /books/healthcheck API it always get resolved to
>>> /books/healthcheck API in the internal micro service rather than the
>>> /books/{book-id} considering the 'healthcheck' keyword as a book id.
>>>
>>> Thank you and regards,
>>> Nishadi
>>>
>>>
>>> --
>>> *Nishadi Kirielle*
>>> Software Engineer
>>> WSO2, Inc.
>>>
>>> Mobile : +94 70 204 5934 <+94%2070%20204%205934>
>>> Blog : nishadikirielle.wordpress.com
>>>
>>> <http://wso2.com/signature>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
> +94711822074 <+94%2071%20182%202074>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to