Skip to content

Commit ee3287e

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 (1)).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.mcp_breakdown_request` **Added** * `response.agents_response.top_use_cases_insights` **Added** * `glean.client.search.retrieve_feed()`: * `request.categories[]` **Changed** * `response.results[]` **Changed**
1 parent a2f724d commit ee3287e

88 files changed

Lines changed: 2313 additions & 198 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: 210 additions & 107 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: 225 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: c979a67d005ef9cd19459f9a90c9c6a563d15ac2
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: ef8e51d2f3d427adfe3a8b60949f49d43a66dc62
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
@@ -8988,6 +9077,44 @@ components:
89889077
dayRange:
89899078
$ref: "#/components/schemas/Period"
89909079
description: Time period for which Insights are requested.
9080+
McpBreakdownInsightsRequest:
9081+
properties:
9082+
departments:
9083+
type: array
9084+
items:
9085+
type: string
9086+
description: Departments for which Insights are requested.
9087+
managerIds:
9088+
type: array
9089+
items:
9090+
type: string
9091+
description: Manager user IDs whose teams should be filtered for. Empty array means no filtering.
9092+
dayRange:
9093+
$ref: "#/components/schemas/Period"
9094+
description: Time period for which Insights are requested.
9095+
breakdownType:
9096+
type: string
9097+
enum:
9098+
- USERS
9099+
- HOST_APPLICATIONS
9100+
- TOOLS
9101+
- SERVERS
9102+
description: Type of breakdown to return.
9103+
hostApplications:
9104+
type: array
9105+
items:
9106+
type: string
9107+
description: Host applications to filter by. Empty array means all host applications.
9108+
tools:
9109+
type: array
9110+
items:
9111+
type: string
9112+
description: MCP tools to filter by. Empty array means all tools.
9113+
servers:
9114+
type: array
9115+
items:
9116+
type: string
9117+
description: MCP servers to filter by. Empty array means all servers.
89919118
InsightsRequest:
89929119
properties:
89939120
overviewRequest:
@@ -9002,6 +9129,8 @@ components:
90029129
$ref: "#/components/schemas/AgentsInsightsV2Request"
90039130
x-visibility: Public
90049131
description: If specified, will return data for the Agents section of the Insights Dashboard.
9132+
mcpBreakdownRequest:
9133+
$ref: "#/components/schemas/McpBreakdownInsightsRequest"
90059134
disablePerUserInsights:
90069135
type: boolean
90079136
description: If true, suppresses the generation of per-user Insights in the response. Default is false.
@@ -9052,10 +9181,10 @@ components:
90529181
properties:
90539182
monthlyActiveUsers:
90549183
type: integer
9055-
description: Number of current Monthly Active Users, in the specified departments.
9184+
description: Number of current Monthly Active Users.
90569185
weeklyActiveUsers:
90579186
type: integer
9058-
description: Number of current Weekly Active Users, in the specified departments.
9187+
description: Number of current Weekly Active Users.
90599188
InsightsSearchSummary:
90609189
allOf:
90619190
- $ref: "#/components/schemas/CurrentActiveUsers"
@@ -9286,6 +9415,33 @@ components:
92869415
downvoteCount:
92879416
type: integer
92889417
description: Total number of downvotes for this agent over the specified time period.
9418+
AgentUseCaseInsight:
9419+
properties:
9420+
useCase:
9421+
type: string
9422+
description: Use case name
9423+
runCount:
9424+
type: integer
9425+
description: Total number of runs for this use case over the specified time period.
9426+
trend:
9427+
type: number
9428+
format: float
9429+
description: Percentage change in runs compared to the previous equivalent time period.
9430+
topDepartments:
9431+
type: string
9432+
description: Comma-separated list of the top departments using this use case.
9433+
topAgentId:
9434+
type: string
9435+
description: ID of the most-used agent for this use case.
9436+
topAgentName:
9437+
type: string
9438+
description: Name of the most-used agent for this use case.
9439+
topAgentIcon:
9440+
$ref: "#/components/schemas/IconConfig"
9441+
description: Icon of the most-used agent for this use case.
9442+
topAgentIsDeleted:
9443+
type: boolean
9444+
description: Indicates whether the top agent has been deleted.
92899445
AgentsUsageByDepartmentInsight:
92909446
properties:
92919447
department:
@@ -9375,6 +9531,10 @@ components:
93759531
type: array
93769532
items:
93779533
$ref: "#/components/schemas/PerAgentInsight"
9534+
topUseCasesInsights:
9535+
type: array
9536+
items:
9537+
$ref: "#/components/schemas/AgentUseCaseInsight"
93789538
agentsUsageByDepartmentInsights:
93799539
type: array
93809540
items:
@@ -10196,7 +10356,10 @@ components:
1019610356
- FOLLOW_UP
1019710357
- MILESTONE_TIMELINE_CHECK
1019810358
- PROJECT_DISCUSSION_DIGEST
10359+
- PROJECT_FOCUS_BLOCK
1019910360
- PROJECT_NEXT_STEP
10361+
- DEMO_CARD
10362+
- OOO_PLANNER
1020010363
description: Categories of content requested. An allowlist gives flexibility to request content separately or together.
1020110364
requestOptions:
1020210365
$ref: "#/components/schemas/FeedRequestOptions"
@@ -10533,6 +10696,7 @@ components:
1053310696
- SHORTCUTS_TYPE
1053410697
- SLIDE_TYPE
1053510698
- SPREADSHEET_TYPE
10699+
- INLINE_HTML_TYPE
1053610700
- WORKFLOWS_TYPE
1053710701
FavoriteInfo:
1053810702
type: object
@@ -10587,6 +10751,9 @@ components:
1058710751
lastDraftSavedAt:
1058810752
type: integer
1058910753
description: Server Unix timestamp of the last time the draft was saved.
10754+
lastDraftSavedBy:
10755+
description: The person who last saved the draft.
10756+
$ref: "#/components/schemas/Person"
1059010757
lastUpdatedBy:
1059110758
$ref: "#/components/schemas/Person"
1059210759
Workflow:
@@ -10706,7 +10873,10 @@ components:
1070610873
- FOLLOW_UP
1070710874
- MILESTONE_TIMELINE_CHECK
1070810875
- PROJECT_DISCUSSION_DIGEST
10876+
- PROJECT_FOCUS_BLOCK
1070910877
- PROJECT_NEXT_STEP
10878+
- DEMO_CARD
10879+
- OOO_PLANNER
1071010880
description: Type of the justification.
1071110881
justification:
1071210882
type: string
@@ -10789,7 +10959,10 @@ components:
1078910959
- FOLLOW_UP
1079010960
- MILESTONE_TIMELINE_CHECK
1079110961
- PROJECT_DISCUSSION_DIGEST
10962+
- PROJECT_FOCUS_BLOCK
1079210963
- PROJECT_NEXT_STEP
10964+
- DEMO_CARD
10965+
- OOO_PLANNER
1079310966
description: Category of the result, one of the requested categories in incoming request.
1079410967
primaryEntry:
1079510968
$ref: "#/components/schemas/FeedEntry"
@@ -13841,6 +14014,46 @@ components:
1384114014
- configuration
1384214015
description: |
1384314016
Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set.
14017+
DatasourceCredentialStatus:
14018+
type: string
14019+
enum:
14020+
- VALID
14021+
- VALID_WITH_WARNINGS
14022+
- VALIDATING
14023+
- INVALID
14024+
- MISSING
14025+
description: |
14026+
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.
14027+
DatasourceCredentialStatusResponse:
14028+
type: object
14029+
properties:
14030+
status:
14031+
$ref: '#/components/schemas/DatasourceCredentialStatus'
14032+
lastRotatedAt:
14033+
type: string
14034+
format: date-time
14035+
description: When the credentials were last rotated. Omitted when not known.
14036+
expiresAt:
14037+
type: string
14038+
format: date-time
14039+
description: |
14040+
When the active credentials expire. Omitted when not known or not applicable to this credential type.
14041+
message:
14042+
type: string
14043+
description: Optional human-readable detail about the current credential status.
14044+
required:
14045+
- status
14046+
description: Status of the credentials currently installed for a datasource instance.
14047+
RotateDatasourceCredentialsRequest:
14048+
type: object
14049+
properties:
14050+
credentials:
14051+
$ref: '#/components/schemas/DatasourceInstanceConfiguration'
14052+
required:
14053+
- credentials
14054+
description: |
14055+
Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values.
14056+
`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.
1384414057
ChatRequestStream:
1384514058
required:
1384614059
- messages
@@ -13914,6 +14127,14 @@ components:
1391414127
schema:
1391514128
type: string
1391614129
example: o365sharepoint_abc123
14130+
datasourceInstanceId:
14131+
name: datasourceInstanceId
14132+
in: path
14133+
description: The full datasource instance identifier (e.g. o365sharepoint_abc123)
14134+
required: true
14135+
schema:
14136+
type: string
14137+
example: o365sharepoint_abc123
1391714138
responses:
1391814139
SuccessResponse:
1391914140
description: OK

0 commit comments

Comments
 (0)