- retrieve - Get insights
Gets the aggregate usage insights data displayed in the Insights Dashboards.
from glean.api_client import Glean
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:
res = glean.client.insights.retrieve()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
locale |
Optional[str] | ➖ | The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en. |
overview_request |
Optional[models.InsightsOverviewRequest] | ➖ | N/A |
assistant_request |
Optional[models.InsightsAssistantRequest] | ➖ | N/A |
agents_request |
Optional[models.AgentsInsightsV2Request] | ➖ | N/A |
disable_per_user_insights |
Optional[bool] | ➖ | If true, suppresses the generation of per-user Insights in the response. Default is false. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.GleanError | 4XX, 5XX | */* |