dhis2-devs-core team mailing list archive
-
dhis2-devs-core team
-
Mailing list archive
-
Message #00690
DataSetElements
Hey Guys,
I'm having the following "issues" with the new dataElementSet stuff.
*Scenario 1: *
GET a dataSet using
http://localhost:8080/dhis/api/25/dataSets/TuL8IOPzpHh.json?fields=:owner
PUT the identical payload back
http://localhost:8080/dhis/api/25/dataSets/TuL8IOPzpHh.json
Result: The dataElementSet collection is cleared out.
*Scenario 2: *Since 1 didn't work i figured i would load dataSetElements as
an additional field (@Morten: Lars will fix this one)
GET a dataSet
http://localhost:8080/dhis/api/25/dataSets/V8MHeZHIrcP.json?fields=:owner,dataSetElements
PUT the received payload.
Result:
{
"httpStatus": "Internal Server Error",
"httpStatusCode": 500,
"status": "ERROR"
}
*Scenario 3*: I figured i might need to send back more complete objects
GET the dataSet with more complete dataSetElements
http://localhost:8080/dhis/api/25/dataSets/V8MHeZHIrcP.json?fields=:owner,dataSetElements[id,dataSet,dataElement,categoryCombo]
PUT back the received payload.
Result:
{
"httpStatus": "Conflict",
"httpStatusCode": 409,
"status": "ERROR",
"message": "About to execute actions, but there are unresolved entity
insert actions."
}
I'll attempt to use the metadata endpoint to see if i can resolve it this
way, but we will probably need a solution for Scenario 1 and Scenario 3.
--
Regards,
Mark Polak
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org <https://www.dhis2.org/>
mark@xxxxxxxxx
Follow ups