dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #45407
Re: Export Metadata - Error with Content-Type header
Ok, thanks for the clarification.
Can I use this war to build a docker image to run system tests?
https://www.dhis2.org/download/releases/trunk/dhis.war
BR,
Paulo
On Tue, Jun 14, 2016 at 10:33 AM Morten Olav Hansen <morten@xxxxxxxxx>
wrote:
> Ah, ok.. so in 2.23, only /api/23/metadata endpoint is versioned.. nothing
> else, everything will be part of 2.24
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Tue, Jun 14, 2016 at 3:29 PM, Paulo Grácio <paulogracio@xxxxxxxxx>
> wrote:
>
>> Version:
>> 2.23
>> Build revision:
>> 22991
>> Build date:
>> 2016-06-10 17:48
>>
>> On Tue, Jun 14, 2016 at 10:20 AM Morten Olav Hansen <morten@xxxxxxxxx>
>> wrote:
>>
>>> - In DHIS 2.24 will you keep the API version 23?
>>>>
>>>
>>> Yes, the plan is to keep 3 versions available, for 2.24 /api/23 and
>>> /api/24 is available, for 2.25 we will add /api/25, and for 2.26 we will
>>> add /api/26 and remove /api/23
>>>
>>>
>>>> - Are all endpoints versioned? I'm trying to use
>>>> http://localhost:8085/api/23/dataElements and it returns 404.
>>>> http://localhost:8085/api/dataElements works fine.
>>>>
>>>
>>> Yes, what version are you on?
>>>
>>> https://play.dhis2.org/dev/api/dataElements.json
>>> https://play.dhis2.org/dev/api/23/dataElements.json
>>> https://play.dhis2.org/dev/api/24/dataElements.json
>>>
>>> All works on latest trunk
>>>
>>> --
>>> Morten
>>>
>>>
>>>> Thanks,
>>>> Paulo
>>>>
>>>> On Tue, Jun 14, 2016 at 4:35 AM Morten Olav Hansen <morten@xxxxxxxxx>
>>>> wrote:
>>>>
>>>>> Hi Jason
>>>>>
>>>>> Yes, the idea is that your app should target a specific API version.
>>>>> We are discussing letting /api/ always be the latest, -but- one of the
>>>>> reasons for adding versioning at all, was that we wanted to make more
>>>>> breaking changes... so if you app only targets /api/ and not /api/{version}
>>>>> there is a bigger risk that your app will break going forward.
>>>>>
>>>>> --
>>>>> Morten Olav Hansen
>>>>> Senior Engineer, DHIS 2
>>>>> University of Oslo
>>>>> http://www.dhis2.org
>>>>>
>>>>> On Tue, Jun 14, 2016 at 12:18 AM, Jason Pickering <
>>>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>>>
>>>>>> Hi Morten,
>>>>>> I am a bit confused by this. Will we have to provide the explicit api
>>>>>> version of the current version? So if we are on 2.24,will all API calls to
>>>>>> the default API require the current version of the server?
>>>>>>
>>>>>> Regards,
>>>>>> Jason
>>>>>>
>>>>>> On Mon, Jun 13, 2016, 18:58 Paulo Grácio <paulogracio@xxxxxxxxx>
>>>>>> wrote:
>>>>>>
>>>>>>> Ok, will create the tests based on /api/23/metadata.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Paulo
>>>>>>>
>>>>>>> On Mon, Jun 13, 2016 at 11:17 AM Morten Olav Hansen <
>>>>>>> morten@xxxxxxxxx> wrote:
>>>>>>>
>>>>>>>> No, that won't work right now, that endpoint is anyways getting
>>>>>>>> deprecated (replaced by /api/23/metadata and /api/24/metadata)
>>>>>>>>
>>>>>>>> --
>>>>>>>> Morten Olav Hansen
>>>>>>>> Senior Engineer, DHIS 2
>>>>>>>> University of Oslo
>>>>>>>> http://www.dhis2.org
>>>>>>>>
>>>>>>>> On Mon, Jun 13, 2016 at 4:11 PM, Paulo Grácio <
>>>>>>>> paulogracio@xxxxxxxxx> wrote:
>>>>>>>>
>>>>>>>>> Hi Morten,
>>>>>>>>>
>>>>>>>>> yes removing Content type header makes it work but shouldn't it
>>>>>>>>> work with that header also? It works fine for other GET API calls.
>>>>>>>>>
>>>>>>>>> /Paulo
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Jun 13, 2016 at 10:11 AM Morten Olav Hansen <
>>>>>>>>> morten@xxxxxxxxx> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Paulo
>>>>>>>>>>
>>>>>>>>>> Is there any reason you are doing this request? I assume you want
>>>>>>>>>> XML back? you dont need to set input content-type as you are not sending
>>>>>>>>>> anything, and some of our internal gets a bit confused because of this...
>>>>>>>>>> removing content-type makes it work
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Morten Olav Hansen
>>>>>>>>>> Senior Engineer, DHIS 2
>>>>>>>>>> University of Oslo
>>>>>>>>>> http://www.dhis2.org
>>>>>>>>>>
>>>>>>>>>> On Sun, Jun 12, 2016 at 10:47 PM, Paulo Grácio <
>>>>>>>>>> paulogracio@xxxxxxxxx> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi all,
>>>>>>>>>>>
>>>>>>>>>>> when calling the metadata API with Content-Type header it
>>>>>>>>>>> returns a 500.
>>>>>>>>>>>
>>>>>>>>>>> curl -H "Accept: application/xml" -H "Content-Type:
>>>>>>>>>>> application/xml" -u admin:district "
>>>>>>>>>>> https://play.dhis2.org/demo/api/metadata?lastUpdated=2014-02"
>>>>>>>>>>>
>>>>>>>>>>> Best regards,
>>>>>>>>>>> Paulo
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>>
>>>>>>
>>>>>
>
Follow ups
References
-
Export Metadata - Error with Content-Type header
From: Paulo Grácio, 2016-06-12
-
Re: Export Metadata - Error with Content-Type header
From: Morten Olav Hansen, 2016-06-13
-
Re: Export Metadata - Error with Content-Type header
From: Paulo Grácio, 2016-06-13
-
Re: Export Metadata - Error with Content-Type header
From: Morten Olav Hansen, 2016-06-13
-
Re: Export Metadata - Error with Content-Type header
From: Paulo Grácio, 2016-06-13
-
Re: Export Metadata - Error with Content-Type header
From: Jason Pickering, 2016-06-13
-
Re: Export Metadata - Error with Content-Type header
From: Morten Olav Hansen, 2016-06-14
-
Re: Export Metadata - Error with Content-Type header
From: Paulo Grácio, 2016-06-14
-
Re: Export Metadata - Error with Content-Type header
From: Morten Olav Hansen, 2016-06-14
-
Re: Export Metadata - Error with Content-Type header
From: Paulo Grácio, 2016-06-14
-
Re: Export Metadata - Error with Content-Type header
From: Morten Olav Hansen, 2016-06-14