Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-15 Thread Vladimer Shioshvili
Thanks for confirming.

On Thu, Dec 15, 2016 at 2:07 PM Bob Jolliffe  wrote:

> Hi Vlad
>
> No it doesn't currently work with adx files.
>
>
> On 15 December 2016 at 18:52, Vladimer Shioshvili 
> wrote:
>
> Hi Morten,
>
> It does not seem to work with adx message though. Is that right?
>
> Thanks,
> Vlad
>
> On Fri, Dec 9, 2016 at 4:05 AM Lars Helge Øverland  wrote:
>
> Okay thanks Victor, I can see it now, you are right, compressed files are
> supported ;)
>
> Lars
>
>
> On Fri, Dec 9, 2016 at 9:25 AM, Victor Garcia 
> wrote:
>
> You are right, Morten. It works with --data-binary instead of -d.
> Thanks!
>
> On 8 December 2016 at 03:28, Morten Olav Hansen  wrote:
>
> Hi
>
> Do you get any errors? it should be possible, it will take the first file
> in the zip file and use that (so it would be best to always only have one
> file)
>
> Could you also try with --data-binary instead of -d ?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia 
> wrote:
>
> Hi,
>
> about importing datavalues in zip format, I think it is possible since it
> was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html).
> I am able to import a zip file using Postman and using our own webapp both
> in 2.21 and 2.25, so it seems to be working fine.
>
> On the other hand, I am not able to import a zip file using curl with the
> command:
>
> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
> http://localhost/api/dataValueSets; -u user:password -v
>
> but I guess I am missing something...
>
> Regards!
>
> On 6 December 2016 at 13:39, Vladimer Shioshvili 
> wrote:
>
> Thanks Lars. It was a human error issue, input i was testing with has
> duplicates and i was looking at ignored, and not noticing the delete count.
> Thanks!
>
> What would be the level of effort and ability to back port to 2.24 of
> supporting compressed files in API?
>
> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland  wrote:
>
> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users

Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-15 Thread Vladimer Shioshvili
Hi Morten,

It does not seem to work with adx message though. Is that right?

Thanks,
Vlad

On Fri, Dec 9, 2016 at 4:05 AM Lars Helge Øverland  wrote:

> Okay thanks Victor, I can see it now, you are right, compressed files are
> supported ;)
>
> Lars
>
>
> On Fri, Dec 9, 2016 at 9:25 AM, Victor Garcia 
> wrote:
>
> You are right, Morten. It works with --data-binary instead of -d.
> Thanks!
>
> On 8 December 2016 at 03:28, Morten Olav Hansen  wrote:
>
> Hi
>
> Do you get any errors? it should be possible, it will take the first file
> in the zip file and use that (so it would be best to always only have one
> file)
>
> Could you also try with --data-binary instead of -d ?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia 
> wrote:
>
> Hi,
>
> about importing datavalues in zip format, I think it is possible since it
> was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html).
> I am able to import a zip file using Postman and using our own webapp both
> in 2.21 and 2.25, so it seems to be working fine.
>
> On the other hand, I am not able to import a zip file using curl with the
> command:
>
> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
> http://localhost/api/dataValueSets; -u user:password -v
>
> but I guess I am missing something...
>
> Regards!
>
> On 6 December 2016 at 13:39, Vladimer Shioshvili 
> wrote:
>
> Thanks Lars. It was a human error issue, input i was testing with has
> duplicates and i was looking at ignored, and not noticing the delete count.
> Thanks!
>
> What would be the level of effort and ability to back port to 2.24 of
> supporting compressed files in API?
>
> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland  wrote:
>
> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : 

Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-09 Thread Lars Helge Øverland
Okay thanks Victor, I can see it now, you are right, compressed files are
supported ;)

Lars


On Fri, Dec 9, 2016 at 9:25 AM, Victor Garcia  wrote:

> You are right, Morten. It works with --data-binary instead of -d.
> Thanks!
>
> On 8 December 2016 at 03:28, Morten Olav Hansen  wrote:
>
>> Hi
>>
>> Do you get any errors? it should be possible, it will take the first file
>> in the zip file and use that (so it would be best to always only have one
>> file)
>>
>> Could you also try with --data-binary instead of -d ?
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia 
>> wrote:
>>
>>> Hi,
>>>
>>> about importing datavalues in zip format, I think it is possible since
>>> it was fixed in 2.21 (https://lists.launchpad.net/d
>>> his2-devs/msg46144.html). I am able to import a zip file using Postman
>>> and using our own webapp both in 2.21 and 2.25, so it seems to be working
>>> fine.
>>>
>>> On the other hand, I am not able to import a zip file using curl with
>>> the command:
>>>
>>> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
>>> http://localhost/api/dataValueSets; -u user:password -v
>>>
>>> but I guess I am missing something...
>>>
>>> Regards!
>>>
>>> On 6 December 2016 at 13:39, Vladimer Shioshvili 
>>> wrote:
>>>
 Thanks Lars. It was a human error issue, input i was testing with has
 duplicates and i was looking at ignored, and not noticing the delete count.
 Thanks!

 What would be the level of effort and ability to back port to 2.24 of
 supporting compressed files in API?

 On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland 
 wrote:

> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and
> it's the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to
> the API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below,
> which indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data '{"dataSet":"pBOMPrpg1QX","per
> iod":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataEl
> ement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets?importStra
> tegy=DELETE" -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"Diszp
> KrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"
> 1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}' -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>
 ___
 Mailing list: https://launchpad.net/~dhis2-users
 Post to : dhis2-users@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-users
 More help   : https://help.launchpad.net/ListHelp


>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to : dhis2-users@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : 

Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-07 Thread Morten Olav Hansen
Hi

Do you get any errors? it should be possible, it will take the first file
in the zip file and use that (so it would be best to always only have one
file)

Could you also try with --data-binary instead of -d ?

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Dec 8, 2016 at 1:18 AM, Victor Garcia  wrote:

> Hi,
>
> about importing datavalues in zip format, I think it is possible since it
> was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html).
> I am able to import a zip file using Postman and using our own webapp both
> in 2.21 and 2.25, so it seems to be working fine.
>
> On the other hand, I am not able to import a zip file using curl with the
> command:
>
> curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
> http://localhost/api/dataValueSets; -u user:password -v
>
> but I guess I am missing something...
>
> Regards!
>
> On 6 December 2016 at 13:39, Vladimer Shioshvili 
> wrote:
>
>> Thanks Lars. It was a human error issue, input i was testing with has
>> duplicates and i was looking at ignored, and not noticing the delete count.
>> Thanks!
>>
>> What would be the level of effort and ability to back port to 2.24 of
>> supporting compressed files in API?
>>
>> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland 
>> wrote:
>>
>>> Hi Vlad,
>>>
>>>
>>>
>>> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
>>> vshioshv...@gmail.com> wrote:
>>>
>>> 1) just to confirm, web api only accets uncompressed file, right? and
>>> it's the import/export app that is capable of handling zip file?
>>>
>>>
>>> Yes that is correct per now. We could consider adding that support to
>>> the API as well.
>>>
>>>
>>>
>>> 2) does DELETE import strategy work for dataValueSets? I have not been
>>> able to get it to work.
>>>
>>>
>>> It seems to be working - try running the two curl commands below, which
>>> indicates that data gets added and then removed.
>>>
>>>
>>> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
>>> "Content-Type: application/json" --data '{"dataSet":"pBOMPrpg1QX","per
>>> iod":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataEl
>>> ement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
>>> -u admin:district -v
>>>
>>> curl "https://play.dhis2.org/demo/api/24/dataValueSets?importStra
>>> tegy=DELETE" -i -X POST -H "Content-Type: application/json" --data
>>> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"Diszp
>>> KrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"
>>> 1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}' -u admin:district -v
>>>
>>>
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am running on 2.24, if it makes a difference.
>>>
>>> Thanks,
>>> Vlad
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to : dhis2-users@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> l...@dhis2.org
>>> http://www.dhis2.org 
>>>
>>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-07 Thread Victor Garcia
Hi,

about importing datavalues in zip format, I think it is possible since it
was fixed in 2.21 (https://lists.launchpad.net/dhis2-devs/msg46144.html). I
am able to import a zip file using Postman and using our own webapp both in
2.21 and 2.25, so it seems to be working fine.

On the other hand, I am not able to import a zip file using curl with the
command:

curl.exe -d @test.zip -H "Content-Type: application/json" -X POST "
http://localhost/api/dataValueSets; -u user:password -v

but I guess I am missing something...

Regards!

On 6 December 2016 at 13:39, Vladimer Shioshvili 
wrote:

> Thanks Lars. It was a human error issue, input i was testing with has
> duplicates and i was looking at ignored, and not noticing the delete count.
> Thanks!
>
> What would be the level of effort and ability to back port to 2.24 of
> supporting compressed files in API?
>
> On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland  wrote:
>
>> Hi Vlad,
>>
>>
>>
>> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
>> vshioshv...@gmail.com> wrote:
>>
>> 1) just to confirm, web api only accets uncompressed file, right? and
>> it's the import/export app that is capable of handling zip file?
>>
>>
>> Yes that is correct per now. We could consider adding that support to the
>> API as well.
>>
>>
>>
>> 2) does DELETE import strategy work for dataValueSets? I have not been
>> able to get it to work.
>>
>>
>> It seems to be working - try running the two curl commands below, which
>> indicates that data gets added and then removed.
>>
>>
>> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
>> "Content-Type: application/json" --data '{"dataSet":"pBOMPrpg1QX","
>> period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"
>> dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
>> -u admin:district -v
>>
>> curl "https://play.dhis2.org/demo/api/24/dataValueSets?
>> importStrategy=DELETE" -i -X POST -H "Content-Type: application/json"
>> --data '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"
>> DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","
>> value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}' -u
>> admin:district -v
>>
>>
>>
>> regards,
>>
>> Lars
>>
>>
>>
>>
>>
>>
>>
>>
>> I am running on 2.24, if it makes a difference.
>>
>> Thanks,
>> Vlad
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> l...@dhis2.org
>> http://www.dhis2.org 
>>
>>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-06 Thread Vladimer Shioshvili
Thanks Lars. It was a human error issue, input i was testing with has
duplicates and i was looking at ignored, and not noticing the delete count.
Thanks!

What would be the level of effort and ability to back port to 2.24 of
supporting compressed files in API?

On Tue, Dec 6, 2016 at 6:42 AM Lars Helge Øverland  wrote:

> Hi Vlad,
>
>
>
> On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili <
> vshioshv...@gmail.com> wrote:
>
> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
> Yes that is correct per now. We could consider adding that support to the
> API as well.
>
>
>
> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
> It seems to be working - try running the two curl commands below, which
> indicates that data gets added and then removed.
>
>
> curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
> "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
> curl "
> https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
> -i -X POST -H "Content-Type: application/json" --data
> '{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
> -u admin:district -v
>
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] couple questions about dataValueSets API

2016-12-06 Thread Lars Helge Øverland
Hi Vlad,



On Tue, Dec 6, 2016 at 12:04 PM, Vladimer Shioshvili 
wrote:

> 1) just to confirm, web api only accets uncompressed file, right? and it's
> the import/export app that is capable of handling zip file?
>
>
Yes that is correct per now. We could consider adding that support to the
API as well.



> 2) does DELETE import strategy work for dataValueSets? I have not been
> able to get it to work.
>
>
It seems to be working - try running the two curl commands below, which
indicates that data gets added and then removed.


curl "https://play.dhis2.org/demo/api/24/dataValueSets; -i -X POST -H
"Content-Type: application/json" --data
'{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
-u admin:district -v

curl "https://play.dhis2.org/demo/api/24/dataValueSets?importStrategy=DELETE;
-i -X POST -H "Content-Type: application/json" --data
'{"dataSet":"pBOMPrpg1QX","period":"201401","orgUnit":"DiszpKrYNg8","dataValues":[{"dataElement":"f7n9E0hX8qk","value":"1"},{"dataElement":"Ix2HsbDMLea","value":"2"}]}'
-u admin:district -v



regards,

Lars








> I am running on 2.24, if it makes a difference.
>
> Thanks,
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] couple questions about dataValueSets API

2016-12-06 Thread Vladimer Shioshvili
1) just to confirm, web api only accets uncompressed file, right? and it's
the import/export app that is capable of handling zip file?

2) does DELETE import strategy work for dataValueSets? I have not been able
to get it to work.

I am running on 2.24, if it makes a difference.

Thanks,
Vlad
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp