dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #12942
Re: how to insert an organization unit with it's parent org 's code?
Hi
You can see an example orgunit object here: https://play.dhis2.org/d
emo/api/organisationUnits/dWOAzMcK2Wt.json?fields=id,name,
shortName,code,parent,openingDate
Put that in a json file:
{
"organisationUnits": [
{
"name": "kajdlkfjae",
...
}
]
}
and do a
curl -X POST "https://play.dhis2.org/demo/api/metadata" -H
"Content-Type:application/json" -d @orgunits.json -u admin:district
note that openingDate should be in format 'YYYY-MM-DD' (without time at the
end).
Best,
David
On Tue, Mar 28, 2017 at 11:17 AM, 林晓东 <lin_xd@xxxxxxx> wrote:
> hi,all
>
> can you tell me how to insert a org with webapi?
> base org info: org name,code,parent code
>
>
> Thanks
>
> --
> 此致
>
> 林晓东
>
> 莫愁前路无知己,天下谁人不识君。
>
>
>
>
> _______________________________________________
> 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
>
>
--
*David Huser*
DHIS2 Support Specialist
dhuser@xxxxxxxxxxxxxx | https://baosystems.com | Skype: dafhus | 2900 K
Street, Suite 406, Washington D.C. 20007
References