Hello All - wondering if anyone has used the tklattribute REST implementation yet?
Here's my little quick snippet that I have tried:
<html>
<body>
<div id="content">Testing</div>
</body>
<script src="/img/dev/js/jquery-1.11.2.min.js"></script>
<script src="/img/dev/js/common.js"></script>
<script>
$(document).ready(function() {
// get ll cookie value
var authToken = $.cookie('LLCookie');
var url="/otcs/llisapi.dll/api/v1/tklattribute/validvalues";
$.cookie.json = true;
$.ajax({
method:"POST",
url:url,
data: {
id: 57538,
attribute_key: 2
},
headers:{
"otcsticket": authToken
},
success:function(data){
console.log(data);
},
error:function(error){
console.log(error);
}
});
});
</script>
</html>
where;
id: 57538 is the nodeID that has a category applied. This category has a TKL attribute
attribute_key: 2 is the attrID from LLATTRDATA table for the TKL attribute of nodeID
I am getting a 500 Internal server error in the browser's console. I am using CS 16.2.6
Any thoughts or pointers?