Skip to content

Commit 699a71b

Browse files
committed
## Python SDK Changes:
* `glean.client.collections.add_items()`: `response.error.error_type.enum(corrupt_item)` **Added** (Breaking ⚠️) * `glean.datasources.get_datasource_credential_status()`: **Added** * `glean.datasources.rotate_datasource_credentials()`: **Added** * `glean.client.collections.create()`: * `response.union(class (0)).error.error_code.enum(corrupt_item)` **Added** * `error_code.enum(corrupt_item)` **Added** * `glean.client.collections.delete()`: `error_code.enum(corrupt_item)` **Added** * `glean.client.collections.update()`: * `response` **Changed** * `error_code.enum(corrupt_item)` **Added** * `glean.client.collections.retrieve()`: `response.error.error_code.enum(corrupt_item)` **Added** * `glean.client.insights.retrieve()`: * `request` **Changed** * `response.agents_response.top_use_cases_insights` **Added** * `glean.client.search.retrieve_feed()`: * `request.categories[]` **Changed** * `response.results[]` **Changed**
1 parent a2f724d commit 699a71b

96 files changed

Lines changed: 2420 additions & 216 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.speakeasy/gen.lock

Lines changed: 224 additions & 121 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ generation:
3434
generateNewTests: true
3535
skipResponseBodyAssertions: true
3636
python:
37-
version: 0.12.24
37+
version: 0.12.25
3838
additionalDependencies:
3939
dev: {}
4040
main: {}

.speakeasy/glean-merged-spec.yaml

Lines changed: 245 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.0
22
info:
33
version: 0.9.0
44
title: Glean API
5-
x-source-commit-sha: 0aa266469924048ad422bf6314104f79b477e46a
5+
x-source-commit-sha: 084a38e736474e58631b0ce03aff14df68813883
66
description: |
77
# Introduction
88
In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean.
@@ -22,7 +22,7 @@ info:
2222
These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.
2323
x-logo:
2424
url: https://app.glean.com/images/glean-text2.svg
25-
x-open-api-commit-sha: 122e22b59935f3ed61845da28a7c607ebc115c9b
25+
x-open-api-commit-sha: 1ba4734f08fab834e9a98752b97414a464a4bbb8
2626
x-speakeasy-name: 'Glean API'
2727
servers:
2828
- url: https://{instance}-be.glean.com
@@ -4014,6 +4014,93 @@ paths:
40144014
schema:
40154015
$ref: '#/components/schemas/ErrorResponse'
40164016
x-visibility: Preview
4017+
/rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus:
4018+
get:
4019+
operationId: getDatasourceCredentialStatus
4020+
summary: Get datasource instance credential status
4021+
description: |
4022+
Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check.
4023+
tags:
4024+
- Datasources
4025+
security:
4026+
- APIToken: []
4027+
parameters:
4028+
- $ref: '#/components/parameters/datasourceInstanceId'
4029+
responses:
4030+
"200":
4031+
description: OK
4032+
content:
4033+
application/json:
4034+
schema:
4035+
$ref: '#/components/schemas/DatasourceCredentialStatusResponse'
4036+
"400":
4037+
description: Invalid request
4038+
content:
4039+
application/json:
4040+
schema:
4041+
$ref: '#/components/schemas/ErrorResponse'
4042+
"401":
4043+
description: Not authorized
4044+
"403":
4045+
description: Forbidden
4046+
content:
4047+
application/json:
4048+
schema:
4049+
$ref: '#/components/schemas/ErrorResponse'
4050+
"404":
4051+
description: Datasource instance not found
4052+
content:
4053+
application/json:
4054+
schema:
4055+
$ref: '#/components/schemas/ErrorResponse'
4056+
x-visibility: Preview
4057+
/rest/api/v1/datasource/{datasourceInstanceId}/credentials:
4058+
post:
4059+
operationId: rotateDatasourceCredentials
4060+
summary: Rotate datasource instance credentials
4061+
description: |
4062+
Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces the active credential material with the supplied values and returns the credential status after rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check.
4063+
Only keys recognized as credential material for the datasource type may be set in `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; other instance configuration must be updated via PATCH /configure/datasources/{datasourceId}/instances/{instanceId}.
4064+
tags:
4065+
- Datasources
4066+
security:
4067+
- APIToken: []
4068+
parameters:
4069+
- $ref: '#/components/parameters/datasourceInstanceId'
4070+
requestBody:
4071+
content:
4072+
application/json:
4073+
schema:
4074+
$ref: '#/components/schemas/RotateDatasourceCredentialsRequest'
4075+
required: true
4076+
responses:
4077+
"200":
4078+
description: OK
4079+
content:
4080+
application/json:
4081+
schema:
4082+
$ref: '#/components/schemas/DatasourceCredentialStatusResponse'
4083+
"400":
4084+
description: Invalid request
4085+
content:
4086+
application/json:
4087+
schema:
4088+
$ref: '#/components/schemas/ErrorResponse'
4089+
"401":
4090+
description: Not authorized
4091+
"403":
4092+
description: Forbidden
4093+
content:
4094+
application/json:
4095+
schema:
4096+
$ref: '#/components/schemas/ErrorResponse'
4097+
"404":
4098+
description: Datasource instance not found
4099+
content:
4100+
application/json:
4101+
schema:
4102+
$ref: '#/components/schemas/ErrorResponse'
4103+
x-visibility: Preview
40174104
/rest/api/v1/chat#stream:
40184105
post:
40194106
tags:
@@ -8709,6 +8796,7 @@ components:
87098796
type: string
87108797
enum:
87118798
- EXISTING_ITEM
8799+
- CORRUPT_ITEM
87128800
AddCollectionItemsResponse:
87138801
properties:
87148802
collection:
@@ -8738,6 +8826,7 @@ components:
87388826
- HEIGHT_VIOLATION
87398827
- WIDTH_VIOLATION
87408828
- NO_PERMISSIONS
8829+
- CORRUPT_ITEM
87418830
CreateCollectionResponse:
87428831
allOf:
87438832
- type: object
@@ -8960,6 +9049,11 @@ components:
89609049
items:
89619050
type: string
89629051
description: Departments for which Insights are requested.
9052+
managerEmails:
9053+
type: array
9054+
items:
9055+
type: string
9056+
description: Manager emails whose teams should be filtered for. Empty array means no filtering.
89639057
dayRange:
89649058
$ref: "#/components/schemas/Period"
89659059
description: Time period for which Insights are requested.
@@ -8970,6 +9064,11 @@ components:
89709064
items:
89719065
type: string
89729066
description: Departments for which Insights are requested.
9067+
managerEmails:
9068+
type: array
9069+
items:
9070+
type: string
9071+
description: Manager emails whose teams should be filtered for. Empty array means no filtering.
89739072
dayRange:
89749073
$ref: "#/components/schemas/Period"
89759074
description: Time period for which Insights are requested.
@@ -8985,9 +9084,57 @@ components:
89859084
items:
89869085
type: string
89879086
description: Departments for which Insights are requested.
9087+
managerEmails:
9088+
type: array
9089+
items:
9090+
type: string
9091+
description: Manager emails whose teams should be filtered for. Empty array means no filtering.
89889092
dayRange:
89899093
$ref: "#/components/schemas/Period"
89909094
description: Time period for which Insights are requested.
9095+
McpBreakdownInsightsRequest:
9096+
properties:
9097+
departments:
9098+
type: array
9099+
items:
9100+
type: string
9101+
description: Departments for which Insights are requested.
9102+
managerIds:
9103+
type: array
9104+
items:
9105+
type: string
9106+
description: Manager user IDs whose teams should be filtered for. Empty array means no filtering.
9107+
managerEmails:
9108+
type: array
9109+
items:
9110+
type: string
9111+
description: Manager emails whose teams should be filtered for. Empty array means no filtering.
9112+
dayRange:
9113+
$ref: "#/components/schemas/Period"
9114+
description: Time period for which Insights are requested.
9115+
breakdownType:
9116+
type: string
9117+
enum:
9118+
- USERS
9119+
- HOST_APPLICATIONS
9120+
- TOOLS
9121+
- SERVERS
9122+
description: Type of breakdown to return.
9123+
hostApplications:
9124+
type: array
9125+
items:
9126+
type: string
9127+
description: Host applications to filter by. Empty array means all host applications.
9128+
tools:
9129+
type: array
9130+
items:
9131+
type: string
9132+
description: MCP tools to filter by. Empty array means all tools.
9133+
servers:
9134+
type: array
9135+
items:
9136+
type: string
9137+
description: MCP servers to filter by. Empty array means all servers.
89919138
InsightsRequest:
89929139
properties:
89939140
overviewRequest:
@@ -9002,6 +9149,8 @@ components:
90029149
$ref: "#/components/schemas/AgentsInsightsV2Request"
90039150
x-visibility: Public
90049151
description: If specified, will return data for the Agents section of the Insights Dashboard.
9152+
mcpBreakdownRequest:
9153+
$ref: "#/components/schemas/McpBreakdownInsightsRequest"
90059154
disablePerUserInsights:
90069155
type: boolean
90079156
description: If true, suppresses the generation of per-user Insights in the response. Default is false.
@@ -9052,10 +9201,10 @@ components:
90529201
properties:
90539202
monthlyActiveUsers:
90549203
type: integer
9055-
description: Number of current Monthly Active Users, in the specified departments.
9204+
description: Number of current Monthly Active Users.
90569205
weeklyActiveUsers:
90579206
type: integer
9058-
description: Number of current Weekly Active Users, in the specified departments.
9207+
description: Number of current Weekly Active Users.
90599208
InsightsSearchSummary:
90609209
allOf:
90619210
- $ref: "#/components/schemas/CurrentActiveUsers"
@@ -9286,6 +9435,33 @@ components:
92869435
downvoteCount:
92879436
type: integer
92889437
description: Total number of downvotes for this agent over the specified time period.
9438+
AgentUseCaseInsight:
9439+
properties:
9440+
useCase:
9441+
type: string
9442+
description: Use case name
9443+
runCount:
9444+
type: integer
9445+
description: Total number of runs for this use case over the specified time period.
9446+
trend:
9447+
type: number
9448+
format: float
9449+
description: Percentage change in runs compared to the previous equivalent time period.
9450+
topDepartments:
9451+
type: string
9452+
description: Comma-separated list of the top departments using this use case.
9453+
topAgentId:
9454+
type: string
9455+
description: ID of the most-used agent for this use case.
9456+
topAgentName:
9457+
type: string
9458+
description: Name of the most-used agent for this use case.
9459+
topAgentIcon:
9460+
$ref: "#/components/schemas/IconConfig"
9461+
description: Icon of the most-used agent for this use case.
9462+
topAgentIsDeleted:
9463+
type: boolean
9464+
description: Indicates whether the top agent has been deleted.
92899465
AgentsUsageByDepartmentInsight:
92909466
properties:
92919467
department:
@@ -9375,6 +9551,10 @@ components:
93759551
type: array
93769552
items:
93779553
$ref: "#/components/schemas/PerAgentInsight"
9554+
topUseCasesInsights:
9555+
type: array
9556+
items:
9557+
$ref: "#/components/schemas/AgentUseCaseInsight"
93789558
agentsUsageByDepartmentInsights:
93799559
type: array
93809560
items:
@@ -10196,7 +10376,10 @@ components:
1019610376
- FOLLOW_UP
1019710377
- MILESTONE_TIMELINE_CHECK
1019810378
- PROJECT_DISCUSSION_DIGEST
10379+
- PROJECT_FOCUS_BLOCK
1019910380
- PROJECT_NEXT_STEP
10381+
- DEMO_CARD
10382+
- OOO_PLANNER
1020010383
description: Categories of content requested. An allowlist gives flexibility to request content separately or together.
1020110384
requestOptions:
1020210385
$ref: "#/components/schemas/FeedRequestOptions"
@@ -10533,6 +10716,7 @@ components:
1053310716
- SHORTCUTS_TYPE
1053410717
- SLIDE_TYPE
1053510718
- SPREADSHEET_TYPE
10719+
- INLINE_HTML_TYPE
1053610720
- WORKFLOWS_TYPE
1053710721
FavoriteInfo:
1053810722
type: object
@@ -10587,6 +10771,9 @@ components:
1058710771
lastDraftSavedAt:
1058810772
type: integer
1058910773
description: Server Unix timestamp of the last time the draft was saved.
10774+
lastDraftSavedBy:
10775+
description: The person who last saved the draft.
10776+
$ref: "#/components/schemas/Person"
1059010777
lastUpdatedBy:
1059110778
$ref: "#/components/schemas/Person"
1059210779
Workflow:
@@ -10706,7 +10893,10 @@ components:
1070610893
- FOLLOW_UP
1070710894
- MILESTONE_TIMELINE_CHECK
1070810895
- PROJECT_DISCUSSION_DIGEST
10896+
- PROJECT_FOCUS_BLOCK
1070910897
- PROJECT_NEXT_STEP
10898+
- DEMO_CARD
10899+
- OOO_PLANNER
1071010900
description: Type of the justification.
1071110901
justification:
1071210902
type: string
@@ -10789,7 +10979,10 @@ components:
1078910979
- FOLLOW_UP
1079010980
- MILESTONE_TIMELINE_CHECK
1079110981
- PROJECT_DISCUSSION_DIGEST
10982+
- PROJECT_FOCUS_BLOCK
1079210983
- PROJECT_NEXT_STEP
10984+
- DEMO_CARD
10985+
- OOO_PLANNER
1079310986
description: Category of the result, one of the requested categories in incoming request.
1079410987
primaryEntry:
1079510988
$ref: "#/components/schemas/FeedEntry"
@@ -13841,6 +14034,46 @@ components:
1384114034
- configuration
1384214035
description: |
1384314036
Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set.
14037+
DatasourceCredentialStatus:
14038+
type: string
14039+
enum:
14040+
- VALID
14041+
- VALID_WITH_WARNINGS
14042+
- VALIDATING
14043+
- INVALID
14044+
- MISSING
14045+
description: |
14046+
Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past.
14047+
DatasourceCredentialStatusResponse:
14048+
type: object
14049+
properties:
14050+
status:
14051+
$ref: '#/components/schemas/DatasourceCredentialStatus'
14052+
lastRotatedAt:
14053+
type: string
14054+
format: date-time
14055+
description: When the credentials were last rotated. Omitted when not known.
14056+
expiresAt:
14057+
type: string
14058+
format: date-time
14059+
description: |
14060+
When the active credentials expire. Omitted when not known or not applicable to this credential type.
14061+
message:
14062+
type: string
14063+
description: Optional human-readable detail about the current credential status.
14064+
required:
14065+
- status
14066+
description: Status of the credentials currently installed for a datasource instance.
14067+
RotateDatasourceCredentialsRequest:
14068+
type: object
14069+
properties:
14070+
credentials:
14071+
$ref: '#/components/schemas/DatasourceInstanceConfiguration'
14072+
required:
14073+
- credentials
14074+
description: |
14075+
Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values.
14076+
`credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config.
1384414077
ChatRequestStream:
1384514078
required:
1384614079
- messages
@@ -13914,6 +14147,14 @@ components:
1391414147
schema:
1391514148
type: string
1391614149
example: o365sharepoint_abc123
14150+
datasourceInstanceId:
14151+
name: datasourceInstanceId
14152+
in: path
14153+
description: The full datasource instance identifier (e.g. o365sharepoint_abc123)
14154+
required: true
14155+
schema:
14156+
type: string
14157+
example: o365sharepoint_abc123
1391714158
responses:
1391814159
SuccessResponse:
1391914160
description: OK

0 commit comments

Comments
 (0)