Skip to content

Commit 4014c1c

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

60 files changed

Lines changed: 1864 additions & 90 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: 157 additions & 66 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: 168 additions & 2 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: 0f17e336c8b3c8a1cd68eb6185f322d76ab069a6
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: e1ef611429506a30c94ec5cf589a2764eb7faa56
2626
x-speakeasy-name: 'Glean API'
2727
servers:
2828
- url: https://{instance}-be.glean.com
@@ -4014,6 +4014,95 @@ paths:
40144014
schema:
40154015
$ref: '#/components/schemas/ErrorResponse'
40164016
x-visibility: Preview
4017+
/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}/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/datasourceId'
4029+
- $ref: '#/components/parameters/instanceId'
4030+
responses:
4031+
"200":
4032+
description: OK
4033+
content:
4034+
application/json:
4035+
schema:
4036+
$ref: '#/components/schemas/DatasourceCredentialStatusResponse'
4037+
"400":
4038+
description: Invalid request
4039+
content:
4040+
application/json:
4041+
schema:
4042+
$ref: '#/components/schemas/ErrorResponse'
4043+
"401":
4044+
description: Not authorized
4045+
"403":
4046+
description: Forbidden
4047+
content:
4048+
application/json:
4049+
schema:
4050+
$ref: '#/components/schemas/ErrorResponse'
4051+
"404":
4052+
description: Datasource instance not found
4053+
content:
4054+
application/json:
4055+
schema:
4056+
$ref: '#/components/schemas/ErrorResponse'
4057+
x-visibility: Preview
4058+
/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}/credentials:
4059+
post:
4060+
operationId: rotateDatasourceCredentials
4061+
summary: Rotate datasource instance credentials
4062+
description: |
4063+
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.
4064+
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}.
4065+
tags:
4066+
- Datasources
4067+
security:
4068+
- APIToken: []
4069+
parameters:
4070+
- $ref: '#/components/parameters/datasourceId'
4071+
- $ref: '#/components/parameters/instanceId'
4072+
requestBody:
4073+
content:
4074+
application/json:
4075+
schema:
4076+
$ref: '#/components/schemas/RotateDatasourceCredentialsRequest'
4077+
required: true
4078+
responses:
4079+
"200":
4080+
description: OK
4081+
content:
4082+
application/json:
4083+
schema:
4084+
$ref: '#/components/schemas/DatasourceCredentialStatusResponse'
4085+
"400":
4086+
description: Invalid request
4087+
content:
4088+
application/json:
4089+
schema:
4090+
$ref: '#/components/schemas/ErrorResponse'
4091+
"401":
4092+
description: Not authorized
4093+
"403":
4094+
description: Forbidden
4095+
content:
4096+
application/json:
4097+
schema:
4098+
$ref: '#/components/schemas/ErrorResponse'
4099+
"404":
4100+
description: Datasource instance not found
4101+
content:
4102+
application/json:
4103+
schema:
4104+
$ref: '#/components/schemas/ErrorResponse'
4105+
x-visibility: Preview
40174106
/rest/api/v1/chat#stream:
40184107
post:
40194108
tags:
@@ -8709,6 +8798,7 @@ components:
87098798
type: string
87108799
enum:
87118800
- EXISTING_ITEM
8801+
- CORRUPT_ITEM
87128802
AddCollectionItemsResponse:
87138803
properties:
87148804
collection:
@@ -8738,6 +8828,7 @@ components:
87388828
- HEIGHT_VIOLATION
87398829
- WIDTH_VIOLATION
87408830
- NO_PERMISSIONS
8831+
- CORRUPT_ITEM
87418832
CreateCollectionResponse:
87428833
allOf:
87438834
- type: object
@@ -9286,6 +9377,33 @@ components:
92869377
downvoteCount:
92879378
type: integer
92889379
description: Total number of downvotes for this agent over the specified time period.
9380+
AgentUseCaseInsight:
9381+
properties:
9382+
useCase:
9383+
type: string
9384+
description: Use case name
9385+
runCount:
9386+
type: integer
9387+
description: Total number of runs for this use case over the specified time period.
9388+
trend:
9389+
type: number
9390+
format: float
9391+
description: Percentage change in runs compared to the previous equivalent time period.
9392+
topDepartments:
9393+
type: string
9394+
description: Comma-separated list of the top departments using this use case.
9395+
topAgentId:
9396+
type: string
9397+
description: ID of the most-used agent for this use case.
9398+
topAgentName:
9399+
type: string
9400+
description: Name of the most-used agent for this use case.
9401+
topAgentIcon:
9402+
$ref: "#/components/schemas/IconConfig"
9403+
description: Icon of the most-used agent for this use case.
9404+
topAgentIsDeleted:
9405+
type: boolean
9406+
description: Indicates whether the top agent has been deleted.
92899407
AgentsUsageByDepartmentInsight:
92909408
properties:
92919409
department:
@@ -9375,6 +9493,10 @@ components:
93759493
type: array
93769494
items:
93779495
$ref: "#/components/schemas/PerAgentInsight"
9496+
topUseCasesInsights:
9497+
type: array
9498+
items:
9499+
$ref: "#/components/schemas/AgentUseCaseInsight"
93789500
agentsUsageByDepartmentInsights:
93799501
type: array
93809502
items:
@@ -10196,6 +10318,7 @@ components:
1019610318
- FOLLOW_UP
1019710319
- MILESTONE_TIMELINE_CHECK
1019810320
- PROJECT_DISCUSSION_DIGEST
10321+
- PROJECT_FOCUS_BLOCK
1019910322
- PROJECT_NEXT_STEP
1020010323
description: Categories of content requested. An allowlist gives flexibility to request content separately or together.
1020110324
requestOptions:
@@ -10533,6 +10656,7 @@ components:
1053310656
- SHORTCUTS_TYPE
1053410657
- SLIDE_TYPE
1053510658
- SPREADSHEET_TYPE
10659+
- INLINE_HTML_TYPE
1053610660
- WORKFLOWS_TYPE
1053710661
FavoriteInfo:
1053810662
type: object
@@ -10706,6 +10830,7 @@ components:
1070610830
- FOLLOW_UP
1070710831
- MILESTONE_TIMELINE_CHECK
1070810832
- PROJECT_DISCUSSION_DIGEST
10833+
- PROJECT_FOCUS_BLOCK
1070910834
- PROJECT_NEXT_STEP
1071010835
description: Type of the justification.
1071110836
justification:
@@ -10789,6 +10914,7 @@ components:
1078910914
- FOLLOW_UP
1079010915
- MILESTONE_TIMELINE_CHECK
1079110916
- PROJECT_DISCUSSION_DIGEST
10917+
- PROJECT_FOCUS_BLOCK
1079210918
- PROJECT_NEXT_STEP
1079310919
description: Category of the result, one of the requested categories in incoming request.
1079410920
primaryEntry:
@@ -13841,6 +13967,46 @@ components:
1384113967
- configuration
1384213968
description: |
1384313969
Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set.
13970+
DatasourceCredentialStatus:
13971+
type: string
13972+
enum:
13973+
- VALID
13974+
- VALID_WITH_WARNINGS
13975+
- VALIDATING
13976+
- INVALID
13977+
- MISSING
13978+
description: |
13979+
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.
13980+
DatasourceCredentialStatusResponse:
13981+
type: object
13982+
properties:
13983+
status:
13984+
$ref: '#/components/schemas/DatasourceCredentialStatus'
13985+
lastRotatedAt:
13986+
type: string
13987+
format: date-time
13988+
description: When the credentials were last rotated. Omitted when not known.
13989+
expiresAt:
13990+
type: string
13991+
format: date-time
13992+
description: |
13993+
When the active credentials expire. Omitted when not known or not applicable to this credential type.
13994+
message:
13995+
type: string
13996+
description: Optional human-readable detail about the current credential status.
13997+
required:
13998+
- status
13999+
description: Status of the credentials currently installed for a datasource instance.
14000+
RotateDatasourceCredentialsRequest:
14001+
type: object
14002+
properties:
14003+
credentials:
14004+
$ref: '#/components/schemas/DatasourceInstanceConfiguration'
14005+
required:
14006+
- credentials
14007+
description: |
14008+
Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values.
14009+
`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.
1384414010
ChatRequestStream:
1384514011
required:
1384614012
- messages

.speakeasy/tests.arazzo.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158494,3 +158494,49 @@ 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: datasourceId
158503+
in: path
158504+
value: o365sharepoint
158505+
- name: instanceId
158506+
in: path
158507+
value: o365sharepoint_abc123
158508+
successCriteria:
158509+
- condition: $statusCode == 200
158510+
- condition: $response.header.Content-Type == application/json
158511+
- context: $response.body
158512+
condition: |
158513+
{"status":"VALID"}
158514+
type: simple
158515+
x-speakeasy-test-group: Datasources
158516+
x-speakeasy-test-rebuild: true
158517+
- workflowId: rotateDatasourceCredentials
158518+
steps:
158519+
- stepId: test
158520+
operationId: rotateDatasourceCredentials
158521+
parameters:
158522+
- name: datasourceId
158523+
in: path
158524+
value: o365sharepoint
158525+
- name: instanceId
158526+
in: path
158527+
value: o365sharepoint_abc123
158528+
requestBody:
158529+
contentType: application/json
158530+
payload:
158531+
credentials:
158532+
values:
158533+
key: {}
158534+
successCriteria:
158535+
- condition: $statusCode == 200
158536+
- condition: $response.header.Content-Type == application/json
158537+
- context: $response.body
158538+
condition: |
158539+
{"status":"MISSING"}
158540+
type: simple
158541+
x-speakeasy-test-group: Datasources
158542+
x-speakeasy-test-rebuild: true

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
speakeasyVersion: 1.761.8
1+
speakeasyVersion: 1.761.9
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:5fafd8224d41224b85cbb5f39c686e5da647fadcd8211bc9fae3c0834341dae6
6-
sourceBlobDigest: sha256:884a6119e9d59c15d47e169eaa496571dae1c106d390990aee38a25cb51e42c3
5+
sourceRevisionDigest: sha256:7d9fbaac1acd4b5473f600ac946f52f52a2f9942dd54f3e805f98e27defeaf06
6+
sourceBlobDigest: sha256:05e3dc4b2665b13629f6b1f074b0188a74b365616d4651e9f41de44dbaa9db1a
77
tags:
88
- latest
99
Glean Client API:
@@ -16,10 +16,10 @@ targets:
1616
glean:
1717
source: Glean API
1818
sourceNamespace: glean-api-specs
19-
sourceRevisionDigest: sha256:5fafd8224d41224b85cbb5f39c686e5da647fadcd8211bc9fae3c0834341dae6
20-
sourceBlobDigest: sha256:884a6119e9d59c15d47e169eaa496571dae1c106d390990aee38a25cb51e42c3
19+
sourceRevisionDigest: sha256:7d9fbaac1acd4b5473f600ac946f52f52a2f9942dd54f3e805f98e27defeaf06
20+
sourceBlobDigest: sha256:05e3dc4b2665b13629f6b1f074b0188a74b365616d4651e9f41de44dbaa9db1a
2121
codeSamplesNamespace: glean-api-specs-python-code-samples
22-
codeSamplesRevisionDigest: sha256:15a4a6614d94c2111ddad680da00d4286330aadf586e4ceb4f5312fe92377032
22+
codeSamplesRevisionDigest: sha256:6310665aa877f077003cbc64ef4a048644323424922c8546afbe33c1379dc728
2323
workflow:
2424
workflowVersion: 1.0.0
2525
speakeasyVersion: latest

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,8 @@ For more information on obtaining the appropriate token type, please contact you
474474

475475
* [get_datasource_instance_configuration](docs/sdks/datasources/README.md#get_datasource_instance_configuration) - Get datasource instance configuration
476476
* [update_datasource_instance_configuration](docs/sdks/datasources/README.md#update_datasource_instance_configuration) - Update datasource instance configuration
477+
* [get_datasource_credential_status](docs/sdks/datasources/README.md#get_datasource_credential_status) - Get datasource instance credential status
478+
* [rotate_datasource_credentials](docs/sdks/datasources/README.md#rotate_datasource_credentials) - Rotate datasource instance credentials
477479

478480
### [Governance](docs/sdks/governance/README.md)
479481

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,4 +738,14 @@ Based on:
738738
### Generated
739739
- [python v0.12.23] .
740740
### Releases
741-
- [PyPI v0.12.23] https://pypi.org/project/glean-api-client/0.12.23 - .
741+
- [PyPI v0.12.23] https://pypi.org/project/glean-api-client/0.12.23 - .
742+
743+
## 2026-04-23 22:04:34
744+
### Changes
745+
Based on:
746+
- OpenAPI Doc
747+
- Speakeasy CLI 1.761.9 (2.881.4) https://github.com/speakeasy-api/speakeasy
748+
### Generated
749+
- [python v0.12.25] .
750+
### Releases
751+
- [PyPI v0.12.25] https://pypi.org/project/glean-api-client/0.12.25 - .

docs/models/addcollectionitemserrorerrortype.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
from glean.api_client.models import AddCollectionItemsErrorErrorType
77

88
value = AddCollectionItemsErrorErrorType.EXISTING_ITEM
9+
10+
# Open enum: unrecognized values are captured as UnrecognizedStr
911
```
1012

1113

1214
## Values
1315

1416
| Name | Value |
1517
| --------------- | --------------- |
16-
| `EXISTING_ITEM` | EXISTING_ITEM |
18+
| `EXISTING_ITEM` | EXISTING_ITEM |
19+
| `CORRUPT_ITEM` | CORRUPT_ITEM |

docs/models/agentsinsightsv2response.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
| `daily_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A |
1313
| `shared_agents_count` | *Optional[int]* | :heavy_minus_sign: | Total number of shared agents. |
1414
| `top_agents_insights` | List[[models.PerAgentInsight](../models/peragentinsight.md)] | :heavy_minus_sign: | N/A |
15+
| `top_use_cases_insights` | List[[models.AgentUseCaseInsight](../models/agentusecaseinsight.md)] | :heavy_minus_sign: | N/A |
1516
| `agents_usage_by_department_insights` | List[[models.AgentsUsageByDepartmentInsight](../models/agentsusagebydepartmentinsight.md)] | :heavy_minus_sign: | N/A |
1617
| `agent_users_insights` | List[[models.AgentUsersInsight](../models/agentusersinsight.md)] | :heavy_minus_sign: | N/A |
1718
| `agents_time_saved_insights` | List[[models.AgentsTimeSavedInsight](../models/agentstimesavedinsight.md)] | :heavy_minus_sign: | Insights for agents time saved over the specified time period. |

0 commit comments

Comments
 (0)