Query
December 15, 2025 ยท View on GitHub
Overview
Available Operations
- conversations - Query Conversations
- queryEvents - Query Events
- queryFeedback - Query Feedback
- querySemanticThreads - Query Semantic Threads
- exportSemanticThreadsQueryResults - Export Semantic Threads Query Results
- exportConversationsQueryResults - Export Conversations Query Results
- exportEventsQueryResults - Export Events Query Results
- exportFeedbackQueryResults - Export Feedback Query Results
- queryPropertyKeys - Query Property Keys
- queryPropertyValues - Query Property Values
conversations
Query Conversations
Example Usage
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.conversations({
notes: "Count of support ticket conversations by integration",
});
console.log(result);
}
run();
Standalone function
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({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await queryConversations(inkeepAnalytics, {
notes: "Count of support ticket conversations by integration",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryConversations failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryConversationsMutation
} from "@inkeep/inkeep-analytics/react-query/queryConversations.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QueryConversationsRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.QueryConversationsResponseBody>
Errors
| 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 | */* |
queryEvents
Query Events
Example Usage
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.queryEvents({
notes: "Count of events by type",
});
console.log(result);
}
run();
Standalone function
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({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await queryQueryEvents(inkeepAnalytics, {
notes: "Count of events by type",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryQueryEvents failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryQueryEventsMutation
} from "@inkeep/inkeep-analytics/react-query/queryQueryEvents.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QueryEventsRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.QueryEventsResponseBody>
Errors
| 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 | */* |
queryFeedback
Query Feedback
Example Usage
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.queryFeedback({
notes: "Count of feedback by type",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryQueryFeedback } from "@inkeep/inkeep-analytics/funcs/queryQueryFeedback.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 queryQueryFeedback(inkeepAnalytics, {
notes: "Count of feedback by type",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryQueryFeedback failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryQueryFeedbackMutation
} from "@inkeep/inkeep-analytics/react-query/queryQueryFeedback.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QueryFeedbackRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.QueryFeedbackResponseBody>
Errors
| 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 | */* |
querySemanticThreads
Query Semantic Threads
Example Usage
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.querySemanticThreads({
notes: "Count of chat sessions with documentation gaps by integration",
});
console.log(result);
}
run();
Standalone function
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({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await queryQuerySemanticThreads(inkeepAnalytics, {
notes: "Count of chat sessions with documentation gaps by integration",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryQuerySemanticThreads failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryQuerySemanticThreadsMutation
} from "@inkeep/inkeep-analytics/react-query/queryQuerySemanticThreads.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QuerySemanticThreadsRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.QuerySemanticThreadsResponseBody>
Errors
| 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 | */* |
exportSemanticThreadsQueryResults
Export Semantic Threads Query Results
Example Usage
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({
notes: "Count of chat sessions with documentation gaps by integration",
});
console.log(result);
}
run();
Standalone function
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, {
notes: "Count of chat sessions with documentation gaps by integration",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryExportSemanticThreadsQueryResults failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryExportSemanticThreadsQueryResultsMutation
} from "@inkeep/inkeep-analytics/react-query/queryExportSemanticThreadsQueryResults.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QuerySemanticThreadsRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<ReadableStream
Errors
| 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 | */* |
exportConversationsQueryResults
Export Conversations Query Results
Example Usage
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.exportConversationsQueryResults({
notes: "Count of support ticket conversations by integration",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryExportConversationsQueryResults } from "@inkeep/inkeep-analytics/funcs/queryExportConversationsQueryResults.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 queryExportConversationsQueryResults(inkeepAnalytics, {
notes: "Count of support ticket conversations by integration",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryExportConversationsQueryResults failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryExportConversationsQueryResultsMutation
} from "@inkeep/inkeep-analytics/react-query/queryExportConversationsQueryResults.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QueryConversationsRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<ReadableStream
Errors
| 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 | */* |
exportEventsQueryResults
Export Events Query Results
Example Usage
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.exportEventsQueryResults({
notes: "Count of events by type",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryExportEventsQueryResults } from "@inkeep/inkeep-analytics/funcs/queryExportEventsQueryResults.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 queryExportEventsQueryResults(inkeepAnalytics, {
notes: "Count of events by type",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryExportEventsQueryResults failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryExportEventsQueryResultsMutation
} from "@inkeep/inkeep-analytics/react-query/queryExportEventsQueryResults.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QueryEventsRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<ReadableStream
Errors
| 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 | */* |
exportFeedbackQueryResults
Export Feedback Query Results
Example Usage
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.exportFeedbackQueryResults({
notes: "Count of feedback by type",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryExportFeedbackQueryResults } from "@inkeep/inkeep-analytics/funcs/queryExportFeedbackQueryResults.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 queryExportFeedbackQueryResults(inkeepAnalytics, {
notes: "Count of feedback by type",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryExportFeedbackQueryResults failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryExportFeedbackQueryResultsMutation
} from "@inkeep/inkeep-analytics/react-query/queryExportFeedbackQueryResults.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.QueryFeedbackRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<ReadableStream
Errors
| 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 | */* |
queryPropertyKeys
Query Property Keys
Example Usage
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.queryPropertyKeys({
field: "properties",
views: [
"events_view",
"conversations_view",
"semantic_threads_view",
"feedback_view",
],
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryQueryPropertyKeys } from "@inkeep/inkeep-analytics/funcs/queryQueryPropertyKeys.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 queryQueryPropertyKeys(inkeepAnalytics, {
field: "properties",
views: [
"events_view",
"conversations_view",
"semantic_threads_view",
"feedback_view",
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryQueryPropertyKeys failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryQueryPropertyKeysMutation
} from "@inkeep/inkeep-analytics/react-query/queryQueryPropertyKeys.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.PropertyKeysRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PropertyKeysResponseBody>
Errors
| 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 | */* |
queryPropertyValues
Query Property Values
Example Usage
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.queryPropertyValues({
field: "properties",
key: "theme",
views: [
"events_view",
"conversations_view",
"semantic_threads_view",
"feedback_view",
],
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryQueryPropertyValues } from "@inkeep/inkeep-analytics/funcs/queryQueryPropertyValues.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 queryQueryPropertyValues(inkeepAnalytics, {
field: "properties",
key: "theme",
views: [
"events_view",
"conversations_view",
"semantic_threads_view",
"feedback_view",
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("queryQueryPropertyValues failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useQueryQueryPropertyValuesMutation
} from "@inkeep/inkeep-analytics/react-query/queryQueryPropertyValues.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.PropertyValuesRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | 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 | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PropertyValuesResponseBody>
Errors
| 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 | */* |