Skip to main content

@wildix/wim-knowledge-base-client > ListHistoryStatisticsCommand

ListHistoryStatisticsCommand class

You can use this endpoint to retrieve the search history statistics.

Signature:

export declare class ListHistoryStatisticsCommand extends ListHistoryStatisticsCommand_base 

Extends: ListHistoryStatisticsCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { KnowledgeBaseClient, ListHistoryStatisticsCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
// const { KnowledgeBaseClient, ListHistoryStatisticsCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
const client = new KnowledgeBaseClient(config);
const input = { // ListHistoryStatisticsInput
companyId: "STRING_VALUE",
filter: { // HistoryStatisticsFilter
knowledgeBaseIds: [ // StringList
"STRING_VALUE",
],
dataSourceIds: [
"STRING_VALUE",
],
daysBack: Number("int"),
},
};
const command = new ListHistoryStatisticsCommand(input);
const response = await client.send(command);
// { // ListHistoryStatisticsOutput
// statistics: { // HistoryStatistics
// totalRequests: Number("int"), // required
// recentRequests: Number("int"), // required
// totalUniqueUsers: Number("int"), // required
// recentUniqueUsers: Number("int"), // required
// noResultsRequests: Number("int"), // required
// dailyBreakdown: [ // DailyStatisticsList
// { // DailyStatistics
// date: "STRING_VALUE", // required
// requests: Number("int"), // required
// uniqueUsers: Number("int"), // required
// noResultsRequests: Number("int"), // required
// },
// ],
// },
// };