@@ -2,7 +2,7 @@ openapi: 3.0.0
22info:
33 version: 0.9.0
44 title: Glean API
5- x-source-commit-sha: 1c30a2e9466bf278374bd82863042433f7fa8a6d
5+ x-source-commit-sha: 9f5f4e6c3d36bcee31fe976617d8f59070276515
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.
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: bfa098a27c3b8f11087766de34606765c946e305
25+ x-open-api-commit-sha: 5047254735507a0920ff0b8d0ff644febf825e8b
2626 x-speakeasy-name: 'Glean API'
2727servers:
2828 - url: https://{instance}-be.glean.com
@@ -3200,6 +3200,40 @@ paths:
32003200 description: Conflict
32013201 x-speakeasy-name-override: upload
32023202 x-speakeasy-group: indexing.shortcuts
3203+ /api/index/v1/document/{docId}/custom-metadata/{groupName}:
3204+ servers:
3205+ - url: https://{domain}-be.glean.com/rest/api/index
3206+ variables:
3207+ domain:
3208+ default: domain
3209+ description: Email domain (without extension) that determines the deployment backend.
3210+ parameters:
3211+ - name: docId
3212+ in: path
3213+ description: Unique Glean identifier of the document
3214+ required: true
3215+ schema:
3216+ type: string
3217+ - name: groupName
3218+ in: path
3219+ description: Name of the metadata group as specified while adding schema
3220+ required: true
3221+ schema:
3222+ type: string
3223+ /api/index/v1/custom-metadata/schema/{groupName}:
3224+ servers:
3225+ - url: https://{domain}-be.glean.com/rest/api/index
3226+ variables:
3227+ domain:
3228+ default: domain
3229+ description: Email domain (without extension) that determines the deployment backend.
3230+ parameters:
3231+ - name: groupName
3232+ in: path
3233+ description: Name of the metadata group schema
3234+ required: true
3235+ schema:
3236+ type: string
32033237 /rest/api/v1/governance/data/policies/{id}:
32043238 get:
32053239 description: Fetches the specified policy version, or the latest if no version is provided.
@@ -8069,6 +8103,7 @@ components:
80698103 - VISITORS_COUNT
80708104 - RECENT_SHARES
80718105 - DOCUMENT_CONTENT
8106+ - CUSTOM_METADATA
80728107 DocumentOrError:
80738108 oneOf:
80748109 - $ref: "#/components/schemas/Document"
@@ -12092,6 +12127,48 @@ components:
1209212127 description: List of lifecycle events corresponding to the document
1209312128 items:
1209412129 $ref: "#/components/schemas/LifeCycleEvent"
12130+ CustomMetadataPutRequest:
12131+ type: object
12132+ description: Request body for adding or updating custom metadata on a document
12133+ properties:
12134+ customMetadata:
12135+ type: array
12136+ description: Array of custom metadata key-value pairs
12137+ items:
12138+ $ref: "#/components/schemas/CustomProperty"
12139+ required:
12140+ - customMetadata
12141+ CustomMetadataSchema:
12142+ type: object
12143+ description: Schema for custom metadata containing metadata key definitions
12144+ properties:
12145+ metadataKeys:
12146+ type: array
12147+ description: Array of metadata key definitions
12148+ items:
12149+ $ref: "#/components/schemas/PropertyDefinition"
12150+ required:
12151+ - metadataKeys
12152+ SuccessResponse:
12153+ type: object
12154+ description: Success response for custom metadata operations
12155+ properties:
12156+ success:
12157+ type: boolean
12158+ description: Indicates if the operation was successful
12159+ default: true
12160+ ErrorInfoResponse:
12161+ type: object
12162+ description: Error response for custom metadata operations
12163+ properties:
12164+ error:
12165+ type: string
12166+ description: Error message describing what went wrong
12167+ message:
12168+ type: string
12169+ description: Additional details about the error
12170+ required:
12171+ - error
1209512172 PropertyDefinition:
1209612173 properties:
1209712174 name:
@@ -12869,6 +12946,43 @@ components:
1286912946 description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.
1287012947 schema:
1287112948 type: integer
12949+ responses:
12950+ SuccessResponse:
12951+ description: OK
12952+ content:
12953+ application/json:
12954+ schema:
12955+ $ref: "#/components/schemas/SuccessResponse"
12956+ BadRequestError:
12957+ description: Bad Request
12958+ content:
12959+ application/json:
12960+ schema:
12961+ $ref: "#/components/schemas/ErrorInfoResponse"
12962+ UnauthorizedError:
12963+ description: Not Authorized
12964+ content:
12965+ application/json:
12966+ schema:
12967+ $ref: "#/components/schemas/ErrorInfoResponse"
12968+ NotFoundError:
12969+ description: Not Found
12970+ content:
12971+ application/json:
12972+ schema:
12973+ $ref: "#/components/schemas/ErrorInfoResponse"
12974+ TooManyRequestsError:
12975+ description: Too Many Requests
12976+ content:
12977+ application/json:
12978+ schema:
12979+ $ref: "#/components/schemas/ErrorInfoResponse"
12980+ InternalServerError:
12981+ description: Internal Server Error
12982+ content:
12983+ application/json:
12984+ schema:
12985+ $ref: "#/components/schemas/ErrorInfoResponse"
1287212986x-tagGroups:
1287312987 - name: Search & Generative AI
1287412988 tags:
0 commit comments