Metadata Sync - API versioning in DHIS

Hi Lars/Morten,

This is regarding the metadata sync feature which we have contributed to DHIS recently. When we are using the setting-app from 2.25 development branch (master), we see that versioned api calls are being made from the app instead of the default api calls.

/api/25/metadata/versions

/api/25/metadata/version/create

These apis are not yet redirected to the default behaviour. The synchronization tab in settings-app is not working as a result. Please suggest us on the behaviour of versioned apis and also to handle api versioning for all the metadata sync apis.

Thanks

Aamer.

Hi Nicolay,

We see that you have recently made changes in 2.25 settings-app to change the config.baseUrl from /api to /api/25

As a result few of the apis mentioned below are not working as expected. We would like to know your plans on enabling api versioning for the metadata sync apis so that they can work fine with the new baseUrl as well.

Thanks

Aamer.

···

On Tue, Sep 20, 2016 at 4:48 PM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Lars/Morten,

This is regarding the metadata sync feature which we have contributed to DHIS recently. When we are using the setting-app from 2.25 development branch (master), we see that versioned api calls are being made from the app instead of the default api calls.

/api/25/metadata/versions

/api/25/metadata/version/create

These apis are not yet redirected to the default behaviour. The synchronization tab in settings-app is not working as a result. Please suggest us on the behaviour of versioned apis and also to handle api versioning for all the metadata sync apis.

Thanks

Aamer.

Hi Aamer

Yes, you are right. That’s one of the controllers that wasn’t moved over yet, all you need to do is to annotate your controller with:

@ApiVersion( { Version.DEFAULT, Version.ALL } )

···

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Sep 21, 2016 at 12:23 AM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Nicolay,

We see that you have recently made changes in 2.25 settings-app to change the config.baseUrl from /api to /api/25

As a result few of the apis mentioned below are not working as expected. We would like to know your plans on enabling api versioning for the metadata sync apis so that they can work fine with the new baseUrl as well.

Thanks

Aamer.

On Tue, Sep 20, 2016 at 4:48 PM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Lars/Morten,

This is regarding the metadata sync feature which we have contributed to DHIS recently. When we are using the setting-app from 2.25 development branch (master), we see that versioned api calls are being made from the app instead of the default api calls.

/api/25/metadata/versions

/api/25/metadata/version/create

These apis are not yet redirected to the default behaviour. The synchronization tab in settings-app is not working as a result. Please suggest us on the behaviour of versioned apis and also to handle api versioning for all the metadata sync apis.

Thanks

Aamer.

Hi

I have added versioning to master now

···

On Wed, Sep 21, 2016 at 9:27 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Aamer

Yes, you are right. That’s one of the controllers that wasn’t moved over yet, all you need to do is to annotate your controller with:

@ApiVersion( { Version.DEFAULT, Version.ALL } )

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Sep 21, 2016 at 12:23 AM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Nicolay,

We see that you have recently made changes in 2.25 settings-app to change the config.baseUrl from /api to /api/25

As a result few of the apis mentioned below are not working as expected. We would like to know your plans on enabling api versioning for the metadata sync apis so that they can work fine with the new baseUrl as well.

Thanks

Aamer.

On Tue, Sep 20, 2016 at 4:48 PM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Lars/Morten,

This is regarding the metadata sync feature which we have contributed to DHIS recently. When we are using the setting-app from 2.25 development branch (master), we see that versioned api calls are being made from the app instead of the default api calls.

/api/25/metadata/versions

/api/25/metadata/version/create

These apis are not yet redirected to the default behaviour. The synchronization tab in settings-app is not working as a result. Please suggest us on the behaviour of versioned apis and also to handle api versioning for all the metadata sync apis.

Thanks

Aamer.

Thanks Morten. We will pull the changes. Also there is another controller ‘MetadataSyncController’ for which api versioning needs to be enabled.

···

On Thu, Sep 22, 2016 at 10:00 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

I have added versioning to master now

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Sep 21, 2016 at 9:27 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Aamer

Yes, you are right. That’s one of the controllers that wasn’t moved over yet, all you need to do is to annotate your controller with:

@ApiVersion( { Version.DEFAULT, Version.ALL } )

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Sep 21, 2016 at 12:23 AM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Nicolay,

We see that you have recently made changes in 2.25 settings-app to change the config.baseUrl from /api to /api/25

As a result few of the apis mentioned below are not working as expected. We would like to know your plans on enabling api versioning for the metadata sync apis so that they can work fine with the new baseUrl as well.

Thanks

Aamer.

On Tue, Sep 20, 2016 at 4:48 PM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Lars/Morten,

This is regarding the metadata sync feature which we have contributed to DHIS recently. When we are using the setting-app from 2.25 development branch (master), we see that versioned api calls are being made from the app instead of the default api calls.

/api/25/metadata/versions

/api/25/metadata/version/create

These apis are not yet redirected to the default behaviour. The synchronization tab in settings-app is not working as a result. Please suggest us on the behaviour of versioned apis and also to handle api versioning for all the metadata sync apis.

Thanks

Aamer.

Ok, that has been added now

···

On Thu, Sep 22, 2016 at 2:10 PM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Thanks Morten. We will pull the changes. Also there is another controller ‘MetadataSyncController’ for which api versioning needs to be enabled.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Thu, Sep 22, 2016 at 10:00 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

I have added versioning to master now

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Sep 21, 2016 at 9:27 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Aamer

Yes, you are right. That’s one of the controllers that wasn’t moved over yet, all you need to do is to annotate your controller with:

@ApiVersion( { Version.DEFAULT, Version.ALL } )

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Wed, Sep 21, 2016 at 12:23 AM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Nicolay,

We see that you have recently made changes in 2.25 settings-app to change the config.baseUrl from /api to /api/25

As a result few of the apis mentioned below are not working as expected. We would like to know your plans on enabling api versioning for the metadata sync apis so that they can work fine with the new baseUrl as well.

Thanks

Aamer.

On Tue, Sep 20, 2016 at 4:48 PM, Aamer Mohammed aamerm@thoughtworks.com wrote:

Hi Lars/Morten,

This is regarding the metadata sync feature which we have contributed to DHIS recently. When we are using the setting-app from 2.25 development branch (master), we see that versioned api calls are being made from the app instead of the default api calls.

/api/25/metadata/versions

/api/25/metadata/version/create

These apis are not yet redirected to the default behaviour. The synchronization tab in settings-app is not working as a result. Please suggest us on the behaviour of versioned apis and also to handle api versioning for all the metadata sync apis.

Thanks

Aamer.