Could you also describe how to delete existing values through the api? -- Sent from my mobile On Mar 17, 2012 7:46 PM, "Lars Helge Øverland" <larshe...@gmail.com> wrote:
> Hi Lars > > On Fri, Mar 16, 2012 at 1:53 PM, Lars Kristian Roland <l...@roland.bz> > wrote: > > Hi, > > > > I'm looking at the DHIS2 API and looking for a pointer to any > documentation > > or email that has described it's usage. Apologize if the following is > > answered somewhere. If so, please direct me. > > > > We will write up something soon. But it is just a matter of following > the description at /api/dataValueSets . The ids can be found by > browsing the API from the /api/resources endpoint. > > > > > I'd like to try the /api/dataValueSets > > > > Some questions: > > > > - I can see that there used to be a function where the phone number of > the > > org-unit could be set in the URL. It seems to have been removed again, > > perhaps for security purposes. But such a function would be useful for > > example when posting from SMS. Do you have tips on how to handle > > authentication from for example an SMS gateway? > > Yes we removed it because the implementation was fuzzy and because > Long told us it was not in use. I don't know much about SMS gateways > but we can of course try to come up with a solution if you provide the > requirements. > > > > > - Is my POST being checked for authorization to see if I have rights to > the > > particular orgUnit I'm posting to? > > > > No not at the moment but we will implement it. > > > - Should the posting of the following XML to the above URL update the > > dataset values for January? Given that the IDs are correct of course. > Would > > it be reporting for the orgUnit my logged-in user is associated with, or > the > > orgUnit I'm stating? > > > > <dataValueSet xmlns="http://dhis2.org/schema/dxf/2.0" > period="2012-01-01" > > dataSet="pBOMPrpg1QX" orgUnit="DiszpKrYNg8"> > > <dataValue dataElement="f7n9E0hX8qk" value="1" /> > > <dataValue dataElement="Vp12ncSU1Av" value="2" /> > > <dataValue dataElement="LjNlMTl9Nq9" value="3" /> > > </dataValueSet> > > It is correct. Except if the period is supposed to be a month it > should be 201201 according to the current format. It will use the org > unit supplied in the xml message. > > > > > Using CURL with the below command and above xml-file gives no error (200 > > OK), but I can't quite find the data in DHIS. I might have messaged up > the > > ids of course. > > Try to change the period and then look for the data in the data entry > module, using the right period, data set, org unit. > > Will get back with more info later.... > > Lars > > _______________________________________________ > 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 >
_______________________________________________ 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