Skip to content

Commit a72fb88

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.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 a72fb88

83 files changed

Lines changed: 2258 additions & 179 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: 201 additions & 98 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: 219 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: 461dedde5fcb788488b0edda799f2477fe71e57a
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: baeb671e92c686b3cc22aacca64b38eebcd9d915
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,9 @@ components:
1019610356
- FOLLOW_UP
1019710357
- MILESTONE_TIMELINE_CHECK
1019810358
- PROJECT_DISCUSSION_DIGEST
10359+
- PROJECT_FOCUS_BLOCK
1019910360
- PROJECT_NEXT_STEP
10361+
- DEMO_CARD
1020010362
description: Categories of content requested. An allowlist gives flexibility to request content separately or together.
1020110363
requestOptions:
1020210364
$ref: "#/components/schemas/FeedRequestOptions"
@@ -10533,6 +10695,7 @@ components:
1053310695
- SHORTCUTS_TYPE
1053410696
- SLIDE_TYPE
1053510697
- SPREADSHEET_TYPE
10698+
- INLINE_HTML_TYPE
1053610699
- WORKFLOWS_TYPE
1053710700
FavoriteInfo:
1053810701
type: object
@@ -10706,7 +10869,9 @@ components:
1070610869
- FOLLOW_UP
1070710870
- MILESTONE_TIMELINE_CHECK
1070810871
- PROJECT_DISCUSSION_DIGEST
10872+
- PROJECT_FOCUS_BLOCK
1070910873
- PROJECT_NEXT_STEP
10874+
- DEMO_CARD
1071010875
description: Type of the justification.
1071110876
justification:
1071210877
type: string
@@ -10789,7 +10954,9 @@ components:
1078910954
- FOLLOW_UP
1079010955
- MILESTONE_TIMELINE_CHECK
1079110956
- PROJECT_DISCUSSION_DIGEST
10957+
- PROJECT_FOCUS_BLOCK
1079210958
- PROJECT_NEXT_STEP
10959+
- DEMO_CARD
1079310960
description: Category of the result, one of the requested categories in incoming request.
1079410961
primaryEntry:
1079510962
$ref: "#/components/schemas/FeedEntry"
@@ -13841,6 +14008,46 @@ components:
1384114008
- configuration
1384214009
description: |
1384314010
Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set.
14011+
DatasourceCredentialStatus:
14012+
type: string
14013+
enum:
14014+
- VALID
14015+
- VALID_WITH_WARNINGS
14016+
- VALIDATING
14017+
- INVALID
14018+
- MISSING
14019+
description: |
14020+
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.
14021+
DatasourceCredentialStatusResponse:
14022+
type: object
14023+
properties:
14024+
status:
14025+
$ref: '#/components/schemas/DatasourceCredentialStatus'
14026+
lastRotatedAt:
14027+
type: string
14028+
format: date-time
14029+
description: When the credentials were last rotated. Omitted when not known.
14030+
expiresAt:
14031+
type: string
14032+
format: date-time
14033+
description: |
14034+
When the active credentials expire. Omitted when not known or not applicable to this credential type.
14035+
message:
14036+
type: string
14037+
description: Optional human-readable detail about the current credential status.
14038+
required:
14039+
- status
14040+
description: Status of the credentials currently installed for a datasource instance.
14041+
RotateDatasourceCredentialsRequest:
14042+
type: object
14043+
properties:
14044+
credentials:
14045+
$ref: '#/components/schemas/DatasourceInstanceConfiguration'
14046+
required:
14047+
- credentials
14048+
description: |
14049+
Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values.
14050+
`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.
1384414051
ChatRequestStream:
1384514052
required:
1384614053
- messages
@@ -13914,6 +14121,14 @@ components:
1391414121
schema:
1391514122
type: string
1391614123
example: o365sharepoint_abc123
14124+
datasourceInstanceId:
14125+
name: datasourceInstanceId
14126+
in: path
14127+
description: The full datasource instance identifier (e.g. o365sharepoint_abc123)
14128+
required: true
14129+
schema:
14130+
type: string
14131+
example: o365sharepoint_abc123
1391714132
responses:
1391814133
SuccessResponse:
1391914134
description: OK

.speakeasy/tests.arazzo.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158494,3 +158494,43 @@ workflows:
158494158494
type: simple
158495158495
x-speakeasy-test-group: Datasources
158496158496
x-speakeasy-test-rebuild: true
158497+
- workflowId: getDatasourceCredentialStatus
158498+
steps:
158499+
- stepId: test
158500+
operationId: getDatasourceCredentialStatus
158501+
parameters:
158502+
- name: datasourceInstanceId
158503+
in: path
158504+
value: o365sharepoint_abc123
158505+
successCriteria:
158506+
- condition: $statusCode == 200
158507+
- condition: $response.header.Content-Type == application/json
158508+
- context: $response.body
158509+
condition: |
158510+
{"status":"VALID"}
158511+
type: simple
158512+
x-speakeasy-test-group: Datasources
158513+
x-speakeasy-test-rebuild: true
158514+
- workflowId: rotateDatasourceCredentials
158515+
steps:
158516+
- stepId: test
158517+
operationId: rotateDatasourceCredentials
158518+
parameters:
158519+
- name: datasourceInstanceId
158520+
in: path
158521+
value: o365sharepoint_abc123
158522+
requestBody:
158523+
contentType: application/json
158524+
payload:
158525+
credentials:
158526+
values:
158527+
key: {}
158528+
successCriteria:
158529+
- condition: $statusCode == 200
158530+
- condition: $response.header.Content-Type == application/json
158531+
- context: $response.body
158532+
condition: |
158533+
{"status":"MISSING"}
158534+
type: simple
158535+
x-speakeasy-test-group: Datasources
158536+
x-speakeasy-test-rebuild: true

0 commit comments

Comments
 (0)