(newbie here, please bear with me)
Dear all,
I have a widget running with some javascript. I can get info through the API (get the TOC, whoami etc.), I can change the Title of a Topic, it all works.
What I want to do, is change the CONTENT_COMPLETIONTYPE_T with an API call. In the TOC object, CompletionType exists for Topic X, but when I get the Topic, CompletionType isn't there. Also, when I do this call, Title gets changed to the dummy value as expected, there is no error or warning, but the update on CompletionType is ignored.
const updatedTopicData = {
...topicData,
Title: 'My Dummy Title',
CompletionType: '2'
};
const LE_API_VERSION = '1.85';
const updateResponse = await fetch('/d2l/api/le/' + LE_API_VERSION + '/' + orgUnitId + '/content/topics/' + topicId, {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
credentials: 'include',
body: JSON.stringify(updatedTopicData)
});
Is this expected behaviour, as in: CompletionType updates are not supported (on the type Topic)? Is there another way to do this?
TIA!
Jules.