cancel
Showing results for 
Search instead for 
Did you mean: 

automatically associate documents to a template for REST created documents

Bauke_Roo
Star Contributor
Star Contributor

Hi There,

I've installed the template-rendering-addon and configured it to automatically associate to a documenttype.

If I create a new document by using the web interface of Nuxeo it works fine. However if I try to create a new document using the REST API the template is not bound to the document. (it does not show in the tab associated templates).

my REST api call is as follows:

jQuery.ajax({
	type: 'POST',
	contentType: "application/json",
	dataType: "json",
	url: '/nuxeo/api/v1/path/default-domain/workspaces/A',
	data: '{"entity-type": "document", "name":"answers2", "type": "surveyAnswers", "properties": {"dc:title":"testje","surveyanswers:question1n":' +now1+',"surveyanswers:question1f": '+future1+',"surveyanswers:question2n": '+now2+',	"surveyanswers:question2f": '+future2+',"surveyanswers:question3n": '+now3+',	"surveyanswers:question3f": '+future3+'}}'
	}
);

Is it supported to bind templates automatically to documents created by the REST API?

Thanks in advance, Bauke

0 REPLIES 0
Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

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.