Developers

GetPush

Usage

Use this method to retrieve specific content from knowledge base defined as pushed contents:

client.getPush(options:Object).then(function(response){
    //...
});

Mandatory parameters

This method does not have any mandatory parameters.

Options

Name Type Default Description
categoryId string 0 Category identifier from the Knowledge instance knowledge base. Category id 0 is reserved for the root. This parameter allows a string with the categories separated by commas. Example: 1,4,5 will search in the categories 1, 4 and 5.
length integer 5 Maximum number of items that may be returned in collection. Minimum:1. Max:100
offset integer 0 Starting index within the collection of resource result. Minimum:0.

Response data format

This method calls the Knowledge API’s GET /contents/push 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 5 to 15 push contents defined in the knowledge base:

client.getPush({
    length:10,
    offset:5,
}).then(function(response){
    response.data.results.forEach(function(result) {
        console.log(`Result(${result.id}): ${result.title}`);
    });
});