automatically associate documents to a template for REST created documents

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:

    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 votes

0 answers