← Back to team overview

dhis2-devs team mailing list archive

Creating Data Elements using the API

 

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

Follow ups