← Back to team overview

dhis2-devs team mailing list archive

Re: Creating Data Elements using the API

 

Hi Everyone

On a similar note, is it possible to purposely set the UID value for a
particular element/indicator/orgunit using the web API?

Regards,
Greg


On Mon, Aug 25, 2014 at 1:57 PM, James Muranga <jmured@xxxxxxxxx> wrote:

> Thanks Morten , the schemas endpoint is what we were looking for .
> We can view the options for enum from the dhis2 web interface for now .
> Thanks
>
>
> On Mon, Aug 25, 2014 at 2:48 PM, Morten Olav Hansen <mortenoh@xxxxxxxxx>
> wrote:
>
>> Hi James
>>
>> We have a schema-generator at /api/schemas/type
>> (/api/schemas/dataElement), sadly this is not done yet, as possible options
>> for enums etc are not listed.
>>
>> The only real solution to this today, is to create a few data-elements
>> that has the options you want to import, then go to /api/dataElement/ID and
>> export it.. and look at the payload.
>>
>> --
>> Morten
>>
>>
>> On Mon, Aug 25, 2014 at 6:38 PM, James Muranga <jmured@xxxxxxxxx> wrote:
>>
>>> Hello,
>>> Hope everyone is okay.
>>> We are working on creating a simple tool to automate how we setup data
>>> elements on a dhis2 instance.
>>> We are using a rest client to post json to the endpoint
>>> /api/dataElements to create an element.
>>> We are using the demo instance to test and it gives us an interesting
>>> error about  a failed not null constraint on the column valuetype. This
>>> also happens when we provided values e.g valuetype:string or
>>> valueType:string , has anyone else experienced the same ? Or could you
>>> guide us on how we can get around this problem.
>>>
>>> Is there way to see which fields are required ?
>>> We have attached the output from the api call.
>>>
>>> --
>>> Muranga James
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>
>
> --
> Muranga James
>
> _______________________________________________
> 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
>
>


-- 

Business Intelligence Planner
*Health Information Systems Programme*
*- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - *
Mobile  :    073 246 2992
Landline:   021 554 3130
Fax:          086 733 8432
Skype:      gregory_rowles

Follow ups

References