As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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#updateNode
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.