Analytics apiQuerySemantic threads
Query Semantic Threads
Authorization
Authorization
RequiredBearer <token>The API key for a Web integration. For more details, see authentication documentation
In: header
Authorization
RequiredBearer <token>The API key for an API integration. For more details, see authentication documentation
In: header
Request Body
application/json
RequiredNote: The maximum size of the request body is 2 MB.
query
stringselect
array<SemanticThreadSelection>groupBy
array<SemanticThreadGroupBy>where
SemanticThreadFilterorderBy
array<SemanticThread OrderBy Schema>notes
stringNotes are not persisted, but may be useful for your debugging purposes
Maximum length:
80
Response Body
Response body for QuerySemanticThreads query endpoint
status
RequiredstringStatus of the response
Value in:
"ok"
data
RequiredobjectData object containing QuerySemanticThreads query results and pagination information
/**
* Response body for QuerySemanticThreads query endpoint
*/
export interface Response {
/**
* Status of the response
*/
status: "ok";
data: QuerySemanticThreadsResponseData;
}
/**
* Data object containing QuerySemanticThreads query results and pagination information
*/
export interface QuerySemanticThreadsResponseData {
result: SemanticThreadResultItem[];
/**
* Total number of results matching the query
*/
total: number;
/**
* Number of results per page
*/
pageSize: number;
/**
* Number of results in the current response
*/
count: number;
}
export interface SemanticThreadResultItem {
id?: string;
messageIds?: unknown;
messagesCount?: unknown;
organizationId?: string;
question?: string;
questionLength?: unknown;
answer?: string;
isOnTopic?: unknown;
isClear?: unknown;
isDocumented?: unknown;
isFeatureSupported?: unknown;
isAnswerConfident?: unknown;
gapSummary?: unknown;
subject?: unknown;
category?: unknown;
languages?: unknown;
firstPartyEntities?: unknown;
thirdPartyEntities?: unknown;
emotion?: unknown;
sentiment?: unknown;
questionType?: unknown;
projectId?: string;
integrationId?: string;
/**
* A customizable collection of custom properties or attributes.
*/
properties?: {
[k: string]: unknown;
} | null;
/**
* A customizable collection of custom properties or attributes. Some properties have first class support for the Inkeep Portal or Widget and are noted in the description.
*/
userProperties?: {
/**
* The unique identifier for the user. This value is sent by the inkeep widget.
*/
id?: string | number | null;
/**
* The type of identification for the user. This value is sent by the inkeep widget.
*/
identificationType?: string | null;
/**
* The unique identifier for the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
*/
userId?: string | number | null;
/**
* The name of the support agent assigned to the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
*/
supportAgentName?: string | null;
[k: string]: unknown;
} | null;
firstMessageTime?: string;
lastMessageTime?: string;
lastUpdated?: string;
hasPositiveFeedback?: boolean;
hasNegativeFeedback?: boolean;
conversationIds?: string[];
areAIAnnotationsVerified?: unknown;
isInitialQuestionAnswer?: boolean;
sum?: number;
count?: number;
avg?: number;
min?: number;
max?: number;
id_hour?: string;
id_day?: string;
id_week?: string;
id_month?: string;
messageIds_hour?: string;
messageIds_day?: string;
messageIds_week?: string;
messageIds_month?: string;
messagesCount_hour?: string;
messagesCount_day?: string;
messagesCount_week?: string;
messagesCount_month?: string;
organizationId_hour?: string;
organizationId_day?: string;
organizationId_week?: string;
organizationId_month?: string;
question_hour?: string;
question_day?: string;
question_week?: string;
question_month?: string;
questionLength_hour?: string;
questionLength_day?: string;
questionLength_week?: string;
questionLength_month?: string;
answer_hour?: string;
answer_day?: string;
answer_week?: string;
answer_month?: string;
isOnTopic_hour?: string;
isOnTopic_day?: string;
isOnTopic_week?: string;
isOnTopic_month?: string;
isClear_hour?: string;
isClear_day?: string;
isClear_week?: string;
isClear_month?: string;
isDocumented_hour?: string;
isDocumented_day?: string;
isDocumented_week?: string;
isDocumented_month?: string;
isFeatureSupported_hour?: string;
isFeatureSupported_day?: string;
isFeatureSupported_week?: string;
isFeatureSupported_month?: string;
isAnswerConfident_hour?: string;
isAnswerConfident_day?: string;
isAnswerConfident_week?: string;
isAnswerConfident_month?: string;
gapSummary_hour?: string;
gapSummary_day?: string;
gapSummary_week?: string;
gapSummary_month?: string;
subject_hour?: string;
subject_day?: string;
subject_week?: string;
subject_month?: string;
category_hour?: string;
category_day?: string;
category_week?: string;
category_month?: string;
languages_hour?: string;
languages_day?: string;
languages_week?: string;
languages_month?: string;
firstPartyEntities_hour?: string;
firstPartyEntities_day?: string;
firstPartyEntities_week?: string;
firstPartyEntities_month?: string;
thirdPartyEntities_hour?: string;
thirdPartyEntities_day?: string;
thirdPartyEntities_week?: string;
thirdPartyEntities_month?: string;
emotion_hour?: string;
emotion_day?: string;
emotion_week?: string;
emotion_month?: string;
sentiment_hour?: string;
sentiment_day?: string;
sentiment_week?: string;
sentiment_month?: string;
questionType_hour?: string;
questionType_day?: string;
questionType_week?: string;
questionType_month?: string;
projectId_hour?: string;
projectId_day?: string;
projectId_week?: string;
projectId_month?: string;
integrationId_hour?: string;
integrationId_day?: string;
integrationId_week?: string;
integrationId_month?: string;
properties_hour?: string;
properties_day?: string;
properties_week?: string;
properties_month?: string;
userProperties_hour?: string;
userProperties_day?: string;
userProperties_week?: string;
userProperties_month?: string;
firstMessageTime_hour?: string;
firstMessageTime_day?: string;
firstMessageTime_week?: string;
firstMessageTime_month?: string;
lastMessageTime_hour?: string;
lastMessageTime_day?: string;
lastMessageTime_week?: string;
lastMessageTime_month?: string;
lastUpdated_hour?: string;
lastUpdated_day?: string;
lastUpdated_week?: string;
lastUpdated_month?: string;
hasPositiveFeedback_hour?: string;
hasPositiveFeedback_day?: string;
hasPositiveFeedback_week?: string;
hasPositiveFeedback_month?: string;
hasNegativeFeedback_hour?: string;
hasNegativeFeedback_day?: string;
hasNegativeFeedback_week?: string;
hasNegativeFeedback_month?: string;
conversationIds_hour?: string;
conversationIds_day?: string;
conversationIds_week?: string;
conversationIds_month?: string;
areAIAnnotationsVerified_hour?: string;
areAIAnnotationsVerified_day?: string;
areAIAnnotationsVerified_week?: string;
areAIAnnotationsVerified_month?: string;
isInitialQuestionAnswer_hour?: string;
isInitialQuestionAnswer_day?: string;
isInitialQuestionAnswer_week?: string;
isInitialQuestionAnswer_month?: string;
sum_id?: number;
sum_messageIds?: number;
sum_messagesCount?: number;
sum_organizationId?: number;
sum_question?: number;
sum_questionLength?: number;
sum_answer?: number;
sum_isOnTopic?: number;
sum_isClear?: number;
sum_isDocumented?: number;
sum_isFeatureSupported?: number;
sum_isAnswerConfident?: number;
sum_gapSummary?: number;
sum_subject?: number;
sum_category?: number;
sum_languages?: number;
sum_firstPartyEntities?: number;
sum_thirdPartyEntities?: number;
sum_emotion?: number;
sum_sentiment?: number;
sum_questionType?: number;
sum_projectId?: number;
sum_integrationId?: number;
sum_properties?: number;
sum_userProperties?: number;
sum_firstMessageTime?: number;
sum_lastMessageTime?: number;
sum_lastUpdated?: number;
sum_hasPositiveFeedback?: number;
sum_hasNegativeFeedback?: number;
sum_conversationIds?: number;
sum_areAIAnnotationsVerified?: number;
sum_isInitialQuestionAnswer?: number;
count_id?: number;
count_messageIds?: number;
count_messagesCount?: number;
count_organizationId?: number;
count_question?: number;
count_questionLength?: number;
count_answer?: number;
count_isOnTopic?: number;
count_isClear?: number;
count_isDocumented?: number;
count_isFeatureSupported?: number;
count_isAnswerConfident?: number;
count_gapSummary?: number;
count_subject?: number;
count_category?: number;
count_languages?: number;
count_firstPartyEntities?: number;
count_thirdPartyEntities?: number;
count_emotion?: number;
count_sentiment?: number;
count_questionType?: number;
count_projectId?: number;
count_integrationId?: number;
count_properties?: number;
count_userProperties?: number;
count_firstMessageTime?: number;
count_lastMessageTime?: number;
count_lastUpdated?: number;
count_hasPositiveFeedback?: number;
count_hasNegativeFeedback?: number;
count_conversationIds?: number;
count_areAIAnnotationsVerified?: number;
count_isInitialQuestionAnswer?: number;
avg_id?: number;
avg_messageIds?: number;
avg_messagesCount?: number;
avg_organizationId?: number;
avg_question?: number;
avg_questionLength?: number;
avg_answer?: number;
avg_isOnTopic?: number;
avg_isClear?: number;
avg_isDocumented?: number;
avg_isFeatureSupported?: number;
avg_isAnswerConfident?: number;
avg_gapSummary?: number;
avg_subject?: number;
avg_category?: number;
avg_languages?: number;
avg_firstPartyEntities?: number;
avg_thirdPartyEntities?: number;
avg_emotion?: number;
avg_sentiment?: number;
avg_questionType?: number;
avg_projectId?: number;
avg_integrationId?: number;
avg_properties?: number;
avg_userProperties?: number;
avg_firstMessageTime?: number;
avg_lastMessageTime?: number;
avg_lastUpdated?: number;
avg_hasPositiveFeedback?: number;
avg_hasNegativeFeedback?: number;
avg_conversationIds?: number;
avg_areAIAnnotationsVerified?: number;
avg_isInitialQuestionAnswer?: number;
min_id?: number;
min_messageIds?: number;
min_messagesCount?: number;
min_organizationId?: number;
min_question?: number;
min_questionLength?: number;
min_answer?: number;
min_isOnTopic?: number;
min_isClear?: number;
min_isDocumented?: number;
min_isFeatureSupported?: number;
min_isAnswerConfident?: number;
min_gapSummary?: number;
min_subject?: number;
min_category?: number;
min_languages?: number;
min_firstPartyEntities?: number;
min_thirdPartyEntities?: number;
min_emotion?: number;
min_sentiment?: number;
min_questionType?: number;
min_projectId?: number;
min_integrationId?: number;
min_properties?: number;
min_userProperties?: number;
min_firstMessageTime?: number;
min_lastMessageTime?: number;
min_lastUpdated?: number;
min_hasPositiveFeedback?: number;
min_hasNegativeFeedback?: number;
min_conversationIds?: number;
min_areAIAnnotationsVerified?: number;
min_isInitialQuestionAnswer?: number;
max_id?: number;
max_messageIds?: number;
max_messagesCount?: number;
max_organizationId?: number;
max_question?: number;
max_questionLength?: number;
max_answer?: number;
max_isOnTopic?: number;
max_isClear?: number;
max_isDocumented?: number;
max_isFeatureSupported?: number;
max_isAnswerConfident?: number;
max_gapSummary?: number;
max_subject?: number;
max_category?: number;
max_languages?: number;
max_firstPartyEntities?: number;
max_thirdPartyEntities?: number;
max_emotion?: number;
max_sentiment?: number;
max_questionType?: number;
max_projectId?: number;
max_integrationId?: number;
max_properties?: number;
max_userProperties?: number;
max_firstMessageTime?: number;
max_lastMessageTime?: number;
max_lastUpdated?: number;
max_hasPositiveFeedback?: number;
max_hasNegativeFeedback?: number;
max_conversationIds?: number;
max_areAIAnnotationsVerified?: number;
max_isInitialQuestionAnswer?: number;
}
curl -X POST "https://api.analytics.inkeep.com/query/semantic-threads" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"query": "string",
"select": [
{
"type": "aggregation",
"aggregation": "sum",
"field": "id",
"path": [
"string"
]
}
],
"groupBy": [
{
"field": "id",
"path": [
"string"
],
"includeInSelect": true
}
],
"where": {
"condition": {
"field": "id",
"operator": "eq",
"value": "string"
}
},
"orderBy": [
{
"field": "id",
"direction": "asc"
}
],
"notes": "Count of chat sessions with documentation gaps by integration"
}'
{
"status": "ok",
"data": {
"result": [
{
"id": "string",
"messageIds": null,
"messagesCount": null,
"organizationId": "string",
"question": "string",
"questionLength": null,
"answer": "string",
"isOnTopic": null,
"isClear": null,
"isDocumented": null,
"isFeatureSupported": null,
"isAnswerConfident": null,
"gapSummary": null,
"subject": null,
"category": null,
"languages": null,
"firstPartyEntities": null,
"thirdPartyEntities": null,
"emotion": null,
"sentiment": null,
"questionType": null,
"projectId": "string",
"integrationId": "string",
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string"
},
"firstMessageTime": "2019-08-24T14:15:22Z",
"lastMessageTime": "2019-08-24T14:15:22Z",
"lastUpdated": "2019-08-24T14:15:22Z",
"hasPositiveFeedback": true,
"hasNegativeFeedback": true,
"conversationIds": [
"string"
],
"areAIAnnotationsVerified": null,
"isInitialQuestionAnswer": true,
"sum": 0,
"count": 0,
"avg": 0,
"min": 0,
"max": 0,
"id_hour": "string",
"id_day": "string",
"id_week": "string",
"id_month": "string",
"messageIds_hour": "string",
"messageIds_day": "string",
"messageIds_week": "string",
"messageIds_month": "string",
"messagesCount_hour": "string",
"messagesCount_day": "string",
"messagesCount_week": "string",
"messagesCount_month": "string",
"organizationId_hour": "string",
"organizationId_day": "string",
"organizationId_week": "string",
"organizationId_month": "string",
"question_hour": "string",
"question_day": "string",
"question_week": "string",
"question_month": "string",
"questionLength_hour": "string",
"questionLength_day": "string",
"questionLength_week": "string",
"questionLength_month": "string",
"answer_hour": "string",
"answer_day": "string",
"answer_week": "string",
"answer_month": "string",
"isOnTopic_hour": "string",
"isOnTopic_day": "string",
"isOnTopic_week": "string",
"isOnTopic_month": "string",
"isClear_hour": "string",
"isClear_day": "string",
"isClear_week": "string",
"isClear_month": "string",
"isDocumented_hour": "string",
"isDocumented_day": "string",
"isDocumented_week": "string",
"isDocumented_month": "string",
"isFeatureSupported_hour": "string",
"isFeatureSupported_day": "string",
"isFeatureSupported_week": "string",
"isFeatureSupported_month": "string",
"isAnswerConfident_hour": "string",
"isAnswerConfident_day": "string",
"isAnswerConfident_week": "string",
"isAnswerConfident_month": "string",
"gapSummary_hour": "string",
"gapSummary_day": "string",
"gapSummary_week": "string",
"gapSummary_month": "string",
"subject_hour": "string",
"subject_day": "string",
"subject_week": "string",
"subject_month": "string",
"category_hour": "string",
"category_day": "string",
"category_week": "string",
"category_month": "string",
"languages_hour": "string",
"languages_day": "string",
"languages_week": "string",
"languages_month": "string",
"firstPartyEntities_hour": "string",
"firstPartyEntities_day": "string",
"firstPartyEntities_week": "string",
"firstPartyEntities_month": "string",
"thirdPartyEntities_hour": "string",
"thirdPartyEntities_day": "string",
"thirdPartyEntities_week": "string",
"thirdPartyEntities_month": "string",
"emotion_hour": "string",
"emotion_day": "string",
"emotion_week": "string",
"emotion_month": "string",
"sentiment_hour": "string",
"sentiment_day": "string",
"sentiment_week": "string",
"sentiment_month": "string",
"questionType_hour": "string",
"questionType_day": "string",
"questionType_week": "string",
"questionType_month": "string",
"projectId_hour": "string",
"projectId_day": "string",
"projectId_week": "string",
"projectId_month": "string",
"integrationId_hour": "string",
"integrationId_day": "string",
"integrationId_week": "string",
"integrationId_month": "string",
"properties_hour": "string",
"properties_day": "string",
"properties_week": "string",
"properties_month": "string",
"userProperties_hour": "string",
"userProperties_day": "string",
"userProperties_week": "string",
"userProperties_month": "string",
"firstMessageTime_hour": "string",
"firstMessageTime_day": "string",
"firstMessageTime_week": "string",
"firstMessageTime_month": "string",
"lastMessageTime_hour": "string",
"lastMessageTime_day": "string",
"lastMessageTime_week": "string",
"lastMessageTime_month": "string",
"lastUpdated_hour": "string",
"lastUpdated_day": "string",
"lastUpdated_week": "string",
"lastUpdated_month": "string",
"hasPositiveFeedback_hour": "string",
"hasPositiveFeedback_day": "string",
"hasPositiveFeedback_week": "string",
"hasPositiveFeedback_month": "string",
"hasNegativeFeedback_hour": "string",
"hasNegativeFeedback_day": "string",
"hasNegativeFeedback_week": "string",
"hasNegativeFeedback_month": "string",
"conversationIds_hour": "string",
"conversationIds_day": "string",
"conversationIds_week": "string",
"conversationIds_month": "string",
"areAIAnnotationsVerified_hour": "string",
"areAIAnnotationsVerified_day": "string",
"areAIAnnotationsVerified_week": "string",
"areAIAnnotationsVerified_month": "string",
"isInitialQuestionAnswer_hour": "string",
"isInitialQuestionAnswer_day": "string",
"isInitialQuestionAnswer_week": "string",
"isInitialQuestionAnswer_month": "string",
"sum_id": 0,
"sum_messageIds": 0,
"sum_messagesCount": 0,
"sum_organizationId": 0,
"sum_question": 0,
"sum_questionLength": 0,
"sum_answer": 0,
"sum_isOnTopic": 0,
"sum_isClear": 0,
"sum_isDocumented": 0,
"sum_isFeatureSupported": 0,
"sum_isAnswerConfident": 0,
"sum_gapSummary": 0,
"sum_subject": 0,
"sum_category": 0,
"sum_languages": 0,
"sum_firstPartyEntities": 0,
"sum_thirdPartyEntities": 0,
"sum_emotion": 0,
"sum_sentiment": 0,
"sum_questionType": 0,
"sum_projectId": 0,
"sum_integrationId": 0,
"sum_properties": 0,
"sum_userProperties": 0,
"sum_firstMessageTime": 0,
"sum_lastMessageTime": 0,
"sum_lastUpdated": 0,
"sum_hasPositiveFeedback": 0,
"sum_hasNegativeFeedback": 0,
"sum_conversationIds": 0,
"sum_areAIAnnotationsVerified": 0,
"sum_isInitialQuestionAnswer": 0,
"count_id": 0,
"count_messageIds": 0,
"count_messagesCount": 0,
"count_organizationId": 0,
"count_question": 0,
"count_questionLength": 0,
"count_answer": 0,
"count_isOnTopic": 0,
"count_isClear": 0,
"count_isDocumented": 0,
"count_isFeatureSupported": 0,
"count_isAnswerConfident": 0,
"count_gapSummary": 0,
"count_subject": 0,
"count_category": 0,
"count_languages": 0,
"count_firstPartyEntities": 0,
"count_thirdPartyEntities": 0,
"count_emotion": 0,
"count_sentiment": 0,
"count_questionType": 0,
"count_projectId": 0,
"count_integrationId": 0,
"count_properties": 0,
"count_userProperties": 0,
"count_firstMessageTime": 0,
"count_lastMessageTime": 0,
"count_lastUpdated": 0,
"count_hasPositiveFeedback": 0,
"count_hasNegativeFeedback": 0,
"count_conversationIds": 0,
"count_areAIAnnotationsVerified": 0,
"count_isInitialQuestionAnswer": 0,
"avg_id": 0,
"avg_messageIds": 0,
"avg_messagesCount": 0,
"avg_organizationId": 0,
"avg_question": 0,
"avg_questionLength": 0,
"avg_answer": 0,
"avg_isOnTopic": 0,
"avg_isClear": 0,
"avg_isDocumented": 0,
"avg_isFeatureSupported": 0,
"avg_isAnswerConfident": 0,
"avg_gapSummary": 0,
"avg_subject": 0,
"avg_category": 0,
"avg_languages": 0,
"avg_firstPartyEntities": 0,
"avg_thirdPartyEntities": 0,
"avg_emotion": 0,
"avg_sentiment": 0,
"avg_questionType": 0,
"avg_projectId": 0,
"avg_integrationId": 0,
"avg_properties": 0,
"avg_userProperties": 0,
"avg_firstMessageTime": 0,
"avg_lastMessageTime": 0,
"avg_lastUpdated": 0,
"avg_hasPositiveFeedback": 0,
"avg_hasNegativeFeedback": 0,
"avg_conversationIds": 0,
"avg_areAIAnnotationsVerified": 0,
"avg_isInitialQuestionAnswer": 0,
"min_id": 0,
"min_messageIds": 0,
"min_messagesCount": 0,
"min_organizationId": 0,
"min_question": 0,
"min_questionLength": 0,
"min_answer": 0,
"min_isOnTopic": 0,
"min_isClear": 0,
"min_isDocumented": 0,
"min_isFeatureSupported": 0,
"min_isAnswerConfident": 0,
"min_gapSummary": 0,
"min_subject": 0,
"min_category": 0,
"min_languages": 0,
"min_firstPartyEntities": 0,
"min_thirdPartyEntities": 0,
"min_emotion": 0,
"min_sentiment": 0,
"min_questionType": 0,
"min_projectId": 0,
"min_integrationId": 0,
"min_properties": 0,
"min_userProperties": 0,
"min_firstMessageTime": 0,
"min_lastMessageTime": 0,
"min_lastUpdated": 0,
"min_hasPositiveFeedback": 0,
"min_hasNegativeFeedback": 0,
"min_conversationIds": 0,
"min_areAIAnnotationsVerified": 0,
"min_isInitialQuestionAnswer": 0,
"max_id": 0,
"max_messageIds": 0,
"max_messagesCount": 0,
"max_organizationId": 0,
"max_question": 0,
"max_questionLength": 0,
"max_answer": 0,
"max_isOnTopic": 0,
"max_isClear": 0,
"max_isDocumented": 0,
"max_isFeatureSupported": 0,
"max_isAnswerConfident": 0,
"max_gapSummary": 0,
"max_subject": 0,
"max_category": 0,
"max_languages": 0,
"max_firstPartyEntities": 0,
"max_thirdPartyEntities": 0,
"max_emotion": 0,
"max_sentiment": 0,
"max_questionType": 0,
"max_projectId": 0,
"max_integrationId": 0,
"max_properties": 0,
"max_userProperties": 0,
"max_firstMessageTime": 0,
"max_lastMessageTime": 0,
"max_lastUpdated": 0,
"max_hasPositiveFeedback": 0,
"max_hasNegativeFeedback": 0,
"max_conversationIds": 0,
"max_areAIAnnotationsVerified": 0,
"max_isInitialQuestionAnswer": 0
}
],
"total": 0,
"pageSize": 0,
"count": 0
}
}