dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #46318
Re: Dataset Assignation programmatically
There are numerous examples in the documentation about how to work with the
API. Have you had a look there?
This is a good start.
http://dhis2.github.io/dhis2-docs/2.22/en/developer/html/ch01s10.html
On Fri, Aug 5, 2016 at 12:48 PM, Raminosoa Rabemanantsoa, Tantely <
traminosoa@xxxxxxxxxx> wrote:
> Thank you for your explanation. I had a look at the link and it returned
> the following message instead of what you mentioned:
>
> falsefalsefalseART monthly summaryrw------falsefalseART
> 2010falsefalsefalseCUSTOMfalselyLU2wR22tCfalse220Monthly00RE
> PORTING_RATEtruetruefalsetruetruetruerw------L4XTzgbdza3WakikiL4XTzgbdza3
>
> In addition to your explanation, could you please point me to a practical
> example of manipulating the data through the web API interface as I am new
> on this?
>
> Regards,
>
> Tantely.
>
> On Fri, Aug 5, 2016 at 12:57 PM, Jason Pickering <
> jason.p.pickering@xxxxxxxxx> wrote:
>
>>
>> Look at https://play.dhis2.org/demo/api/dataSets/lyLU2wR22tC
>> and you will see something like
>>
>> <organisationUnits>
>> <organisationUnit id="bVZTNrnfn9G"/>
>> <organisationUnit id="TAN6Q7vjvuk"/>
>>
>> So you can just add them there and post the entire payload back. This is
>> probably the easiest way.
>>
>> You can also add them one at a time by POSTing
>> to api/dataSets/A/organisationUnits/B
>> where A is the dataset UID and B is the organisation unit UID.
>>
>> You can also insert them directly into the table "datasetsource" with
>> SQL. You will need to clear your server cache after this for the changes to
>> become visible.
>>
>> Regards,
>> Jaosn
>>
>>
>>
>> On Fri, Aug 5, 2016 at 11:38 AM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>
>>> The best way would be through the Web API.
>>>
>>> I think directly in the db might work (you can test it on a copy of your
>>> db). You will have to clear the server cache or restart.
>>>
>>> You should also consider an upgrade, as you are a lot of versions behind
>>> now...
>>>
>>> Knut
>>>
>>> On Fri, Aug 5, 2016 at 11:35 AM, Raminosoa Rabemanantsoa, Tantely <
>>> traminosoa@xxxxxxxxxx> wrote:
>>>
>>>> Dear All,
>>>>
>>>> I would like to ask if someone has already experinced a batch
>>>> assignation of dataset to organization units directly in DHIS2 database? I
>>>> have 10 datasets to assign to a thousands of orguints (which will vary in
>>>> time) and it will be time consuming if using the Data Set Assignment Editor
>>>> manually. Your suggestions are welcome.
>>>>
>>>> I am using DHIS2 2.19.
>>>>
>>>> Thank you for your support.
>>>>
>>>> Regards,
>>>>
>>>> Tantely.
>>>>
>>>> *This message and its attachments are confidential and solely for the
>>>> intended recipients. If received in error, please delete them and notify
>>>> the sender via reply e-mail immediately.*
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.pickering@xxxxxxxxx
>> tel:+46764147049
>>
>
>
> *This message and its attachments are confidential and solely for the
> intended recipients. If received in error, please delete them and notify
> the sender via reply e-mail immediately.*
>
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049
Follow ups
References