01-31-2014 07:16 AM
Hi There,
I'm trying to test a simple rest call trough the console (firebug in firefox) on nuxeo 5.9.1 (I'm logged in)
jQuery.ajax({
type: 'POST',
url: '/nuxeo/api/v1/path/default-domain',
data:{"entity-type": "document", "name":"docje", "type": "File","properties": { "dc:title": "docje", "dc:description": "Created via a so cool and simple REST API", "common:icon": "/icons/file.gif", "common:icon-expanded": null, "common:size": null}}
});
But I get an 500 internal server error: Nos doc type specified.
Am I doing something wrong?
Thanks, Bauke
01-31-2014 07:49 AM
Already fixed it
jQuery.ajax({
type: 'post',
url: '/nuxeo/api/v1/path/default-domain',
data:'{"entity-type": "document", "name":"docje", "type": "File","properties": { "dc:title": "docje", "dc:description": "Created via a so cool and simple REST API", "common:icon": "/icons/file.gif", "common:icon-expanded": null, "common:size": null}}',
contentType: "application/json; charset=utf-8",
dataType: "json"
});
I missed the content and data type. -_-
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.