(query)
- conversations - Query Conversations
- queryEvents - Query Events
- querySemanticThreads - Query Semantic Threads
- exportSemanticThreadsQueryResults - Export Semantic Threads Query Results
Query Conversations
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics();
async function run() {
const result = await inkeepAnalytics.query.conversations({
webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
}, {});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryConversations } from "@inkeep/inkeep-analytics/funcs/queryConversations.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore();
async function run() {
const res = await queryConversations(inkeepAnalytics, {
webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
}, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.QueryConversationsRequestBody | ✔️ | The request object to use for the request. |
security |
operations.QueryConversationsSecurity | ✔️ | The security requirements to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.QueryConversationsResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/problem+json |
errors.Unauthorized | 401 | application/problem+json |
errors.Forbidden | 403 | application/problem+json |
errors.UnprocessableEntity | 422 | application/problem+json |
errors.InternalServerError | 500 | application/problem+json |
errors.APIError | 4XX, 5XX | */* |
Query Events
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics();
async function run() {
const result = await inkeepAnalytics.query.queryEvents({
webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
}, {});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryQueryEvents } from "@inkeep/inkeep-analytics/funcs/queryQueryEvents.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore();
async function run() {
const res = await queryQueryEvents(inkeepAnalytics, {
webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
}, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.QueryEventsRequestBody | ✔️ | The request object to use for the request. |
security |
operations.QueryEventsSecurity | ✔️ | The security requirements to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.QueryEventsResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/problem+json |
errors.Unauthorized | 401 | application/problem+json |
errors.Forbidden | 403 | application/problem+json |
errors.UnprocessableEntity | 422 | application/problem+json |
errors.InternalServerError | 500 | application/problem+json |
errors.APIError | 4XX, 5XX | */* |
Query Semantic Threads
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics();
async function run() {
const result = await inkeepAnalytics.query.querySemanticThreads({
webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
}, {});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryQuerySemanticThreads } from "@inkeep/inkeep-analytics/funcs/queryQuerySemanticThreads.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore();
async function run() {
const res = await queryQuerySemanticThreads(inkeepAnalytics, {
webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
}, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.QuerySemanticThreadsParamsSchema | ✔️ | The request object to use for the request. |
security |
operations.QuerySemanticThreadsSecurity | ✔️ | The security requirements to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.QuerySemanticThreadsResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/problem+json |
errors.Unauthorized | 401 | application/problem+json |
errors.Forbidden | 403 | application/problem+json |
errors.UnprocessableEntity | 422 | application/problem+json |
errors.InternalServerError | 500 | application/problem+json |
errors.APIError | 4XX, 5XX | */* |
Export Semantic Threads Query Results
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const result = await inkeepAnalytics.query.exportSemanticThreadsQueryResults({});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryExportSemanticThreadsQueryResults } from "@inkeep/inkeep-analytics/funcs/queryExportSemanticThreadsQueryResults.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await queryExportSemanticThreadsQueryResults(inkeepAnalytics, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.QuerySemanticThreadsParamsSchema | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<ReadableStream>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/problem+json |
errors.Unauthorized | 401 | application/problem+json |
errors.Forbidden | 403 | application/problem+json |
errors.UnprocessableEntity | 422 | application/problem+json |
errors.InternalServerError | 500 | application/problem+json |
errors.APIError | 4XX, 5XX | */* |