@@ -15146,8 +15146,8 @@ paths:
1514615146 post:
1514715147 tags:
1514815148 - Insights
15149- summary: Read insights
15150- description: Reads the aggregate information for each user, query, and content .
15149+ summary: Get insights
15150+ description: Gets the aggregate usage insights data displayed in the Insights Dashboards .
1515115151 operationId: insights
1515215152 x-visibility: Public
1515315153 x-codegen-request-body-name: payload
@@ -15157,7 +15157,7 @@ paths:
1515715157 application/json:
1515815158 schema:
1515915159 $ref: "#/components/schemas/InsightsRequest"
15160- description: Includes request params for insights dashboard data .
15160+ description: Includes request parameters for insights requests .
1516115161 required: true
1516215162 x-exportParamName: InsightsRequest
1516315163 responses:
@@ -15179,7 +15179,7 @@ paths:
1517915179 - lang: python
1518015180 label: Python (API Client)
1518115181 source: |-
15182- from glean.api_client import Glean, models
15182+ from glean.api_client import Glean
1518315183 import os
1518415184
1518515185
@@ -15188,9 +15188,7 @@ paths:
1518815188 instance=os.getenv("GLEAN_INSTANCE", ""),
1518915189 ) as glean:
1519015190
15191- res = glean.client.insights.retrieve(categories=[
15192- models.InsightsRequestCategory.COLLECTIONS,
15193- ])
15191+ res = glean.client.insights.retrieve()
1519415192
1519515193 # Handle response
1519615194 print(res)
@@ -15205,13 +15203,7 @@ paths:
1520515203 });
1520615204
1520715205 async function run() {
15208- const result = await glean.client.insights.retrieve({
15209- categories: [
15210- "COLLECTIONS",
15211- "SHORTCUTS",
15212- "ANNOUNCEMENTS",
15213- ],
15214- });
15206+ const result = await glean.client.insights.retrieve({});
1521515207
1521615208 // Handle the result
1521715209 console.log(result);
@@ -15220,17 +15212,15 @@ paths:
1522015212 run();
1522115213 - lang: go
1522215214 label: Go (API Client)
15223- source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tapiclientgo \"github.com/gleanwork/api-client-go\"\n\t\"github.com/gleanwork/api-client-go/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := apiclientgo.New(\n apiclientgo.WithSecurity(os.Getenv(\"GLEAN_API_TOKEN\")),\n apiclientgo.WithInstance(os.Getenv(\"GLEAN_INSTANCE\")),\n )\n\n res, err := s.Client.Insights.Retrieve(ctx, components.InsightsRequest{\n Categories: []components.InsightsRequestCategory{\n components.InsightsRequestCategoryCollections,\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.InsightsResponse != nil {\n // handle response\n }\n}"
15215+ source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tapiclientgo \"github.com/gleanwork/api-client-go\"\n\t\"github.com/gleanwork/api-client-go/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := apiclientgo.New(\n apiclientgo.WithSecurity(os.Getenv(\"GLEAN_API_TOKEN\")),\n apiclientgo.WithInstance(os.Getenv(\"GLEAN_INSTANCE\")),\n )\n\n res, err := s.Client.Insights.Retrieve(ctx, components.InsightsRequest{})\n if err != nil {\n log.Fatal(err)\n }\n if res.InsightsResponse != nil {\n // handle response\n }\n}"
1522415216 - lang: java
1522515217 label: Java (API Client)
1522615218 source: |-
1522715219 package hello.world;
1522815220
1522915221 import java.lang.Exception;
15230- import java.util.List;
1523115222 import org.openapis.openapi.Glean;
1523215223 import org.openapis.openapi.models.components.InsightsRequest;
15233- import org.openapis.openapi.models.components.InsightsRequestCategory;
1523415224 import org.openapis.openapi.models.operations.InsightsResponse;
1523515225
1523615226 public class Application {
@@ -15242,8 +15232,6 @@ paths:
1524215232 .build();
1524315233
1524415234 InsightsRequest req = InsightsRequest.builder()
15245- .categories(List.of(
15246- InsightsRequestCategory.COLLECTIONS))
1524715235 .build();
1524815236
1524915237 InsightsResponse res = sdk.client().insights().retrieve()
@@ -20189,6 +20177,7 @@ components:
2018920177 - SEARCH
2019020178 - SIDEBAR
2019120179 - SUMMARY
20180+ - TASKS
2019220181 issue:
2019320182 type: string
2019420183 description: The issue the user indicated in the feedback.
@@ -24472,6 +24461,41 @@ components:
2447224461 cursor:
2447324462 type: string
2447424463 description: Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query.
24464+ InsightsOverviewRequest:
24465+ properties:
24466+ departments:
24467+ type: array
24468+ items:
24469+ type: string
24470+ description: Departments for which Insights are requested.
24471+ dayRange:
24472+ $ref: "#/components/schemas/Period"
24473+ description: Time period for which Insights are requested.
24474+ InsightsAssistantRequest:
24475+ properties:
24476+ departments:
24477+ type: array
24478+ items:
24479+ type: string
24480+ description: Departments for which Insights are requested.
24481+ dayRange:
24482+ $ref: "#/components/schemas/Period"
24483+ description: Time period for which Insights are requested.
24484+ AgentsInsightsV2Request:
24485+ properties:
24486+ agentIds:
24487+ type: array
24488+ items:
24489+ type: string
24490+ description: IDs of the Agents for which Insights should be returned. An empty array signifies all.
24491+ departments:
24492+ type: array
24493+ items:
24494+ type: string
24495+ description: Departments for which Insights are requested.
24496+ dayRange:
24497+ $ref: "#/components/schemas/Period"
24498+ description: Time period for which Insights are requested.
2447524499 InsightsAiAppRequestOptions:
2447624500 type: object
2447724501 properties:
@@ -24488,16 +24512,33 @@ components:
2448824512 items:
2448924513 type: string
2449024514 description: IDs of the Agents for which Insights should be returned. An empty array signifies all.
24491- DownloadInsightsRequest:
24492- required:
24493- - categories
24515+ InsightsRequest:
2449424516 properties:
24517+ overviewRequest:
24518+ $ref: "#/components/schemas/InsightsOverviewRequest"
24519+ x-visibility: Public
24520+ description: If specified, will return data for the Overview section of the Insights Dashboard.
24521+ assistantRequest:
24522+ $ref: "#/components/schemas/InsightsAssistantRequest"
24523+ x-visibility: Public
24524+ description: If specified, will return data for the Assistant section of the Insights Dashboard.
24525+ agentsRequest:
24526+ $ref: "#/components/schemas/AgentsInsightsV2Request"
24527+ x-visibility: Public
24528+ description: If specified, will return data for the Agents section of the Insights Dashboard.
24529+ disablePerUserInsights:
24530+ type: boolean
24531+ description: If true, suppresses the generation of per-user Insights in the response. Default is false.
2449524532 categories:
24533+ deprecated: true
2449624534 type: array
2449724535 items:
2449824536 type: string
2449924537 enum:
2450024538 - AGENTS
24539+ - AGENT_USERS
24540+ - TOP_AGENTS
24541+ - AGENTS_USAGE_BY_DEPARTMENT
2450124542 - AI
2450224543 - AI_APPS
2450324544 - ANNOUNCEMENTS
@@ -24510,34 +24551,31 @@ components:
2451024551 - USERS
2451124552 description: Categories of data requested. Request can include single or multiple types.
2451224553 departments:
24554+ deprecated: true
2451324555 type: array
2451424556 items:
2451524557 type: string
2451624558 description: Departments that the data is requested for. If this is empty, corresponds to whole company.
2451724559 dayRange:
24560+ deprecated: true
2451824561 $ref: "#/components/schemas/Period"
2451924562 aiAppRequestOptions:
24563+ deprecated: true
2452024564 $ref: "#/components/schemas/InsightsAiAppRequestOptions"
2452124565 agentsRequestOptions:
24566+ deprecated: true
2452224567 $ref: "#/components/schemas/InsightsAgentsRequestOptions"
24523- InsightsRequest:
24524- allOf:
24525- - $ref: "#/components/schemas/DownloadInsightsRequest"
24526- - type: object
24527- properties:
24528- assistantActivityTypes:
24529- type: array
24530- items:
24531- type: string
24532- enum:
24533- - GLEAN_CHAT
24534- - AI_SUMMARY
24535- - AI_ANSWER
24536- - GLEANBOT_RESPONSE
24537- description: Types of activity that should count in the definition of an Assistant Active User. Affects only insights for AI category.
24538- disablePerUserInsights:
24539- type: boolean
24540- description: If true, suppresses the generation of per-user Insights in the response. Default is false.
24568+ assistantActivityTypes:
24569+ deprecated: true
24570+ type: array
24571+ items:
24572+ type: string
24573+ enum:
24574+ - GLEAN_CHAT
24575+ - AI_SUMMARY
24576+ - AI_ANSWER
24577+ - GLEANBOT_RESPONSE
24578+ description: Types of activity that should count in the definition of an Assistant Active User. Affects only insights for AI category.
2454124579 LabeledCountInfo:
2454224580 required:
2454324581 - label
@@ -25823,6 +25861,11 @@ components:
2582325861 channelName:
2582425862 type: string
2582525863 description: Name of the channel (applicable for CHANNEL type sections). Used to display in the frontend.
25864+ channelType:
25865+ type: string
25866+ description: |
25867+ Channel visibility/type for CHANNEL sections. For Slack this is typically one of
25868+ PublicChannel, PrivateChannel. Omit if not applicable or unknown.
2582625869 instanceId:
2582725870 type: string
2582825871 description: Instance identifier for the channel or workspace. Used for constructing channel URLs to display in the frontend.
0 commit comments