dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #49763
Fwd: [Dhis2-users] API calls using Node.js examples
This is a good question for the dev list.
---------- Forwarded message ----------
From: Jesus Solano-Roman <asolano@xxxxxxxxxxxxxxxxxx>
Date: Thu, Jul 27, 2017 at 3:15 PM
Subject: [Dhis2-users] API calls using Node.js examples
To: "dhis2-users lists.launchpad.net" <dhis2-users@xxxxxxxxxxxxxxxxxxx>
Hello all.
I would like to know if someone could point out to examples or perhaps give
an example of a typical Web API call done using Node.js
The examples in the documentation are either using cURL or using the direct
browser "endpoint", but usually do not take into account oAuth
authentication (e.g. using a token instead of user credentials) and how to
wrap all that into a Node.js request.
In the use case of developing a web application, both the "Bearer token"
and the following API calls should be done using Node (or say, PHP) and not
cURL. So for instance, this example from the documentation should actually
exist as a Node request:
curl -H "Authorization: Bearer 07fc551c-806c-41a4-9a8c-10658bd15435"
$SERVER/api/26/dataElements.json
Any help would be greatly appreciated.
Thanks,
Antonio Solano.
Broad Institute of MIT and Harvard, Boston, MA, USA.
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
--
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org
Follow ups