Hello,
I am pretty experienced with their APIs as I use them monthly to create new sessions and events for our courses. You are correct that there are a minimum set of fields you need to re-send when updating/populating a session additional field. I am pretty sure there is not a way to get around that, unfortunately.
When doing this via Postman, I have to re-send these fields
{
"name": "{{name}}",
"code": "{{code}}",
"description": "{{description}}",
"min_enroll": {{min_enroll}},
"max_enroll": {{max_enroll}},
"instructors": {{instructors}},
"score_base": {{score_base}},
"evaluation_type": {{evaluation_type}},
"enable_deeplink": {{enable_deeplink}}
}
You could set this up using Docebo Connect and make some of those fields static in the body request; however, if they vary, that wouldn’t really help you.
Hello,
I am pretty experienced with their APIs as I use them monthly to create new sessions and events for our courses. You are correct that there are a minimum set of fields you need to re-send when updating/populating a session additional field. I am pretty sure there is not a way to get around that, unfortunately.
When doing this via Postman, I have to re-send these fields
{
"name": "{{name}}",
"code": "{{code}}",
"description": "{{description}}",
"min_enroll": {{min_enroll}},
"max_enroll": {{max_enroll}},
"instructors": {{instructors}},
"score_base": {{score_base}},
"evaluation_type": {{evaluation_type}},
"enable_deeplink": {{enable_deeplink}}
}
You could set this up using Docebo Connect and make some of those fields static in the body request; however, if they vary, that wouldn’t really help you.
Hi William, thanks for your reply.
My issue is that I need to update only one additional field of existing sessions, but if I don’t include all the additional fields in the API call, the omitted ones get overwritten with empty values, causing the existing data to be lost.
Right - that’s what I was referring to above. You need to re-send those fields when updating, too. According to the API explorer, this endpoint overwrites session data based on the payload passed. All optional fields not passed in the payload will be converted to default empty values and will be overwritten.
Depending on the amount, you could also pull the data via API and map to the fields for your existing values. If you have a large number, you will have to batch out by the hour or use Connect, as this can add a lot more calls per session. For Learning Plans and Courses, the mapping from the get to the update can be annoyingly inconsistent, but once they’re mapped out, the process works very smoothly.