Welcome to the Alfresco Builder Network

Our technical resource site is still being improved. We'd love to hear your feedback. Tell us what you think

Provides access to an initialized AlfrescoJSApi instance.

Basic Usage

export class MyComponent implements OnInit {

    constructor(private apiService: AlfrescoApiService) {   
    }

    ngOnInit() {
        let nodeId = 'some-node-id';
        let params = {};
        this.apiService.getInstance().nodes
            .getNodeChildren(nodeId, params)
            .then(result => console.log(result));
    }
}

Properties

NameTypeDefault valueDescription
contentApiContentApi(Read only) Accesses the Content API
nodesApiNodesApi(Read only) Accesses the Nodes API
renditionsApiRenditionsApi(Read only) Accesses the Renditions API
sharedLinksApiSharedLinksApi(Read only) Accesses the Shared Links API
sitesApiSitesApi(Read only) Accesses the Sites API
favoritesApiFavoritesApi(Read only) Accesses the Favorites API
peopleApiPeopleApi(Read only) Accesses the People API
searchApiSearchApi(Read only) Accesses the Search API
versionsApiVersionsApi(Read only) Accesses the Versions API
classesApiClassesApi(Read only) Accesses the Classes API
groupsApiGroupsApi(Read only) Accesses the Groups API

Events

NameTypeDescription
nodeUpdatedSubject<Node>Emitted when a node updates.

Details

Note for developers: The TypeScript declaration files for the Alfresco JS API are still under development and some Alfresco APIs may not be accessible via your IDE's intellisense or TypeScript compiler. To avoid these TypeScript type check errors, you can call any supported Alfresco JS api by casting the instance to the any type as in the following example:

let api: any = this.apiService.getInstance();
api.nodes.addNode('-root-', body, {});

Interested in trying Alfresco?

Try Now