Hi,
in the REST API to update a node's languages, the API specifies a PUT request for /v1/nodes/:id and where you pass name and description as parameters in the body of the request. In a posting here( https://developer.opentext.com/webaccess/#url=/awd/forums/questions/6672161&tab=501), I asked about how you get JSON data to the REST API. Perhaps this forum is a better place for that question.
I have some jquery that looks like this:
var name = root.find('input[name="src-name"]').val(); var desc = root.find('input[name="src-desc"]').val(); var queryString = 'name=' + encodeURIComponent(name) + "&description=" + encodeURIComponent(desc); queryString += "&body=" + strPayload; // str payload is {'name_multilingual' :{de:'Deutsch Name', fr:'Nom'...etc} which has been stringified. $.ajax({ url: this.urlprefix + 'nodes/' + id, beforeSend: function(xHdr) { xHdr.setRequestHeader("otcsticket", otcsticket); }, method: 'PUT', dataType: 'json', data: 'body=' + encodeURIComponent(strPayload), success: function(response) { console.log(response); }, error: function(jqXHR, status, error) { console.log("Got error from server"); console.log(status); console.log(error); } });So my question is what is the correct way to call the REST API to pass it names and descriptions to update in multiple languages?
Thanks
-Hugh