So if I am a client who is currently using the REST API of Stratos I will
have to change my client to send the version in the header as mentioned in
this thread in order to use the previous endpoints  - Assuming that these
endpoints will be maintained till next release.

However, As per the discussion on the thread *"Stratos REST API root
context"* if we change the root context then can we do the above ?



On Mon, Oct 6, 2014 at 3:04 PM, Nirmal Fernando <nirmal070...@gmail.com>
wrote:

> Sorry, if I wasn't clear Imesh. Yes, we will support both. Accept header
> can be used in a scenario where you want to explicitly mention the API
> version when accessing via default API path. If you wish to use the URL
> context, you shouldn't be required to set the Accept header.
>
> On Mon, Oct 6, 2014 at 2:56 PM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Got it! Shall we support both Accept header and URL context for this?
>>
>> Thanks
>>
>> On Mon, Oct 6, 2014 at 2:39 PM, Nirmal Fernando <nirmal070...@gmail.com>
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> Yes, GitHub API does that way https://developer.github.com/v3/versions/
>>>
>>>
>>> On Mon, Oct 6, 2014 at 2:35 PM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> +1 Regarding point 2: using Accept header to specify the API version,
>>>> is this being done by any other known APIs? For my understanding Accept
>>>> header is used for specify the media type [1].
>>>>
>>>> [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
>>>>
>>>> On Sun, Oct 5, 2014 at 9:27 PM, Nirmal Fernando <nirmal070...@gmail.com
>>>> > wrote:
>>>>
>>>>> All,
>>>>>
>>>>> Let's discuss how we could do $subject properly. AFAIS currently we
>>>>> don't have any versioning in our REST API, but we have consumers of our
>>>>> REST API.
>>>>>
>>>>> 1. We can make the default API version to be the latest version, i.e.
>>>>> v2.
>>>>>
>>>>> So, if someone send a request to /<rootContext>/cartridges , it would
>>>>> find /<rootContext>/v2/cartridges
>>>>>
>>>>> 2. Anyone can use the default API paths and still could request for a
>>>>> specific version via HTTP Accept Header.
>>>>>
>>>>> Accept: application/vnd.stratos.v1+json
>>>>>
>>>>>
>>>>> 3. Provide a migration guide for existing Clients.
>>>>>
>>>>> - If they want to use the old API, they need to specifically request
>>>>> for the old API, by specifying the Accept header.
>>>>>
>>>>> 4. Mark v1 API as deprecated and announce that we'll remove the
>>>>> support for it in the next release.
>>>>>
>>>>> Any other alternatives?
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Shiroshica Kulatilake

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

Reply via email to