Insert datas into DHIS2 from an application using DHIS2 Web API

Hello every one, I was able to install Dhis2 on my local machine, my goal is to insert json datas into Dhis2 from an application that I have developped using the dhis2 web api. What I want to do is to call the dhis2 web api url in my custom application and send the json format datas into dhis2 instance, and then into its database. Can anyone help me of how to do that? thanks in advance.

Hi @christian_val. Welcome to the DHIS2 community!

I’m not sure if this is helpful but if you’re trying to send data values sets into a DHIS2 instance you can check the documentation here - notice that JSON format is supported.

Please let me know if this helps or if you have any other questions!

1 Like

Hi @debora,

I was reading the documentation you mention in your post and I found a XML script for sending data.

For this part xmlns=“http://dhis2.org/schema/dxf/2.0, do I have to write the URL of my instance?






Thanks

Hi @dmbantu - yes, I would say so. You could try to see if it works with your instance?

Please let me know if you were able to solve this!

1 Like

Hi @debora . Thanks for your welcome.

Also thanks for your response. I have tried to send data values sets into a DHIS2, trying to send json file via curl command and it works.

Thanks a lot

1 Like

Glad to hear that @christian_val ! :slight_smile:

1 Like

A post was merged into an existing topic: Web api 's option: idschema=name, can’t work properly