Am trying to create a new dataElement using CSV format. this is what am getting.
curl --data-binary @dataElements.csv “localhost:8082/api/dataElements” -H “Content-Type:application/csv” -u admin:district -v
Trying ::1…
Connected to localhost (::1) port 8082 (#0 )
Server auth using Basic with user ‘admin’
POST /api/dataElements HTTP/1.1
Authorization: Basic YWRtaW46ZGlzdHJpY3Q=
User-Agent: curl/7.40.0
Host: localhost:8082
Accept: /
Content-Type:application/csv
Content-Length: 333
upload completely sent off: 333 out of 333 bytes
< HTTP/1.1 415 Unsupported Media Type
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< Set-Cookie: JSESSIONID=1aaykhq834qennrisui46cx1z;Path=/
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 1407
< Server: Jetty(6.1.x)
<
Error 415 UNSUPPORTED_MEDIA_TYPE
HTTP ERROR 415
Problem accessing /api/dataElements. Reason:
UNSUPPORTED_MEDIA_TYPE
Powered by Jetty://
morten
(Morten Hansen)
14 September 2015 06:29
2
Hi
I will let Lars give you the definitive answer… but I think its currently only possible to import CSV metadata through the UI, could you please try that out and see if it works for you?
···
On Mon, Sep 14, 2015 at 1:19 PM, moses mwale isoftcom.ic@gmail.com wrote:
Am trying to create a new dataElement using CSV format. this is what am getting.
curl --data-binary @dataElements.csv “localhost:8082/api/dataElements” -H “Content-Type:application/csv” -u admin:district -v
Trying ::1…
Connected to localhost (::1) port 8082 (#0 )
Server auth using Basic with user ‘admin’
POST /api/dataElements HTTP/1.1
Authorization: Basic YWRtaW46ZGlzdHJpY3Q=
User-Agent: curl/7.40.0
Host: localhost:8082
Accept: /
Content-Type:application/csv
Content-Length: 333
upload completely sent off: 333 out of 333 bytes
< HTTP/1.1 415 Unsupported Media Type
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< Set-Cookie: JSESSIONID=1aaykhq834qennrisui46cx1z;Path=/
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 1407
< Server: Jetty(6.1.x)
<
Error 415 UNSUPPORTED_MEDIA_TYPE
HTTP ERROR 415
Problem accessing /api/dataElements. Reason:
UNSUPPORTED_MEDIA_TYPE
Powered by Jetty://
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
–
Morten
Lars
(Lars Øverland)
14 September 2015 08:49
3
Hi, that is correct. Meta-data CSV can only be imported through UI. It would be feasible to add CSV to support to /metaData, we can do so later.
regards,
Lars
···
On Mon, Sep 14, 2015 at 8:29 AM, Morten Olav Hansen mortenoh@gmail.com wrote:
Hi
I will let Lars give you the definitive answer… but I think its currently only possible to import CSV metadata through the UI, could you please try that out and see if it works for you?
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
–
–
Morten
On Mon, Sep 14, 2015 at 1:19 PM, moses mwale isoftcom.ic@gmail.com wrote:
Am trying to create a new dataElement using CSV format. this is what am getting.
curl --data-binary @dataElements.csv “localhost:8082/api/dataElements” -H “Content-Type:application/csv” -u admin:district -v
Trying ::1…
Connected to localhost (::1) port 8082 (#0 )
Server auth using Basic with user ‘admin’
POST /api/dataElements HTTP/1.1
Authorization: Basic YWRtaW46ZGlzdHJpY3Q=
User-Agent: curl/7.40.0
Host: localhost:8082
Accept: /
Content-Type:application/csv
Content-Length: 333
upload completely sent off: 333 out of 333 bytes
< HTTP/1.1 415 Unsupported Media Type
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< Set-Cookie: JSESSIONID=1aaykhq834qennrisui46cx1z;Path=/
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 1407
< Server: Jetty(6.1.x)
<
Error 415 UNSUPPORTED_MEDIA_TYPE
HTTP ERROR 415
Problem accessing /api/dataElements. Reason:
UNSUPPORTED_MEDIA_TYPE
Powered by Jetty://
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org