Has anyone be successfull at implementing the NodesApi ? https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodesApi.md#u...
Have tried NodesApiService (createNode doesn't work). https://www.alfresco.com/abn/adf/docs/core/services/nodes-api.service/
Have tried AlfrescoApiService (nodesApi.updateNode works). https://www.alfresco.com/abn/adf/docs/core/services/alfresco-api.service/
How can I implement NodesApi javascript/typescipt so all available methods work?
Hi @robertwoodhead have you tried to follow the example?
import NodesApi from 'NodesApi'; import { AlfrescoApi } from '@alfresco/js-api'; this.alfrescoApi = new AlfrescoApi(); this.alfrescoApi.setConfig({ hostEcm: 'http://127.0.0.1:8080' }); let nodesApi = new NodesApi(this.alfrescoApi); nodesApi.createNode('-root-', { { "name": "My new subfolder" }, nodeType: 'cm:folder' }).then((data) => { console.log('API called successfully. Returned data: ' + data); }, function(error) { console.error(error); });
Hii,
Please check once version of '@alfresco/js-api' in package.json file, it should be latest version like 3.9.0. to use all updated services and its methods. Then run npm i command and you will get all avilable methods using NodesApi Service.
Discussions, help and advice about the Alfresco Development Framework.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.