I read in the doc that I can send individual data values as a JSON payload using the following resource using Content-Type: application/json
with endpoint supports specifying attribute option combos in a nested structure like:
{
"dataElement": "BOSZApCrBni",
"categoryOptionCombo": "TkDhg29x18A",
"attribute": {
"combo": "O4VaNks6tta",
"options": ["C6nZpLKjEJr", "i4Nbp8S2G6A"]
},
"dataSet": "lyLU2wR22tC",
"period": "202201",
"orgUnit": "DiszpKrYNg8",
"value": "15",
"comment": "Good"
}
I have two questions.
- Where for example in the Maintenance app do I get the values for the
combo
andoptions
in the attribute object.
"attribute": {
"combo": "O4VaNks6tta",
"options": ["C6nZpLKjEJr", "i4Nbp8S2G6A"]
}
- If I set up a AOC with option “C6nZpLKjEJr” and “i4Nbp8S2G6A” which I supposed will go into the options value in 1 above, when sending the payload do I need to attached the two values always?
Say for instance in my custom app, a user is filling the form AOC option “C6nZpLKjEJr”, do I send the attribute part like this:
"attribute": {
"combo": "O4VaNks6tta",
"options": ["C6nZpLKjEJr"]
}
or like this
"attribute": {
"combo": "O4VaNks6tta",
"options": ["C6nZpLKjEJr", "i4Nbp8S2G6A"]
}