You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
22
22
These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.
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"
364
364
x-speakeasy-name-override: list
365
365
x-speakeasy-group: client.answers
366
+
/rest/api/v1/checkdatasourceauth:
367
+
post:
368
+
tags:
369
+
- Authentication
370
+
summary: Check datasource authorization
371
+
description: |
372
+
Returns all datasource instances that require per-user OAuth authorization
373
+
for the authenticated user, along with a transient auth token that can be
374
+
appended to auth URLs to complete OAuth flows.
375
+
376
+
Clients construct the full OAuth URL by combining the backend base URL,
377
+
the `authUrlRelativePath` from each instance, and the transient auth token:
description: List of answers with tracking tokens.
7335
+
AuthStatus:
7336
+
type: string
7337
+
description: The per-user authorization status for a datasource.
7338
+
enum:
7339
+
- DISABLED
7340
+
- AWAITING_AUTH
7341
+
- AUTHORIZED
7342
+
- STALE_OAUTH
7343
+
- SEG_MIGRATION
7344
+
x-enum-varnames:
7345
+
- AUTH_STATUS_DISABLED
7346
+
- AUTH_STATUS_AWAITING_AUTH
7347
+
- AUTH_STATUS_AUTHORIZED
7348
+
- AUTH_STATUS_STALE_OAUTH
7349
+
- AUTH_STATUS_SEG_MIGRATION
7350
+
UnauthorizedDatasourceInstance:
7351
+
description: |
7352
+
A datasource instance that could not return results for this request because the user has not completed or has expired per-user OAuth.
7353
+
properties:
7354
+
datasourceInstance:
7355
+
type: string
7356
+
description: |
7357
+
The instance identifier (e.g. "github", "github_enterprise_0", "slack_0"). Matches the instance names used in datasource configuration.
7358
+
example: slack_0
7359
+
displayName:
7360
+
type: string
7361
+
description: Human-readable name of the datasource instance for display.
7362
+
example: Slack
7363
+
authStatus:
7364
+
$ref: "#/components/schemas/AuthStatus"
7365
+
authUrlRelativePath:
7366
+
type: string
7367
+
description: |
7368
+
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.
7369
+
CheckDatasourceAuthResponse:
7370
+
properties:
7371
+
unauthorizedDatasourceInstances:
7372
+
type: array
7373
+
description: |
7374
+
Datasource instances that require per-user OAuth authorization. Empty or absent when all datasources are authorized.
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.
7853
-
AuthStatus:
7854
-
type: string
7855
-
description: The per-user authorization status for a datasource.
7856
-
enum:
7857
-
- DISABLED
7858
-
- AWAITING_AUTH
7859
-
- AUTHORIZED
7860
-
- STALE_OAUTH
7861
-
- SEG_MIGRATION
7862
-
x-enum-varnames:
7863
-
- AUTH_STATUS_DISABLED
7864
-
- AUTH_STATUS_AWAITING_AUTH
7865
-
- AUTH_STATUS_AUTHORIZED
7866
-
- AUTH_STATUS_STALE_OAUTH
7867
-
- AUTH_STATUS_SEG_MIGRATION
7868
-
UnauthorizedDatasourceInstance:
7869
-
description: |
7870
-
A datasource instance that could not return results for this request because the user has not completed or has expired per-user OAuth.
7871
-
properties:
7872
-
datasourceInstance:
7873
-
type: string
7874
-
description: |
7875
-
The instance identifier (e.g. "github", "github_enterprise_0", "slack_0"). Matches the instance names used in datasource configuration.
7876
-
example: slack_0
7877
-
displayName:
7878
-
type: string
7879
-
description: Human-readable name of the datasource instance for display.
7880
-
example: Slack
7881
-
authStatus:
7882
-
$ref: "#/components/schemas/AuthStatus"
7883
-
authUrlRelativePath:
7884
-
type: string
7885
-
description: |
7886
-
Relative path to initiate or resume OAuth for the current user and instance. Clients should prepend their configured Glean backend base URL.
7887
7922
ChatResponse:
7888
7923
description: A single response from the /chat backend.
|`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/> |
0 commit comments