Developers

GetContentDecisionTree

Usage

Use this method to get a decision tree from a specific content id:

client.getContentDecisionTree(contentId:Integer).then(function(response){
    //...
});

Mandatory parameters

Name Type Description
contentId integer Content identifier from the knowledge base. Minimum:0

Options

This method does not have any options.

Response data format

This method calls the Knowledge API’s GET /contents/{contentId}/decision-tree endpoint. Please refer to the Responses section of that endpoint on the Knowledge API Routes page for the response format.

Example

The following example is set to retrieve a decision tree from content "1":

client.getContentDecisionTree(1).then(function(response){
    response.data.results.forEach(function(result) {
        console.log(`Result(${result.query})`);
    });
});