dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33031
Re: Creating options and optionsets via api
Also please note, we are moving all of the "dev" stuff to a new Developer
Guide (
https://www.dhis2.org/doc/snapshot/en/developer/html/dhis2_developer_manual.html)
where we hope to be able to offer more up to date and more technical
information in the near future.
Regards,
Jason
On Thu, Sep 25, 2014 at 6:05 AM, Morten Olav Hansen <mortenoh@xxxxxxxxx>
wrote:
> Hi
>
> As with most of our current metadata, this process is not documented. It
> does however follow the normal flow of all our metadata, which means that
> objects that are based on UID most be referenced, instead of directly
> contained.
>
> A sample payload would be something like this:
>
> {
> "options": [
> { "name": "Option 1", "code": "option_1" },
> { "name": "Option 2", "code": "option_2" },
> { "name": "Option 3", "code": "option_3" }
> ],
> "optionSets": [
> { "name": "Options", "options": [ { ... here you must match either on
> id or code ... }]
> ]
> }
>
> Remember that if you want to create it all in one go, and don't have the
> ID, you can set matching strategy to code.
>
> If you want to get a larger sample, you can have a look at the output from
> this (admin / district):
>
> https://apps.dhis2.org/dev/api/metadata.json?assumeTrue=false&options=true&optionSets=true
>
> The way options/optionSets have changed in 2.17 to allow for them to be
> translated as our other metadata.
>
> --
> Morten
>
> On Thu, Sep 25, 2014 at 12:15 AM, Mahendra Kariya <
> mahendra.kariya@xxxxxxxxxxxxxxxx> wrote:
>
>> Hi,
>>
>> Could you please point us to the documentation for the API to create
>> options and option sets?
>> We tried searching the user manual
>> <https://www.dhis2.org/doc/snapshot/en/user/html/ch31.html>, but
>> couldn't find anything.
>>
>>
>>
>> Thanks,
>> Mahendra
>> *Thought*Works
>>
>
>
> _______________________________________________
> 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
References