Re: [Dhis2-users] [Dhis2-devs] Uploading CSV data file with curl

2018-07-04 Thread Olaleke Seweje
I agree with Vladimer, I think it would even be a good idea to have a cheatsheet where all API endpoints can be readily found (with usage format) rather than having to srach through the docs every time. I know for old users, it might be no issue but how about the new users. I will be willing to cr

Re: [Dhis2-users] [Dhis2-devs] Uploading CSV data file with curl

2018-07-04 Thread Vladimer Shioshvili
Thanks Knut - but documentation doesn't specify the API endpoint, or how you specify the metadata object type (it is a drop-down in import/export app). On Wed, Jul 4, 2018, 16:37 Knut Staring wrote: > It is possible: > https://docs.dhis2.org/master/en/developer/html/webapi_csv_metadata_import.ht

Re: [Dhis2-users] [Dhis2-devs] Uploading CSV data file with curl

2018-07-04 Thread Knut Staring
It is possible: https://docs.dhis2.org/master/en/developer/html/webapi_csv_metadata_import.html Knut On Wed, Jul 4, 2018 at 2:31 PM Vladimer Shioshvili wrote: > Leke, > > While it's good to use --data-binary, in your curl calls in both examples, > you are missing -H switch in front of the conte

Re: [Dhis2-users] [Dhis2-devs] Uploading CSV data file with curl

2018-07-04 Thread Vladimer Shioshvili
Leke, While it's good to use --data-binary, in your curl calls in both examples, you are missing -H switch in front of the content type (look at the example Knut provided), which makes it default to application/x-www-form-urlencoded. Make sure you include -H; Knut (and others), Leke's original qu

Re: [Dhis2-users] [Dhis2-devs] Uploading CSV data file with curl

2018-07-04 Thread Knut Staring
Hi Leke, according to the link I sent you have to use --data-binary as in this request: curl --data-binary @datavalueset.csv "https://play.dhis2.org/demo/24/api/dataValueSets"; -H "Content-Type:application/csv" -u admin:district -v Knut On Wed, Jul 4, 2018 at 11:35 AM Olaleke Seweje wrote: >