Developers

GetUserQuestionContents

Usage

Use this method to retrieve the contents of a certain user question from the knowledge base.

client.getUserQuestionContents(userQuestionId:Integer).then(function(response){
    //...
});

Mandatory parameters

Name Type Description
userQuestionId integer User question identifier from the Knowledge instance. Minimum:0

Options

This method does not have any options.

Response data format

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

Example

The following example retrieves the content related to a specific user question defined by id '1':

// The parameter is the user question id
client.getUserQuestionContents(1).then(function(response){
    response.data.results.forEach(function(result) {
        console.log(`Result(${result.id}): ${result.title}`);
    });
});