← Back to team overview

dhis2-devs team mailing list archive

Re: Data import through API in zip format

 

Thanks,

Just to clarify, I have tried using extensions, but it does not seem to
work for "/api/dataValueSets" endpoint.


On 28 July 2016 at 12:04, Morten Olav Hansen <morten@xxxxxxxxx> wrote:

> Hm, yeah.. seems our data endpoint don't wrap it
> using StreamUtils.wrapAndCheckCompressionFormat(), so that means it must be
> manually applied.. should be an easy fix though
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Jul 28, 2016 at 12:00 PM, Halvdan Hoem Grelland <halvdan@xxxxxxxxx
> > wrote:
>
>> Quickly glancing over the source code for this stuff: it seems to discern
>> formats using extensions. For example, one would use a POST to
>> api/metaData.json.zip or api/metaData.xml.gz.
>>
>> Could you give that a try, Victor?
>>
>> On Thu, Jul 28, 2016 at 11:23 AM, Morten Olav Hansen <morten@xxxxxxxxx>
>> wrote:
>>
>>> Hi
>>>
>>> Did you try and simply send the data as a zipped file? I think we
>>> support both gzip and zip, you don't need to do anything else than zip it
>>> down before.
>>>
>>> I'm not 100% sure it will work, but this is how our metadata endpoints
>>> work.
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Thu, Jul 28, 2016 at 11:12 AM, Victor Garcia <vgarciabnz@xxxxxxxxx>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> searching in the documentation I couldn't find a way to import a data
>>>> file in zip format through the API. I know it is possible to do it using
>>>> the user interface (import/export module), but we need to use the API. Is
>>>> it supported?
>>>>
>>>> This problem arises in contexts with a poor connection, where large
>>>> data exchanges are a pain.
>>>>
>>>> Thank you,
>>>>
>>>> Víctor
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>
>>
>> --
>> Halvdan Hoem Grelland
>> Software developer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org <https://www.dhis2.org/>
>>
>>
>

Follow ups

References