Hi,
We're trying to create a Virtual Folder via the REST API. Currently we're having some issues with passing the correct "datatype" for the Selected Facets list.
We're getting the following error:
Error: Could not process object, invalid datatype for 'Selected Facets' .
The request we're sending to test is:
var xmlhttp = new XMLHttpRequest();
var strPath = '[LL_REPTAG_URLPREFIX /]/api/v2/nodes';
xmlhttp.open('POST', strPath, true);
var myBody = 'type=' + encodeURIComponent(type) +
'&name=' + encodeURIComponent(name) +
'&parent_id=' + encodeURIComponent(parent_id) +
'&location_id=' + encodeURIComponent(location_id) +
'&selected_facets=' + selected_facets;
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
document.getElementById('#responseDiv').innerHTML = xmlhttp.responseText;
}
}
}
// Send the POST request
xmlhttp.setRequestHeader("OTCSTicket", token);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.setRequestHeader('Accept', 'application/json');
xmlhttp.send(myBody);
Which values should the selected_facets
list contain? We've tried with ['2991',['0','144']] and {'2991',{'0','144'}} , but both requests provide the same "invalid datatype" error.