Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 70 additions & 36 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: true
python:
version: 0.12.6
version: 0.12.7
additionalDependencies:
dev: {}
main: {}
Expand Down
107 changes: 71 additions & 36 deletions .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
version: 0.9.0
title: Glean API
x-source-commit-sha: c18dcdd4226ac90fc693febef0db4e2f85b66110
x-source-commit-sha: 204dc378669e42116b8b928d58d5fddabb228aef
description: |
# Introduction
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.
Expand All @@ -22,7 +22,7 @@ info:
These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.
x-logo:
url: https://app.glean.com/images/glean-text2.svg
x-open-api-commit-sha: 8a421bb426d1efd54c918437077acb779a4ae87f
x-open-api-commit-sha: 8a4d8a857ef07a135526624459142e85f9444ec2
x-speakeasy-name: 'Glean API'
servers:
- url: https://{instance}-be.glean.com
Expand Down Expand Up @@ -363,6 +363,33 @@ paths:
x-speakeasy-deprecation-message: "Deprecated on 2026-01-21, removal scheduled for 2026-10-15: Answer boards have been removed and this endpoint no longer serves a purpose"
x-speakeasy-name-override: list
x-speakeasy-group: client.answers
/rest/api/v1/checkdatasourceauth:
post:
tags:
- Authentication
summary: Check datasource authorization
description: |
Returns all datasource instances that require per-user OAuth authorization
for the authenticated user, along with a transient auth token that can be
appended to auth URLs to complete OAuth flows.

Clients construct the full OAuth URL by combining the backend base URL,
the `authUrlRelativePath` from each instance, and the transient auth token:
`<backend>/<authUrlRelativePath>?transient_auth_token=<token>`.
operationId: checkdatasourceauth
x-visibility: Public
parameters: []
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/CheckDatasourceAuthResponse"
"401":
description: Not Authorized
"429":
description: Too Many Requests
/rest/api/v1/createauthtoken:
post:
tags:
Expand Down Expand Up @@ -7305,6 +7332,48 @@ components:
items:
$ref: "#/components/schemas/AnswerResult"
description: List of answers with tracking tokens.
AuthStatus:
type: string
description: The per-user authorization status for a datasource.
enum:
- DISABLED
- AWAITING_AUTH
- AUTHORIZED
- STALE_OAUTH
- SEG_MIGRATION
x-enum-varnames:
- AUTH_STATUS_DISABLED
- AUTH_STATUS_AWAITING_AUTH
- AUTH_STATUS_AUTHORIZED
- AUTH_STATUS_STALE_OAUTH
- AUTH_STATUS_SEG_MIGRATION
UnauthorizedDatasourceInstance:
description: |
A datasource instance that could not return results for this request because the user has not completed or has expired per-user OAuth.
properties:
datasourceInstance:
type: string
description: |
The instance identifier (e.g. "github", "github_enterprise_0", "slack_0"). Matches the instance names used in datasource configuration.
example: slack_0
displayName:
type: string
description: Human-readable name of the datasource instance for display.
example: Slack
authStatus:
$ref: "#/components/schemas/AuthStatus"
authUrlRelativePath:
type: string
description: |
Relative path to initiate or resume OAuth for the current user and instance, including a one-time authentication token as a query parameter. Clients should prepend their configured Glean backend base URL.
CheckDatasourceAuthResponse:
properties:
unauthorizedDatasourceInstances:
type: array
description: |
Datasource instances that require per-user OAuth authorization. Empty or absent when all datasources are authorized.
items:
$ref: "#/components/schemas/UnauthorizedDatasourceInstance"
CreateAuthTokenResponse:
required:
- token
Expand Down Expand Up @@ -7850,40 +7919,6 @@ components:
stream:
type: boolean
description: If set, response lines will be streamed one-by-one as they become available. Each will be a ChatResponse, formatted as JSON, and separated by a new line. If false, the entire response will be returned at once. Note that if this is set and the model being used does not support streaming, the model's response will not be streamed, but other messages from the endpoint still will be.
AuthStatus:
type: string
description: The per-user authorization status for a datasource.
enum:
- DISABLED
- AWAITING_AUTH
- AUTHORIZED
- STALE_OAUTH
- SEG_MIGRATION
x-enum-varnames:
- AUTH_STATUS_DISABLED
- AUTH_STATUS_AWAITING_AUTH
- AUTH_STATUS_AUTHORIZED
- AUTH_STATUS_STALE_OAUTH
- AUTH_STATUS_SEG_MIGRATION
UnauthorizedDatasourceInstance:
description: |
A datasource instance that could not return results for this request because the user has not completed or has expired per-user OAuth.
properties:
datasourceInstance:
type: string
description: |
The instance identifier (e.g. "github", "github_enterprise_0", "slack_0"). Matches the instance names used in datasource configuration.
example: slack_0
displayName:
type: string
description: Human-readable name of the datasource instance for display.
example: Slack
authStatus:
$ref: "#/components/schemas/AuthStatus"
authUrlRelativePath:
type: string
description: |
Relative path to initiate or resume OAuth for the current user and instance. Clients should prepend their configured Glean backend base URL.
ChatResponse:
description: A single response from the /chat backend.
properties:
Expand Down
13 changes: 13 additions & 0 deletions .speakeasy/tests.arazzo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158436,3 +158436,16 @@ workflows:
type: simple
x-speakeasy-test-group: Governance
x-speakeasy-test-rebuild: true
- workflowId: checkdatasourceauth
steps:
- stepId: test
operationId: checkdatasourceauth
successCriteria:
- condition: $statusCode == 200
- condition: $response.header.Content-Type == application/json
- context: $response.body
condition: |
{"unauthorizedDatasourceInstances":[{"datasourceInstance":"slack_0","displayName":"Slack"}]}
type: simple
x-speakeasy-test-group: Authentication
x-speakeasy-test-rebuild: true
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
speakeasyVersion: 1.722.0
speakeasyVersion: 1.722.7
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:a417495716018a416b8210f6cb830654e301e408cceb567b5c86f81d5211db79
sourceBlobDigest: sha256:163203ddf3ff04235c0ee40e8ec377e1093ff290525e24b89dfd28248a4c331a
sourceRevisionDigest: sha256:aa0a496396e723844c85b7713e2a2d9795a8e4c9bb8ad5f4119e1ff0b3f46fc1
sourceBlobDigest: sha256:f052174bfef7ebd0efee80555a7ae4db9d3ba41118e726db87762ea1dbab1240
tags:
- latest
- speakeasy-sdk-regen-1770751878
- speakeasy-sdk-regen-1771467808
Glean Client API:
sourceNamespace: glean-client-api
sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2
Expand All @@ -17,10 +17,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:a417495716018a416b8210f6cb830654e301e408cceb567b5c86f81d5211db79
sourceBlobDigest: sha256:163203ddf3ff04235c0ee40e8ec377e1093ff290525e24b89dfd28248a4c331a
sourceRevisionDigest: sha256:aa0a496396e723844c85b7713e2a2d9795a8e4c9bb8ad5f4119e1ff0b3f46fc1
sourceBlobDigest: sha256:f052174bfef7ebd0efee80555a7ae4db9d3ba41118e726db87762ea1dbab1240
codeSamplesNamespace: glean-api-specs-python-code-samples
codeSamplesRevisionDigest: sha256:062a7cca9f90a2135844881a40ebb2f3b6acc93274dec64146a96a4d72f481cb
codeSamplesRevisionDigest: sha256:f23770fa56fb7f38298e39c6a50f878d2ac7f7b136e13a173c7e74927bee3cd0
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ For more information on obtaining the appropriate token type, please contact you
<details open>
<summary>Available methods</summary>

### [Authentication](docs/sdks/authentication/README.md)

* [checkdatasourceauth](docs/sdks/authentication/README.md#checkdatasourceauth) - Check datasource authorization

### [Client.Activity](docs/sdks/clientactivity/README.md)

* [report](docs/sdks/clientactivity/README.md#report) - Report document activity
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,4 +568,14 @@ Based on:
### Generated
- [python v0.12.6] .
### Releases
- [PyPI v0.12.6] https://pypi.org/project/glean-api-client/0.12.6 - .
- [PyPI v0.12.6] https://pypi.org/project/glean-api-client/0.12.6 - .

## 2026-02-19 15:47:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.722.7 (2.832.9) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.12.7] .
### Releases
- [PyPI v0.12.7] https://pypi.org/project/glean-api-client/0.12.7 - .
8 changes: 8 additions & 0 deletions docs/models/checkdatasourceauthresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CheckDatasourceAuthResponse


## Fields

| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `unauthorized_datasource_instances` | List[[models.UnauthorizedDatasourceInstance](../models/unauthorizeddatasourceinstance.md)] | :heavy_minus_sign: | Datasource instances that require per-user OAuth authorization. Empty or absent when all datasources are authorized.<br/> |
Loading