From 05b4217230e539012e13b3448671e72556e8b6f1 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 19 Jun 2026 18:43:44 +0000 Subject: [PATCH 1/2] ## Java SDK Changes: * `glean.agents.createAgent()`: **Added** * `glean.client.announcements.create()`: * `request.createAnnouncementRequest.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `response.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `glean.client.announcements.update()`: * `request.updateAnnouncementRequest.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `response.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `glean.client.answers.create()`: * `request.createAnswerRequest.data.addedRoles[].group.type.enum(collectionAudience)` **Added** * `response.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.answers.update()`: * `request.editAnswerRequest.addedRoles[].group.type.enum(collectionAudience)` **Added** * `response.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.answers.retrieve()`: `response.answerResult.answer.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.answers.list()`: `response.answerResults[].answer.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.chat.create()`: * `request.chatRequest.messages[].citations[].sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `response.messages[].citations[].sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `glean.client.chat.retrieve()`: `response.chatResult.chat.createdBy.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.chat.list()`: `response.chatResults[].chat.createdBy.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.chat.createStream()`: * `request.chatRequest.messages[].citations[].sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `glean.client.collections.addItems()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.collections.create()`: * `request.createCollectionRequest.addedRoles[].group.type.enum(collectionAudience)` **Added** * `response.union(class (0)).collection.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.collections.deleteItem()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.collections.update()`: * `request.editCollectionRequest.addedRoles[].group.type.enum(collectionAudience)` **Added** * `response.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.collections.updateItem()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.collections.retrieve()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.collections.list()`: `response.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.documents.retrieve()`: `response.documents.Map.union(Document).metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `glean.client.documents.retrieveByFacets()`: `response.documents[].metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `glean.client.insights.retrieve()`: `response.gleanAssist.activityInsights[].user.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.messages.retrieve()`: `response.searchResponse.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.pins.update()`: `response.attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.pins.retrieve()`: `response.pin.attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.pins.list()`: `response.pins[].attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.pins.create()`: `response.attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.search.queryAsAdmin()`: * `request.searchRequest.sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `response.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.search.autocomplete()`: `response.results[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `glean.client.search.retrieveFeed()`: * `request.feedRequest.categories[].enum(cardStackPromo)` **Added** * `response.results[]` **Changed** * `glean.client.search.recommendations()`: * `request.recommendationsRequest.sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `response.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.search.query()`: * `request.searchRequest.sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added** * `response.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.entities.list()`: `response.results[].relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.entities.readPeople()`: `response.results[].relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.shortcuts.create()`: * `request.createShortcutRequest.data.addedRoles[].group.type.enum(collectionAudience)` **Added** * `response.shortcut.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.shortcuts.retrieve()`: `response.shortcut.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.shortcuts.list()`: `response.shortcuts[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.shortcuts.update()`: * `request.updateShortcutRequest.addedRoles[].group.type.enum(collectionAudience)` **Added** * `response.shortcut.addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.verification.addReminder()`: `response.metadata.lastVerifier.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.verification.list()`: `response.documents[].metadata.lastVerifier.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.verification.verify()`: `response.metadata.lastVerifier.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added** * `glean.client.governance.data.policies.retrieve()`: `response.report.config.allowlistOptions.regexes` **Added** * `glean.client.governance.data.policies.update()`: * `request.updateDlpReportRequest.config.allowlistOptions.regexes` **Added** * `glean.client.governance.data.policies.list()`: `response.reports[].config.allowlistOptions.regexes` **Added** * `glean.client.governance.data.policies.create()`: * `request.config.allowlistOptions.regexes` **Added** * `response.report.config.allowlistOptions.regexes` **Added** * `glean.client.governance.data.reports.create()`: * `request.config.allowlistOptions.regexes` **Added** --- .speakeasy/gen.lock | 209 +- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 29611 ++++++++-------- .speakeasy/workflow.lock | 12 +- README.md | 13 +- RELEASES.md | 12 +- build.gradle | 42 - docs/models/components/AllowlistOptions.md | 9 +- .../components/CreateWorkflowRequest.md | 10 + docs/models/components/DlpConfig.md | 30 +- docs/models/components/FeedRequestCategory.md | 1 + docs/models/components/FeedResult.md | 13 +- docs/models/components/FeedResultCategory.md | 1 + docs/models/components/GroupType.md | 21 +- docs/models/components/JustificationType.md | 1 + docs/models/components/PlacementReason.md | 22 + docs/models/operations/CreateAgentRequest.md | 10 + docs/models/operations/CreateAgentResponse.md | 11 + docs/sdks/agents/README.md | 54 + gradle.properties | 2 +- settings.gradle | 6 - .../build.gradle | 35 - .../ConditionalOnPropertyPrefix.java | 42 - .../GleanApiClientAutoConfig.java | 457 - .../GleanApiClientAutoConfigProperties.java | 518 - .../OnPropertyPrefixCondition.java | 69 - ...ot.autoconfigure.AutoConfiguration.imports | 1 - .../build.gradle | 29 - .../api_client/glean_api_client/Agents.java | 55 + .../glean_api_client/AsyncAgents.java | 55 + .../api_client/glean_api_client/Glean.java | 2 +- .../glean_api_client/SDKConfiguration.java | 4 +- .../models/components/AllowlistOptions.java | 77 +- .../components/CreateWorkflowRequest.java | 250 + .../components/CustomDatasourceConfig.java | 5 - .../models/components/DlpConfig.java | 24 +- .../components/FeedRequestCategory.java | 1 + .../models/components/FeedResult.java | 79 +- .../models/components/FeedResultCategory.java | 4 + .../models/components/GroupType.java | 6 +- .../models/components/JustificationType.java | 4 + .../models/components/PlacementReason.java | 134 + .../models/operations/CreateAgentRequest.java | 241 + .../operations/CreateAgentRequestBuilder.java | 78 + .../operations/CreateAgentResponse.java | 254 + .../async/CreateAgentRequestBuilder.java | 81 + .../operations/async/CreateAgentResponse.java | 254 + .../operations/CreateAgent.java | 266 + .../glean_api_client/utils/AsyncRetries.java | 11 +- .../glean_api_client/utils/Retries.java | 9 + .../utils/StreamingParser.java | 33 +- 51 files changed, 16892 insertions(+), 16278 deletions(-) create mode 100644 docs/models/components/CreateWorkflowRequest.md create mode 100644 docs/models/components/PlacementReason.md create mode 100644 docs/models/operations/CreateAgentRequest.md create mode 100644 docs/models/operations/CreateAgentResponse.md delete mode 100644 spring/glean-api-client-spring-boot-autoconfigure/build.gradle delete mode 100644 spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/ConditionalOnPropertyPrefix.java delete mode 100644 spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfig.java delete mode 100644 spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfigProperties.java delete mode 100644 spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/OnPropertyPrefixCondition.java delete mode 100644 spring/glean-api-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 spring/glean-api-client-spring-boot-starter/build.gradle create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/CreateWorkflowRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlacementReason.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/operations/CreateAgent.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2687bb9f..dddd0d9d 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,26 +1,26 @@ lockVersion: 2.0.0 id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: - docChecksum: f945598f65bd3d18fa64e0f4961a6114 + docChecksum: 47e4ec664b00e459247db48d21aac573 docVersion: 0.9.0 - speakeasyVersion: 1.771.0 - generationVersion: 2.893.0 - releaseVersion: 0.13.1 - configChecksum: d71729687a43ca8615eddfaa55f55d73 + speakeasyVersion: 1.784.0 + generationVersion: 2.911.0 + releaseVersion: 0.13.2 + configChecksum: 01f92ca30e2bf918b3bac1a614226956 repoURL: https://github.com/gleanwork/api-client-java.git installationURL: https://github.com/gleanwork/api-client-java published: true persistentEdits: - generation_id: 80b9a894-73cd-4094-9cb1-9e21d44a6243 - pristine_commit_hash: b075f4faa68b3b0e26c9ea82e9aad4b5e7cfca0b - pristine_tree_hash: ea0f232fefae79fa3cf902a8fa77686f15cbce0d + generation_id: 08e209b4-bb5e-4b35-805b-0dc869911831 + pristine_commit_hash: 4393410fbe3f2717536e421dd241daca8cf4e522 + pristine_tree_hash: fbc33144d4d0b451715817f84bb16aaa98e16bdd features: java: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.3 - core: 3.55.26 + core: 3.55.27 deprecations: 2.81.2 downloadStreams: 0.1.1 examples: 2.81.9 @@ -46,8 +46,8 @@ trackedFiles: pristine_git_object: 3d1f9b105935ea1eded859513fe6b38b36bd9154 build.gradle: id: f07866736216 - last_write_checksum: sha1:3777e03abfdb7dd4bbcc0817770ca5b95cc2f8d4 - pristine_git_object: 3815c3c2e292f1dce484e2cd13537c30ca8d5e28 + last_write_checksum: sha1:d8da0281b581d806d9b623a03d690bca14ac140b + pristine_git_object: c5cbe897d1517fb85ebae18f860dc6bc2ee47a37 docs/models/components/ActionAuthType.md: id: 85f17dd1d9c7 last_write_checksum: sha1:e2e0e2b4617367b35aab4d1092d820c2b1856072 @@ -170,8 +170,8 @@ trackedFiles: pristine_git_object: 608a98158a463de361d412e6fee1d3ea611e21bc docs/models/components/AllowlistOptions.md: id: 2922f212478e - last_write_checksum: sha1:968b917a4fb7eaabb411db2d2e81c1e4009fd50a - pristine_git_object: f64ba1b0c7fd423578b1cd923f12a7038fec784b + last_write_checksum: sha1:fe656a76c21c2fcef85cc446fe658c42e790732a + pristine_git_object: 8aad3b75aeaa2020f734989c3aa1b4c19d6d0be3 docs/models/components/Announcement.md: id: c91eb71412c1 last_write_checksum: sha1:05acfbafb74f2d31511559d272874bfebbcec908 @@ -592,6 +592,10 @@ trackedFiles: id: f48640a2b92e last_write_checksum: sha1:50bf41f1e87fbb8f22e6b21fb13cd13231b65d83 pristine_git_object: 7f7a0c5c81e4397cb2a6722fe795beddb61d0d57 + docs/models/components/CreateWorkflowRequest.md: + id: 2f7b9751ee87 + last_write_checksum: sha1:8905e9bd939b310ffd1133225c28474ba0131c48 + pristine_git_object: 9f5ba1262f38a1863d8042637d6ac53cc3f00bfd docs/models/components/CurrentActiveUsers.md: id: 2ad4e5a05724 last_write_checksum: sha1:056073a3ab6641fe73c575c2126a1c4aa53084ae @@ -870,8 +874,8 @@ trackedFiles: pristine_git_object: d6572d460fe91e77e6a400bb2c3480221c0f6c0a docs/models/components/DlpConfig.md: id: a2b26ffc7aaa - last_write_checksum: sha1:a584dbeb755570b52d32c1995f719808f518ea3c - pristine_git_object: 805d41b54b6055cbe183537fb83548a016acecb6 + last_write_checksum: sha1:0179351c0ad711204d51f80f7d59c7ed76103185 + pristine_git_object: 072c39c8fb45ea4fe8623d19e9678917a8f87480 docs/models/components/DlpExportFindingsRequest.md: id: 77b477ee2a66 last_write_checksum: sha1:1c023a2f7a010cf94204bedf2ad335a786b9b77b @@ -1162,8 +1166,8 @@ trackedFiles: pristine_git_object: b9cce921992bf7d948b7a2e3e4360ca2e3b81654 docs/models/components/FeedRequestCategory.md: id: afe4d7d42b83 - last_write_checksum: sha1:fe1ac7d5c6d3efdd56014ec3d52a00ac7d2d5713 - pristine_git_object: 848e24b7fd5feffcbd6ef3ec0775192a140f3e3a + last_write_checksum: sha1:5059c5a730ce870e569952f030c3d0974223c576 + pristine_git_object: a369cfa07bad4fdbece6973eef191ad69cfd2918 docs/models/components/FeedRequestOptions.md: id: 75fd500a75b1 last_write_checksum: sha1:448af6f7a5d161d4e2f856a6bfdb5da3bd7a9c68 @@ -1174,12 +1178,12 @@ trackedFiles: pristine_git_object: 4d3874ac1b8a16080c2cb2520e50570a1c46f28d docs/models/components/FeedResult.md: id: 7a86a9fbf989 - last_write_checksum: sha1:10c8d737ca569c0e4145e9c74778980b5202cd9c - pristine_git_object: afba3e3879106e42edd5584228a0c0ac91814b5e + last_write_checksum: sha1:0920606fcdb484fed0c7363da763e2c0f973a019 + pristine_git_object: fe54d018bd3d86cdb240ee2f85219c5fc07040c4 docs/models/components/FeedResultCategory.md: id: de8a61d55051 - last_write_checksum: sha1:07e2b1f7d1060a85d6aec33e924f727ba0d8fffd - pristine_git_object: 8292458ec32ed739e92579ab763401123595daaf + last_write_checksum: sha1:b032b71a5d24248d917e4ccb074e3166e4efd349 + pristine_git_object: b958da2488f695b261b59e1e5dfb92e453a5a2f7 docs/models/components/Feedback.md: id: 73b99e5606f2 last_write_checksum: sha1:20ae2315c831db0791ccd9a9d396dbb2811dbd15 @@ -1390,8 +1394,8 @@ trackedFiles: pristine_git_object: a77fb307ccec626ed108b6fd2783c4a192b2d250 docs/models/components/GroupType.md: id: e527414e9f2b - last_write_checksum: sha1:be6ebc6fc34b0d0772b91c4a20dacf525e910f30 - pristine_git_object: 2cb4bd094e9e4c367a84efbcece6727a850f6c5d + last_write_checksum: sha1:52adaec5dfe8b9a9b50581e4c9c360802e5aac89 + pristine_git_object: 8b607f8095df714cefe60cdf1e6d52d01adb6f67 docs/models/components/HideBuiltInFacet.md: id: a49ccbc67d8e last_write_checksum: sha1:bdfee32ac5ecb4734039172cda501305ad9278f3 @@ -1514,8 +1518,8 @@ trackedFiles: pristine_git_object: ef8823f4217073ab8cda466d2e3e36d080141fd2 docs/models/components/JustificationType.md: id: 4f9697992386 - last_write_checksum: sha1:716612869355b4fb429daf2e4a2e9c66abed581d - pristine_git_object: 2fd22ddfd74708359bebdb94e64a40da618b0ef8 + last_write_checksum: sha1:7edc2cba475008ee69d4dbbe10aa9bf5a97adf72 + pristine_git_object: 0a20746985e8220a85cc7adfdb79fa1d0930f2d8 docs/models/components/KnowledgeType.md: id: 652b79486bf3 last_write_checksum: sha1:350f41b8184a84215ebbab80a83079e093a54b40 @@ -1788,6 +1792,10 @@ trackedFiles: id: e34761fcac1d last_write_checksum: sha1:c143e8b597404fff21391698e828fd25ae3ac42a pristine_git_object: 44217a9bdde4d0fa11b4e1d97ba5d3909dbd0a0f + docs/models/components/PlacementReason.md: + id: 815a98152861 + last_write_checksum: sha1:3f84f59fe69a40543a34cdc7e20f654de02b0fc7 + pristine_git_object: 73d960cf6462bdd5cf1a77e6bd58c0b2a7a7cc79 docs/models/components/PossibleValue.md: id: b082d515927c last_write_checksum: sha1:80b4a4842f40dd2b5a0e20956b1d60b66486a080 @@ -2524,6 +2532,14 @@ trackedFiles: id: b0564f4e0239 last_write_checksum: sha1:2174466825b5b23a9639536e91497adda6f34fdc pristine_git_object: f3110ff4316b7494ab46264b04d5ff57ede8b055 + docs/models/operations/CreateAgentRequest.md: + id: 2d553a0f150b + last_write_checksum: sha1:63f293b44c6bd1fd3db426e20b4d53dfbb2c2ca3 + pristine_git_object: e8b5e9160356854af045b20e985bbdf1f41d336b + docs/models/operations/CreateAgentResponse.md: + id: 391c23cd4f10 + last_write_checksum: sha1:3243aab5bd4b1c16e624e15037db6d9cd8bdb057 + pristine_git_object: 05fa443a6bec19b87f0d66823f06558ade195b6d docs/models/operations/CreateAndStreamRunResponse.md: id: 6b095cc4a9d3 last_write_checksum: sha1:8ded27214783aab6c0376ee63278f9fefd61094b @@ -3334,8 +3350,8 @@ trackedFiles: pristine_git_object: f3ecb5fda2b888721a48e50acb4e541bcc09a757 docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:c4ec2132a5b0d9a6e77fbdf32e36173943281114 - pristine_git_object: c47e91f53aaafff86b288f8640599bc338e14028 + last_write_checksum: sha1:87cc311cb445f843121fe08246d922af7a8bf6a6 + pristine_git_object: 1fe959f7fad70d6333fb86fc96e2319edea655c4 docs/sdks/announcements/README.md: id: 3d2e130a217c last_write_checksum: sha1:d518fe37c613bdef6f738b2e1ef52918bc782324 @@ -3474,8 +3490,8 @@ trackedFiles: pristine_git_object: 3decbce5bd40edbe278c1c5d2dbf585808e51d9a gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:46be99bbf76b75fe0807135250659205e6775716 - pristine_git_object: f6a8718adb619a358b954f720eb36ca1cad651e0 + last_write_checksum: sha1:bd3287b5990a48c2f3da46acc554222af8b3b9ee + pristine_git_object: 0b215eeb630619c5ad8ff02b6b69e1a44c04dce5 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -3498,44 +3514,16 @@ trackedFiles: pristine_git_object: 7bc3d081e634d7b1a5963fba9d88a70f36238435 settings.gradle: id: 05efc8b16577 - last_write_checksum: sha1:5b9925ebcb7a7de1a29c744b4610002aa3718c0d - pristine_git_object: 0326ca672ac2094353a5b2566acd9bc5c1a4a897 - spring/glean-api-client-spring-boot-autoconfigure/build.gradle: - id: ebaf72a89df9 - last_write_checksum: sha1:5b1fceceabf7ff0a77de2a5f194684f9fcedf289 - pristine_git_object: 3bbefc4f1d8e13b2b439b1db0f87d60c90ac4273 - ? spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/ConditionalOnPropertyPrefix.java - : id: c17b99382f55 - last_write_checksum: sha1:259632357c39872eccdac0c535b79cba34ae4a82 - pristine_git_object: f18ce057dd1a4d7496475e4d3158cc44bd91f97a - ? spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfig.java - : id: dc219279f3d6 - last_write_checksum: sha1:e56cdded7ec031b330b0554d1468602628ae7880 - pristine_git_object: f9dfd60812fdf89e93f5b8e75b196ccad2ba2f90 - ? spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfigProperties.java - : id: 5111ca066791 - last_write_checksum: sha1:3570912b428b0fce42dc094898b98b0b6012a30a - pristine_git_object: ccfade089c2459702ade65e7570f1ef7755779df - ? spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/OnPropertyPrefixCondition.java - : id: "269180435615" - last_write_checksum: sha1:640d6066b79200fb274e0e75c28c3597ff15f9e3 - pristine_git_object: c5bf1eefe0976aa3bc878612de3b791ac7138d0c - ? spring/glean-api-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports - : id: 1d31cd304c7e - last_write_checksum: sha1:a14bfccaa39986cddbe006470279d7e90535b64f - pristine_git_object: 5b50a32ff977e64ffb21740bc135176a8d621372 - spring/glean-api-client-spring-boot-starter/build.gradle: - id: 3d6db738c149 - last_write_checksum: sha1:aa7a39c8fc77900fb7ca55818ba6503e9a511b68 - pristine_git_object: 351259849677ed68dc011159a5fd06995d26151a + last_write_checksum: sha1:b6bfdcd318b0d36bec967f6941ae1fd1e5ea653c + pristine_git_object: 5228fb0c98cb42a2e9dabdb2255b0c1f60f72deb src/main/java/com/glean/api_client/glean_api_client/Activity.java: id: 56fcd6e483c1 last_write_checksum: sha1:848e2a80ac0d761c8b96e15fdf460b45d76ae370 pristine_git_object: df42bc238520dfa6a790833984bfc1e386b3510e src/main/java/com/glean/api_client/glean_api_client/Agents.java: id: 69615daff4b4 - last_write_checksum: sha1:f76c5b532fda8218cd9cc7d64949556bfe060753 - pristine_git_object: 42ff73f8c6b5d1888cc8c3a9478560269ff692d5 + last_write_checksum: sha1:fa174d355d792f253f0ffa8be4adaf49bd4b8b20 + pristine_git_object: bc56c524014ed94f38cad21669910c29be0b5e4a src/main/java/com/glean/api_client/glean_api_client/Announcements.java: id: 23fcf3ba5c75 last_write_checksum: sha1:41a393ad53e8dedc383c224a3b789e80f936b114 @@ -3550,8 +3538,8 @@ trackedFiles: pristine_git_object: c4b4a844fc24a20d724ee016bc00cfb0125c28f9 src/main/java/com/glean/api_client/glean_api_client/AsyncAgents.java: id: 5fb5adf2262c - last_write_checksum: sha1:e7c6f8a8a19f57844a65baed29457c52f16ae816 - pristine_git_object: dd04fd0e104d97d0125e6c3014a3c16539c28430 + last_write_checksum: sha1:c074c9ecd3150109944d143dad4c0d0d8e6b629c + pristine_git_object: fa11a40b96185612b46f5106028d3862821cd78d src/main/java/com/glean/api_client/glean_api_client/AsyncAnnouncements.java: id: a4630e10d992 last_write_checksum: sha1:7c3ded3cbef281f4de46835f65ca4348af14137c @@ -3778,8 +3766,8 @@ trackedFiles: pristine_git_object: 5706517df674b1759ffae3aa7188e507d598e462 src/main/java/com/glean/api_client/glean_api_client/Glean.java: id: ebe9053b14eb - last_write_checksum: sha1:972dea7c6c0a631ad8785a5f18a555c5fdeee87b - pristine_git_object: 7df143d9b39e0381b521a2bd51374402460cff7d + last_write_checksum: sha1:c9c3f12cb78819f1deb108d839076b94c1a624b4 + pristine_git_object: 6daa8699181d8cc44cfefbcf7c8b84675451c918 src/main/java/com/glean/api_client/glean_api_client/Governance.java: id: 2d4a3c95da6a last_write_checksum: sha1:0f382cfcb96689435a4b397b1105ff9641d98eac @@ -3838,8 +3826,8 @@ trackedFiles: pristine_git_object: ffae914775eb41ff311371f62504344a59d090fd src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java: id: d5fcc61f5992 - last_write_checksum: sha1:742fb3b77d9c085432fd7a4a6c714a48e340d865 - pristine_git_object: 85a9705d1ee61b4b74045edf8a7bde90a196da4f + last_write_checksum: sha1:5431110b87362c2ce8c93f57ab2798bd3ee12856 + pristine_git_object: 01a82e37a2b873b18f8ee026cb2191ebe49cd869 src/main/java/com/glean/api_client/glean_api_client/Search.java: id: f22d94b920b5 last_write_checksum: sha1:ac38d1ed47be207940dd6fb7e4c688dddccc6a8b @@ -3986,8 +3974,8 @@ trackedFiles: pristine_git_object: 12f73f6341482503b6a2d18d36291a5994a7a54b src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java: id: 6759b6d6593e - last_write_checksum: sha1:c3d7042b210578698f9e9f30bffc263654cd1f22 - pristine_git_object: 7763b5d9c3541534817f169ec33e4cf21ff04c81 + last_write_checksum: sha1:765b1bc99c122f7389ace9a05210149422d2a3d0 + pristine_git_object: 6d0df2f21f578b03ae3cb3dbc836d894cffe7940 src/main/java/com/glean/api_client/glean_api_client/models/components/Announcement.java: id: 0ed24b6c2d4e last_write_checksum: sha1:48d50921a0a03d1a84ab489d5c1692faca51443e @@ -4408,6 +4396,10 @@ trackedFiles: id: 50ede4f97a18 last_write_checksum: sha1:39dbfd5ca7e56d57c2217ee168a9f1dcdb6d5000 pristine_git_object: cd92ec8e614cf9b95fee675b5aace3e9fb934c76 + src/main/java/com/glean/api_client/glean_api_client/models/components/CreateWorkflowRequest.java: + id: 5787c28d8983 + last_write_checksum: sha1:a7eded022b04750c89ac87652f0a4ad653255756 + pristine_git_object: 1b1c289fc55e7966f76846dc3d7544815605e88f src/main/java/com/glean/api_client/glean_api_client/models/components/CurrentActiveUsers.java: id: 270d2a2bdf80 last_write_checksum: sha1:cf530d74648b55590453964714865916465f069c @@ -4418,8 +4410,8 @@ trackedFiles: pristine_git_object: 34fd2448f93fa8f65719532773e356ba1a59e21a src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java: id: 6650ecaaf44e - last_write_checksum: sha1:6feef81a6b74cf3cdf1efe9e5ed86ff43dcbddc1 - pristine_git_object: 5bf70eee3d20a6b155216adf2c0eb0eaf9ca5793 + last_write_checksum: sha1:9ab35cf60a05d8a5a3032c906a5eadf9c6012f8a + pristine_git_object: 036873e4e0da103e247fe03ad795913409be61e0 src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfigConnectorType.java: id: d826a426a226 last_write_checksum: sha1:42f1a644b703763dc8c1e606e967f9b25ce88d4d @@ -4686,8 +4678,8 @@ trackedFiles: pristine_git_object: cc5e9366313e45e40136124138588dbf80e7ad89 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java: id: e23109c453cb - last_write_checksum: sha1:df00d3f8f0b5ee1dd5692b829569b1b5b13ca335 - pristine_git_object: 85dce0dfd671897055ce2d05c1eee739abcc593c + last_write_checksum: sha1:ca0cdf00f061103510b28d82865211dacb62eeab + pristine_git_object: a76da10facf3a4a0298bbbb9ccccd312d05c0cc2 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpExportFindingsRequest.java: id: f65a1e62e286 last_write_checksum: sha1:15d6b3a35bb3d703da64c3d6b242266bb32a7594 @@ -4978,8 +4970,8 @@ trackedFiles: pristine_git_object: da07bc2b22a0c18ddaaeb554bf70ddf655b607cc src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java: id: 57e4db8e0360 - last_write_checksum: sha1:c2518e8b079c3ef9e0fdfa3c4ae1f7e827bc89f2 - pristine_git_object: f0d7c1201075856efc0571c137586007c5c20161 + last_write_checksum: sha1:725b2b84b5c46ecb30b83b427f636300f52bd7c9 + pristine_git_object: 5a820ad36c560af2c94144a2e00e7a783249a728 src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestOptions.java: id: 0961449ce7b9 last_write_checksum: sha1:1becd935e511806b12ea1aedebd9da174d807ad6 @@ -4990,12 +4982,12 @@ trackedFiles: pristine_git_object: a509886e11adc151eb132f7882555d0051802721 src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java: id: 302612d2ce4f - last_write_checksum: sha1:5f37b23311643bbe4997f773a4fa46b73ab8eba6 - pristine_git_object: d48710af7fe0154dc068aa6461409edf2e064068 + last_write_checksum: sha1:f8b7c8f08012b1290cafe5daf47e5d63ad78c0c8 + pristine_git_object: 32750e39b3f10683acfb3f3e57422288364d7126 src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java: id: d5f852e61d61 - last_write_checksum: sha1:6cffe0b182629c16b44b6df1b7ec886ef4a09352 - pristine_git_object: 3a0dbce93c584f3c91d3cf5bdfe84cfb68b2030e + last_write_checksum: sha1:b34e2fc19854ff18c8aa302e71d771d5a98e5002 + pristine_git_object: d6293d3364ca42816174b23cf217a17c5abd7a9a src/main/java/com/glean/api_client/glean_api_client/models/components/Feedback.java: id: f7178cc3b4f0 last_write_checksum: sha1:266cacdd3f7c698ffdbd56a505d8fda10170c444 @@ -5206,8 +5198,8 @@ trackedFiles: pristine_git_object: d7cb67eda79c3263b460c3a90d735083a5ef118f src/main/java/com/glean/api_client/glean_api_client/models/components/GroupType.java: id: bc799be0dc57 - last_write_checksum: sha1:2fb53c8c5433d79deffb77674fa4a4d23c193651 - pristine_git_object: 3192586850eafa5466fbc00129456a74b7d75127 + last_write_checksum: sha1:3906f2c53423796bb06111e7690a2fd3814c0c6c + pristine_git_object: bb3a832de03562ccceffd405423afd9d6c43c2a2 src/main/java/com/glean/api_client/glean_api_client/models/components/HideBuiltInFacet.java: id: 6e2c851b0491 last_write_checksum: sha1:05032e0e1e2b4bebed932e1b142ea9714618da9e @@ -5330,8 +5322,8 @@ trackedFiles: pristine_git_object: 27aa91ed2894e57bf87f42b39c63adbe776c49f9 src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java: id: 4e704d02ecd5 - last_write_checksum: sha1:96a3e62a4f649d94ae22baf35df913b2bc631673 - pristine_git_object: dd0e56fac576b344bc7ba0f0352fe787d99075c0 + last_write_checksum: sha1:0fa4106f98bd2962a381a6f812ad34c64ea60b05 + pristine_git_object: 1ecff28ca8f8c0ad0b70ebd11a3752835d437d5d src/main/java/com/glean/api_client/glean_api_client/models/components/KnowledgeType.java: id: 86321f7dd6fe last_write_checksum: sha1:85872bd4390e4a048c4995b1427bec8b2fe88664 @@ -5604,6 +5596,10 @@ trackedFiles: id: c20f6b2c5b34 last_write_checksum: sha1:c3df6cad7218ff4c006db25c412fbc63846d366f pristine_git_object: 7051ba7a4930cf15eb9532c69ff8b92194174747 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlacementReason.java: + id: 37484b3af112 + last_write_checksum: sha1:b6d015065bb61834823b0fd773977c26503a51fd + pristine_git_object: e50763a3229c69c02d6a69620f409de3d39ad942 src/main/java/com/glean/api_client/glean_api_client/models/components/PossibleValue.java: id: 1c530baf92d6 last_write_checksum: sha1:676338b4060eb871152260e200286654979986ed @@ -6328,6 +6324,10 @@ trackedFiles: id: 865504b1d554 last_write_checksum: sha1:33d63c0c540725e5564005c3d8abc121d9ba4d6a pristine_git_object: 885c6c62e437b980f651a1b43ac4d5d4d036a950 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/CreateAgentRequestBuilder.java: + id: c7498521cc37 + last_write_checksum: sha1:b0394e6c241ad2b3f9513b8a6deb3e7a460f604f + pristine_git_object: 7d2e9a9c666f7d24cfc4de447659e4cefc64bbe7 src/main/java/com/glean/api_client/glean_api_client/models/operations//async/CreateAndStreamRunRequestBuilder.java: id: 075f3b249c34 last_write_checksum: sha1:12a46ee4e7e62926fe4220227ea336c0d35fc37f @@ -6908,6 +6908,18 @@ trackedFiles: id: bd90925f5643 last_write_checksum: sha1:b15ddea9923c3fec55bffa058de9d2890dfbe75a pristine_git_object: 7667b3f47c3582a8ef4d7999c8a7b36ee807cbca + src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequest.java: + id: 177d8e375f2b + last_write_checksum: sha1:f52d7844473a90c5f38d67dcfc4e85b60ef5b84d + pristine_git_object: cc0d6fff07a7767c328aaf1219f3af6f1e5ade8c + src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequestBuilder.java: + id: 7b7da64e250d + last_write_checksum: sha1:d4ec0849fde23bc8c62f9ad61516058d02c579cf + pristine_git_object: 5b139437f8eb0d9b17874f89526513a28dd2d909 + src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentResponse.java: + id: 8d1ea0305afe + last_write_checksum: sha1:29ed287de75cc07f7e3fd964bc1b8f4742f81c12 + pristine_git_object: f8bb1d83d4c4cd975c8a3769faeab8778b173ea6 src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunRequestBuilder.java: id: db16c6796152 last_write_checksum: sha1:df6fa0966f9f5ea1a6f0edb7c1d2b21a24fb6853 @@ -8228,6 +8240,10 @@ trackedFiles: id: 1f27e2c6ccb4 last_write_checksum: sha1:849be46a6c8cdb6f6477055bdd15e686899ec930 pristine_git_object: 5528ffffea345e524a3c2068c6867f6757e93575 + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentResponse.java: + id: 3d342a42df89 + last_write_checksum: sha1:916b79b1c93ebca3075284fd65bb2adb1d73314c + pristine_git_object: 91c283e2e56f90a08ce6d349015f854c4a4e81c6 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAndStreamRunResponse.java: id: 98386214f4a5 last_write_checksum: sha1:4961b28bfe83e8711c27e3198c726da6a1bba858 @@ -8744,6 +8760,10 @@ trackedFiles: id: 2f3fcbc23100 last_write_checksum: sha1:9c97f5e3b1ad04d72019e57f509e0a75613577e5 pristine_git_object: 9532330c50ea43b0760de90d803d8b460d75a19a + src/main/java/com/glean/api_client/glean_api_client/operations/CreateAgent.java: + id: 7aa85409b860 + last_write_checksum: sha1:5b1b5fef7929931d73317233333b754414164e4a + pristine_git_object: 17a52b0363726c9b9d7020390c1f8da3b596fc28 src/main/java/com/glean/api_client/glean_api_client/operations/CreateAndStreamRun.java: id: b8ec40595118 last_write_checksum: sha1:19cd9fce7f5f76a964ebaa19d5266763da8f59e4 @@ -9242,8 +9262,8 @@ trackedFiles: pristine_git_object: dc3150516b78e833f12b132591331b29ff4db434 src/main/java/com/glean/api_client/glean_api_client/utils/AsyncRetries.java: id: dd44cc448d9a - last_write_checksum: sha1:534a65ee2305f447b68b8c68a6089c38d475e54c - pristine_git_object: 3a5ada8f19e36dbc672d7615801bc861b63c1a39 + last_write_checksum: sha1:6a39eb7b7151f601569030cecdf2b03668a4b418 + pristine_git_object: 00be540cf21328d0538b7cce94e5fd6c1e54ccd3 src/main/java/com/glean/api_client/glean_api_client/utils/AsyncRetryableException.java: id: ff4dec5f071e last_write_checksum: sha1:cc2be515a17bb6f3c17ecf888115fe972191edc6 @@ -9426,8 +9446,8 @@ trackedFiles: pristine_git_object: 5610e2b9931939a25fc5fab3e99d47954193e2bf src/main/java/com/glean/api_client/glean_api_client/utils/Retries.java: id: dc12860a484b - last_write_checksum: sha1:9259aa1278da01c2b4b767110bc23935cc2d9d4e - pristine_git_object: eaa2c6407d569d88e1780cdf3bcbd3d3ae42f05e + last_write_checksum: sha1:50db345e457fc4541f80fd6937e282c1c01423d0 + pristine_git_object: 04a703489b72249fab2b9a8a20e9386270e0cf78 src/main/java/com/glean/api_client/glean_api_client/utils/RetryConfig.java: id: a21e12216e2e last_write_checksum: sha1:dcef9481fa602c8beb967c4cdb2f6e20d8096a1e @@ -9466,8 +9486,8 @@ trackedFiles: pristine_git_object: f754fdea647a00dba3dbf8f850f322b84d71f947 src/main/java/com/glean/api_client/glean_api_client/utils/StreamingParser.java: id: 9185a9279a6f - last_write_checksum: sha1:ac8e7b8ef4728d3c53094543c2d2705b54378394 - pristine_git_object: 84b2ff5bc5bc70a7763cfcc46179f2a92a48a4a3 + last_write_checksum: sha1:2b4e46093d8825440dd0da8a1180f95b3b4de01e + pristine_git_object: 7744b81cd188bbc66eabaf82aaf61072aafc015e src/main/java/com/glean/api_client/glean_api_client/utils/TypedObject.java: id: 126310f10084 last_write_checksum: sha1:3d6387087c7116a5baaba8087c590ded3accb163 @@ -10412,6 +10432,13 @@ examples: application/json: {"status": "MISSING"} "400": application/json: {} + createAgent: + speakeasy-default-create-agent: + requestBody: + application/json: {} + responses: + "200": + application/json: {"workflow": {"author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "lastDraftSavedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "lastUpdatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}} examplesVersion: 1.0.2 generatedTests: activity: "2025-06-09T18:03:44Z" @@ -10554,9 +10581,7 @@ generatedTests: get_/rest/api/v1/tools/list: "2025-06-09T18:03:44Z" post_/rest/api/v1/tools/call: "2025-06-09T18:03:44Z" listpolicies: "2025-06-09T18:03:44Z" -releaseNotes: | - ## Java SDK Changes: - * `glean.client.chat.create()`: `response.status[202]` **Added** (Breaking ⚠️) +releaseNotes: "## Java SDK Changes:\n* `glean.agents.createAgent()`: **Added**\n* `glean.client.announcements.create()`: \n * `request.createAnnouncementRequest.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n * `response.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.announcements.update()`: \n * `request.updateAnnouncementRequest.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n * `response.body.structuredList[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.answers.create()`: \n * `request.createAnswerRequest.data.addedRoles[].group.type.enum(collectionAudience)` **Added**\n * `response.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.answers.update()`: \n * `request.editAnswerRequest.addedRoles[].group.type.enum(collectionAudience)` **Added**\n * `response.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.answers.retrieve()`: `response.answerResult.answer.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.answers.list()`: `response.answerResults[].answer.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.chat.create()`: \n * `request.chatRequest.messages[].citations[].sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n * `response.messages[].citations[].sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.chat.retrieve()`: `response.chatResult.chat.createdBy.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.chat.list()`: `response.chatResults[].chat.createdBy.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.chat.createStream()`: \n * `request.chatRequest.messages[].citations[].sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.collections.addItems()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.collections.create()`: \n * `request.createCollectionRequest.addedRoles[].group.type.enum(collectionAudience)` **Added**\n * `response.union(class (0)).collection.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.collections.deleteItem()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.collections.update()`: \n * `request.editCollectionRequest.addedRoles[].group.type.enum(collectionAudience)` **Added**\n * `response.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.collections.updateItem()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.collections.retrieve()`: `response.collection.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.collections.list()`: `response.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.documents.retrieve()`: `response.documents.Map.union(Document).metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.documents.retrieveByFacets()`: `response.documents[].metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.insights.retrieve()`: `response.gleanAssist.activityInsights[].user.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.messages.retrieve()`: `response.searchResponse.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.pins.update()`: `response.attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.pins.retrieve()`: `response.pin.attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.pins.list()`: `response.pins[].attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.pins.create()`: `response.attribution.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.search.queryAsAdmin()`: \n * `request.searchRequest.sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n * `response.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.search.autocomplete()`: `response.results[].document.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.search.retrieveFeed()`: \n * `request.feedRequest.categories[].enum(cardStackPromo)` **Added**\n * `response.results[]` **Changed**\n* `glean.client.search.recommendations()`: \n * `request.recommendationsRequest.sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n * `response.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.search.query()`: \n * `request.searchRequest.sourceDocument.metadata.author.relatedDocuments[].results[].structuredResults[].customEntity.roles[].group.type.enum(collectionAudience)` **Added**\n * `response.results[].structuredResults[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.entities.list()`: `response.results[].relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.entities.readPeople()`: `response.results[].relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.shortcuts.create()`: \n * `request.createShortcutRequest.data.addedRoles[].group.type.enum(collectionAudience)` **Added**\n * `response.shortcut.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.shortcuts.retrieve()`: `response.shortcut.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.shortcuts.list()`: `response.shortcuts[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.shortcuts.update()`: \n * `request.updateShortcutRequest.addedRoles[].group.type.enum(collectionAudience)` **Added**\n * `response.shortcut.addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.verification.addReminder()`: `response.metadata.lastVerifier.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.verification.list()`: `response.documents[].metadata.lastVerifier.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.verification.verify()`: `response.metadata.lastVerifier.relatedDocuments[].querySuggestion.ranges[].document.metadata.collections[].addedRoles[].group.type.enum(collectionAudience)` **Added**\n* `glean.client.governance.data.policies.retrieve()`: `response.report.config.allowlistOptions.regexes` **Added**\n* `glean.client.governance.data.policies.update()`: \n * `request.updateDlpReportRequest.config.allowlistOptions.regexes` **Added**\n* `glean.client.governance.data.policies.list()`: `response.reports[].config.allowlistOptions.regexes` **Added**\n* `glean.client.governance.data.policies.create()`: \n * `request.config.allowlistOptions.regexes` **Added**\n * `response.report.config.allowlistOptions.regexes` **Added**\n* `glean.client.governance.data.reports.create()`: \n * `request.config.allowlistOptions.regexes` **Added**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e1890819..f0225fe1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.13.1 + version: 0.13.2 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 78ed030c..dcf6afeb 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -1,14975 +1,14788 @@ openapi: 3.0.0 info: - version: 0.9.0 - title: Glean API - x-source-commit-sha: 8041c7f73ed7b1a8bb52c21b4736355b3d3ac705 - 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. + version: 0.9.0 + title: Glean API + x-source-commit-sha: a866a67699083ca67b6ffb2126427320df4ae258 + 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. - # Usage guidelines - This API is evolving fast. Glean will provide advance notice of any planned backwards incompatible changes along - with a 6-month sunset period for anything that requires developers to adopt the new versions. + # Usage guidelines + This API is evolving fast. Glean will provide advance notice of any planned backwards incompatible changes along + with a 6-month sunset period for anything that requires developers to adopt the new versions. - # API Clients - Official API clients for the Glean Indexing API are available in multiple languages: + # API Clients + Official API clients for the Glean Indexing API are available in multiple languages: - - [Python](https://github.com/gleanwork/api-client-python) - - [TypeScript](https://github.com/gleanwork/api-client-typescript) - - [Go](https://github.com/gleanwork/api-client-go) - - [Java](https://github.com/gleanwork/api-client-java) + - [Python](https://github.com/gleanwork/api-client-python) + - [TypeScript](https://github.com/gleanwork/api-client-typescript) + - [Go](https://github.com/gleanwork/api-client-go) + - [Java](https://github.com/gleanwork/api-client-java) - 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: bcfb45a263878a9d08bcb4117a44e970b498dc10 - x-speakeasy-name: 'Glean API' + 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: d14ea9ae89adbd4d9e30d885b3060451339063d3 + x-speakeasy-name: 'Glean API' servers: - - url: https://{instance}-be.glean.com - variables: - instance: - default: instance-name - description: The instance name (typically the email domain without the TLD) that determines the deployment backend. + - url: https://{instance}-be.glean.com + variables: + instance: + default: instance-name + description: The instance name (typically the email domain without the TLD) that determines the deployment backend. +security: + - APIToken: [] paths: - /rest/api/v1/activity: - post: - tags: - - Activity - summary: Report document activity - description: Report user activity that occurs on indexed documents such as viewing or editing. This signal improves search quality. - operationId: activity - x-visibility: Public - x-codegen-request-body-name: payload - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Activity" - required: true - x-exportParamName: Activity - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: report - x-speakeasy-group: client.activity - /rest/api/v1/feedback: - post: - tags: - - Activity - summary: Report client activity - description: Report events that happen to results within a Glean client UI, such as search result views and clicks. This signal improves search quality. - operationId: feedback - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - name: feedback - in: query - description: A URL encoded versions of Feedback. This is useful for requests. - required: false - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Feedback" - x-exportParamName: Feedback - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.activity - /rest/api/v1/createannouncement: - post: - tags: - - Announcements - summary: Create Announcement - description: Create a textual announcement visible to some set of users based on department and location. - operationId: createannouncement - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateAnnouncementRequest" - description: Announcement content - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/Announcement" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: create - x-speakeasy-group: client.announcements - /rest/api/v1/deleteannouncement: - post: - tags: - - Announcements - summary: Delete Announcement - description: Delete an existing user-generated announcement. - operationId: deleteannouncement - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteAnnouncementRequest" - description: Delete announcement request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: delete - x-speakeasy-group: client.announcements - /rest/api/v1/updateannouncement: - post: - tags: - - Announcements - summary: Update Announcement - description: Update a textual announcement visible to some set of users based on department and location. - operationId: updateannouncement - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateAnnouncementRequest" - description: Announcement content. Id need to be specified for the announcement. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/Announcement" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: update - x-speakeasy-group: client.announcements - /rest/api/v1/createanswer: - post: - tags: - - Answers - summary: Create Answer - description: Create a user-generated Answer that contains a question and answer. - operationId: createanswer - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateAnswerRequest" - description: CreateAnswer request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/Answer" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: create - x-speakeasy-group: client.answers - /rest/api/v1/deleteanswer: - post: - tags: - - Answers - summary: Delete Answer - description: Delete an existing user-generated Answer. - operationId: deleteanswer - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteAnswerRequest" - description: DeleteAnswer request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: delete - x-speakeasy-group: client.answers - /rest/api/v1/editanswer: - post: - tags: - - Answers - summary: Update Answer - description: Update an existing user-generated Answer. - operationId: editanswer - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/EditAnswerRequest" - description: EditAnswer request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/Answer" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: update - x-speakeasy-group: client.answers - /rest/api/v1/getanswer: - post: - tags: - - Answers - summary: Read Answer - description: Read the details of a particular Answer given its ID. - operationId: getanswer - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetAnswerRequest" - description: GetAnswer request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetAnswerResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.answers - /rest/api/v1/listanswers: - post: - tags: - - Answers - summary: List Answers - description: List Answers created by the current user. - operationId: listanswers - deprecated: true - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ListAnswersRequest" - description: ListAnswers request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ListAnswersResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - x-glean-deprecated: - id: 4c0923bd-64c7-45b9-99a5-b36f2705e618 - introduced: "2026-01-21" - message: Answer boards have been removed and this endpoint no longer serves a purpose - removal: "2026-10-15" - 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" - security: - - APIToken: [] - 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. + /rest/api/v1/activity: + post: + tags: + - Activity + summary: Report document activity + description: Report user activity that occurs on indexed documents such as viewing or editing. This signal improves search quality. + operationId: activity + x-visibility: Public + x-codegen-request-body-name: payload + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Activity" + required: true + x-exportParamName: Activity + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: report + x-speakeasy-group: client.activity + /rest/api/v1/feedback: + post: + tags: + - Activity + summary: Report client activity + description: Report events that happen to results within a Glean client UI, such as search result views and clicks. This signal improves search quality. + operationId: feedback + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - name: feedback + in: query + description: A URL encoded versions of Feedback. This is useful for requests. + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Feedback" + x-exportParamName: Feedback + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-group: client.activity + /rest/api/v1/createannouncement: + post: + tags: + - Announcements + summary: Create Announcement + description: Create a textual announcement visible to some set of users based on department and location. + operationId: createannouncement + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAnnouncementRequest" + description: Announcement content + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Announcement" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: create + x-speakeasy-group: client.announcements + /rest/api/v1/deleteannouncement: + post: + tags: + - Announcements + summary: Delete Announcement + description: Delete an existing user-generated announcement. + operationId: deleteannouncement + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteAnnouncementRequest" + description: Delete announcement request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: delete + x-speakeasy-group: client.announcements + /rest/api/v1/updateannouncement: + post: + tags: + - Announcements + summary: Update Announcement + description: Update a textual announcement visible to some set of users based on department and location. + operationId: updateannouncement + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateAnnouncementRequest" + description: Announcement content. Id need to be specified for the announcement. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Announcement" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: update + x-speakeasy-group: client.announcements + /rest/api/v1/createanswer: + post: + tags: + - Answers + summary: Create Answer + description: Create a user-generated Answer that contains a question and answer. + operationId: createanswer + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAnswerRequest" + description: CreateAnswer request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Answer" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: create + x-speakeasy-group: client.answers + /rest/api/v1/deleteanswer: + post: + tags: + - Answers + summary: Delete Answer + description: Delete an existing user-generated Answer. + operationId: deleteanswer + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteAnswerRequest" + description: DeleteAnswer request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: delete + x-speakeasy-group: client.answers + /rest/api/v1/editanswer: + post: + tags: + - Answers + summary: Update Answer + description: Update an existing user-generated Answer. + operationId: editanswer + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EditAnswerRequest" + description: EditAnswer request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Answer" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: update + x-speakeasy-group: client.answers + /rest/api/v1/getanswer: + post: + tags: + - Answers + summary: Read Answer + description: Read the details of a particular Answer given its ID. + operationId: getanswer + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetAnswerRequest" + description: GetAnswer request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetAnswerResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.answers + /rest/api/v1/listanswers: + post: + tags: + - Answers + summary: List Answers + description: List Answers created by the current user. + operationId: listanswers + deprecated: true + x-visibility: Public + x-codegen-request-body-name: payload + x-glean-deprecated: + id: 4c0923bd-64c7-45b9-99a5-b36f2705e618 + introduced: "2026-01-21" + message: Answer boards have been removed and this endpoint no longer serves a purpose + removal: "2026-10-15" + parameters: + - $ref: "#/components/parameters/locale" + 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" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ListAnswersRequest" + description: ListAnswers request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListAnswersResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + 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: - `/?transient_auth_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 - security: - - APIToken: [] - /rest/api/v1/createauthtoken: - post: - tags: - - Authentication - summary: Create authentication token - description: | - Creates an authentication token for the authenticated user. These are - specifically intended to be used with the [Web SDK](https://developers.glean.com/web). + Clients construct the full OAuth URL by combining the backend base URL, + the `authUrlRelativePath` from each instance, and the transient auth token: + `/?transient_auth_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: + - Authentication + summary: Create authentication token + description: | + Creates an authentication token for the authenticated user. These are + specifically intended to be used with the [Web SDK](https://developers.glean.com/web). - Note: The tokens generated from this endpoint are **not** valid tokens - for use with the Client API (e.g. `/rest/api/v1/*`). - operationId: createauthtoken - x-visibility: Public - parameters: [] - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/CreateAuthTokenResponse" - "400": - description: Invalid Request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: createToken - x-speakeasy-group: client.authentication - /rest/api/v1/chat: - post: - tags: - - Chat - summary: Chat - description: Have a conversation with Glean AI. - operationId: chat - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ChatRequest" - examples: - defaultExample: - value: - messages: - - author: USER - messageType: CONTENT - fragments: - - text: What are the company holidays this year? - gptAgentExample: - value: - agentConfig: - agent: GPT - messages: - - author: USER - messageType: CONTENT - fragments: - - text: Who was the first person to land on the moon? - description: Includes chat history for Glean AI to respond to. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ChatResponse' - examples: - defaultExample: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - hasMoreFragments: false - agentConfig: - agent: DEFAULT - mode: DEFAULT - fragments: - - text: There are no holidays! - streamingExample: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: null - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: null - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: - - text: e are - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: - - text: no hol - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: false - fragments: - - text: idays! - updateResponse: - value: - messages: - - author: GLEAN_AI - messageType: UPDATE - agentConfig: - agent: DEFAULT - mode: DEFAULT - fragments: - - text: '**Reading:**' - - structuredResults: - - document: - id: '123' - title: Company Handbook - citationResponse: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - citations: - - sourceDocument: - id: '123' - title: Company Handbook - referenceRanges: - - textRange: - startIndex: 0 - endIndex: 12 - type: CITATION - "202": - description: | - Request accepted but not yet processed. Returned when another - in-flight request is already running for the same chat session; - the body's `queuedRequestId` identifies the deferred run and - output will be persisted to the chat session referenced by - `chatId`. - content: - application/json: - schema: - $ref: "#/components/schemas/ChatResponse" - examples: - queuedExample: - value: - chatId: abc123 - queuedRequestId: qr-xyz - isSavedToChatHistory: true - "400": - description: Invalid request - "401": - description: Not Authorized - "408": - description: Request Timeout - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.chat - x-speakeasy-name-override: create - x-speakeasy-usage-example: true - /rest/api/v1/deleteallchats: - post: - tags: - - Chat - summary: Deletes all saved Chats owned by a user - description: Deletes all saved Chats a user has had and all their contained conversational content. - operationId: deleteallchats - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - security: - - APIToken: [] - x-speakeasy-name-override: deleteAll - x-speakeasy-group: client.chat - /rest/api/v1/deletechats: - post: - tags: - - Chat - summary: Deletes saved Chats - description: Deletes saved Chats and all their contained conversational content. - operationId: deletechats - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteChatsRequest" - required: true - x-exportParamName: Request - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: delete - x-speakeasy-group: client.chat - /rest/api/v1/getchat: - post: - tags: - - Chat - summary: Retrieves a Chat - description: Retrieves the chat history between Glean Assistant and the user for a given Chat. - operationId: getchat - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetChatRequest" - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetChatResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.chat - /rest/api/v1/listchats: - post: - tags: - - Chat - summary: Retrieves all saved Chats - description: Retrieves all the saved Chats between Glean Assistant and the user. The returned Chats contain only metadata and no conversational content. - operationId: listchats - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ListChatsResponse" - "401": - description: Not Authorized - "403": - description: Forbidden - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: list - x-speakeasy-group: client.chat - /rest/api/v1/getchatapplication: - post: - tags: - - Chat - summary: Gets the metadata for a custom Chat application - description: Gets the Chat application details for the specified application ID. - operationId: getchatapplication - x-visibility: Preview - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetChatApplicationRequest" - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetChatApplicationResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - security: - - APIToken: [] - x-speakeasy-name-override: retrieveApplication - x-speakeasy-group: client.chat - /rest/api/v1/uploadchatfiles: - post: - tags: - - Chat - summary: Upload files for Chat - description: Upload files for Chat. - operationId: uploadchatfiles - x-visibility: Public - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: "#/components/schemas/UploadChatFilesRequest" - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/UploadChatFilesResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: uploadFiles - x-speakeasy-group: client.chat - /rest/api/v1/getchatfiles: - post: - tags: - - Chat - summary: Get files uploaded by a user for Chat - description: Get files uploaded by a user for Chat. - operationId: getchatfiles - x-visibility: Public - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GetChatFilesRequest" - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetChatFilesResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieveFiles - x-speakeasy-group: client.chat - /rest/api/v1/deletechatfiles: - post: - tags: - - Chat - summary: Delete files uploaded by a user for chat - description: Delete files uploaded by a user for Chat. - operationId: deletechatfiles - x-visibility: Public - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteChatFilesRequest" - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: deleteFiles - x-speakeasy-group: client.chat - /rest/api/v1/chat-files/{fileId}: - get: - tags: - - Chat - summary: Download a chat file - description: | - Download the raw content of a file generated or uploaded during a chat session (for example, an image produced by the assistant). Returns the file bytes with a Content-Type header matching the file's MIME type. - operationId: getChatFile - x-visibility: Public - parameters: - - name: fileId - in: path - required: true - description: Identifier of the chat file to download. - schema: - type: string - - name: preview - in: query - required: false - description: | - When true and the file is a PDF, the response is served inline (Content-Disposition: inline) instead of as an attachment. - schema: - type: boolean - responses: - "200": - description: File content. - content: - application/octet-stream: - schema: - type: string - format: binary - "400": - description: File ID missing from path. - "401": - description: Missing or invalid API token. - "403": - description: Caller does not have access to the file. - "404": - description: File not found. - "500": - description: Internal server error. - security: - - APIToken: [] - /rest/api/v1/agents/{agent_id}: - get: - tags: - - Agents - summary: Retrieve an agent - description: Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder. - operationId: getAgent - x-visibility: Preview - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - - description: The ID of the agent. - required: true - schema: - type: string - title: Agent ID - description: The ID of the agent. - name: agent_id - in: path - responses: - "200": - description: Success - content: - application/json: - schema: - $ref: "#/components/schemas/Agent" - "400": - description: Bad request - "403": - description: Forbidden - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "500": - description: Internal server error - security: - - APIToken: [] - x-speakeasy-group: client.agents - x-speakeasy-name-override: retrieve - post: - tags: - - Agents - summary: Edit an agent - description: Creates a draft or publishes an [agent](https://developers.glean.com/agents/agents-api). Use `isDraft=true` to save a draft, or `isDraft=false` (or omit) to publish immediately. Only draft and publish modes are supported. - operationId: editAgent - x-visibility: Preview - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - - description: The ID of the agent. - required: true - schema: - type: string - title: Agent ID - description: The ID of the agent. - name: agent_id - in: path - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/EditWorkflowRequest" - responses: - "200": - description: Success - "400": - description: Bad request - "401": - description: Not Authorized - "403": - description: Forbidden - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "500": - description: Internal server error - security: - - APIToken: [] - /rest/api/v1/agents/{agent_id}/schemas: - get: - tags: - - Agents - summary: List an agent's schemas - description: Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure. - operationId: getAgentSchemas - x-visibility: Preview - parameters: - - $ref: "#/components/parameters/locale" - - $ref: "#/components/parameters/timezoneOffset" - - description: The ID of the agent. - required: true - schema: - type: string - title: Agent Id - description: The ID of the agent. - name: agent_id - in: path - responses: - "200": - description: Success - content: - application/json: - schema: - $ref: "#/components/schemas/AgentSchemas" - "400": - description: Bad request - "403": - description: Forbidden - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "422": - description: Validation Error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "500": - description: Internal server error - security: - - APIToken: [] - x-speakeasy-group: client.agents - x-speakeasy-name-override: retrieveSchemas - /rest/api/v1/agents/search: - post: - tags: - - Agents - summary: Search agents - description: Search for [agents](https://developers.glean.com/agents/agents-api) by agent name. - operationId: searchAgents - x-visibility: Preview - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/SearchAgentsRequest" - responses: - "200": - description: Success - content: - application/json: - schema: - $ref: "#/components/schemas/SearchAgentsResponse" - "400": - description: Bad request - "403": - description: Forbidden - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "422": - description: Validation Error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "500": - description: Internal server error - security: - - APIToken: [] - x-speakeasy-group: client.agents - x-speakeasy-name-override: list - /rest/api/v1/agents/runs/stream: - post: - tags: - - Agents - summary: Create an agent run and stream the response - description: "Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object." - operationId: createAndStreamRun - x-visibility: Preview - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AgentRunCreate" - required: true - responses: - "200": - description: Success - content: - text/event-stream: + Note: The tokens generated from this endpoint are **not** valid tokens + for use with the Client API (e.g. `/rest/api/v1/*`). + operationId: createauthtoken + x-visibility: Public + parameters: [] + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAuthTokenResponse" + "400": + description: Invalid Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: createToken + x-speakeasy-group: client.authentication + /rest/api/v1/chat: + post: + tags: + - Chat + summary: Chat + description: Have a conversation with Glean AI. + operationId: chat + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatRequest" + examples: + defaultExample: + value: + messages: + - author: USER + messageType: CONTENT + fragments: + - text: What are the company holidays this year? + gptAgentExample: + value: + agentConfig: + agent: GPT + messages: + - author: USER + messageType: CONTENT + fragments: + - text: Who was the first person to land on the moon? + description: Includes chat history for Glean AI to respond to. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ChatResponse' + examples: + defaultExample: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + hasMoreFragments: false + agentConfig: + agent: DEFAULT + mode: DEFAULT + fragments: + - text: There are no holidays! + streamingExample: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: null + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: null + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: + - text: e are + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: + - text: no hol + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: false + fragments: + - text: idays! + updateResponse: + value: + messages: + - author: GLEAN_AI + messageType: UPDATE + agentConfig: + agent: DEFAULT + mode: DEFAULT + fragments: + - text: '**Reading:**' + - structuredResults: + - document: + id: '123' + title: Company Handbook + citationResponse: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + citations: + - sourceDocument: + id: '123' + title: Company Handbook + referenceRanges: + - textRange: + startIndex: 0 + endIndex: 12 + type: CITATION + "202": + description: | + Request accepted but not yet processed. Returned when another + in-flight request is already running for the same chat session; + the body's `queuedRequestId` identifies the deferred run and + output will be persisted to the chat session referenced by + `chatId`. + content: + application/json: + schema: + $ref: "#/components/schemas/ChatResponse" + examples: + queuedExample: + value: + chatId: abc123 + queuedRequestId: qr-xyz + isSavedToChatHistory: true + "400": + description: Invalid request + "401": + description: Not Authorized + "408": + description: Request Timeout + "429": + description: Too Many Requests + x-speakeasy-group: client.chat + x-speakeasy-name-override: create + x-speakeasy-usage-example: true + /rest/api/v1/deleteallchats: + post: + tags: + - Chat + summary: Deletes all saved Chats owned by a user + description: Deletes all saved Chats a user has had and all their contained conversational content. + operationId: deleteallchats + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + x-speakeasy-name-override: deleteAll + x-speakeasy-group: client.chat + /rest/api/v1/deletechats: + post: + tags: + - Chat + summary: Deletes saved Chats + description: Deletes saved Chats and all their contained conversational content. + operationId: deletechats + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteChatsRequest" + required: true + x-exportParamName: Request + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-speakeasy-name-override: delete + x-speakeasy-group: client.chat + /rest/api/v1/getchat: + post: + tags: + - Chat + summary: Retrieves a Chat + description: Retrieves the chat history between Glean Assistant and the user for a given Chat. + operationId: getchat + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetChatRequest" + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetChatResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.chat + /rest/api/v1/listchats: + post: + tags: + - Chat + summary: Retrieves all saved Chats + description: Retrieves all the saved Chats between Glean Assistant and the user. The returned Chats contain only metadata and no conversational content. + operationId: listchats + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListChatsResponse" + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-speakeasy-name-override: list + x-speakeasy-group: client.chat + /rest/api/v1/getchatapplication: + post: + tags: + - Chat + summary: Gets the metadata for a custom Chat application + description: Gets the Chat application details for the specified application ID. + operationId: getchatapplication + x-visibility: Preview + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetChatApplicationRequest" + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetChatApplicationResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + x-speakeasy-name-override: retrieveApplication + x-speakeasy-group: client.chat + /rest/api/v1/uploadchatfiles: + post: + tags: + - Chat + summary: Upload files for Chat + description: Upload files for Chat. + operationId: uploadchatfiles + x-visibility: Public + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/UploadChatFilesRequest" + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/UploadChatFilesResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-speakeasy-name-override: uploadFiles + x-speakeasy-group: client.chat + /rest/api/v1/getchatfiles: + post: + tags: + - Chat + summary: Get files uploaded by a user for Chat + description: Get files uploaded by a user for Chat. + operationId: getchatfiles + x-visibility: Public + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GetChatFilesRequest" + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetChatFilesResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieveFiles + x-speakeasy-group: client.chat + /rest/api/v1/deletechatfiles: + post: + tags: + - Chat + summary: Delete files uploaded by a user for chat + description: Delete files uploaded by a user for Chat. + operationId: deletechatfiles + x-visibility: Public + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteChatFilesRequest" + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-speakeasy-name-override: deleteFiles + x-speakeasy-group: client.chat + /rest/api/v1/chat-files/{fileId}: + get: + tags: + - Chat + summary: Download a chat file + description: | + Download the raw content of a file generated or uploaded during a chat session (for example, an image produced by the assistant). Returns the file bytes with a Content-Type header matching the file's MIME type. + operationId: getChatFile + x-visibility: Public + parameters: + - name: fileId + in: path + required: true + description: Identifier of the chat file to download. + schema: + type: string + - name: preview + in: query + required: false + description: | + When true and the file is a PDF, the response is served inline (Content-Disposition: inline) instead of as an attachment. + schema: + type: boolean + responses: + "200": + description: File content. + content: + application/octet-stream: + schema: + type: string + format: binary + "400": + description: File ID missing from path. + "401": + description: Missing or invalid API token. + "403": + description: Caller does not have access to the file. + "404": + description: File not found. + "500": + description: Internal server error. + /rest/api/v1/agents: + post: + tags: + - Agents + summary: Create an agent + description: Create an agent. + operationId: createAgent + x-visibility: Preview + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateWorkflowRequest" + responses: + "200": + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/CreateWorkflowResponse" + "400": + description: Bad request + "401": + description: Not Authorized + "403": + description: Forbidden + "500": + description: Internal server error + /rest/api/v1/agents/{agent_id}: + get: + tags: + - Agents + summary: Retrieve an agent + description: Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder. + operationId: getAgent + x-visibility: Preview + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + - description: The ID of the agent. + required: true + schema: + type: string + title: Agent ID + description: The ID of the agent. + name: agent_id + in: path + responses: + "200": + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + "400": + description: Bad request + "403": + description: Forbidden + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Internal server error + x-speakeasy-group: client.agents + x-speakeasy-name-override: retrieve + post: + tags: + - Agents + summary: Edit an agent + description: Creates a draft or publishes an [agent](https://developers.glean.com/agents/agents-api). Use `isDraft=true` to save a draft, or `isDraft=false` (or omit) to publish immediately. Only draft and publish modes are supported. + operationId: editAgent + x-visibility: Preview + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + - description: The ID of the agent. + required: true + schema: + type: string + title: Agent ID + description: The ID of the agent. + name: agent_id + in: path + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/EditWorkflowRequest" + responses: + "200": + description: Success + "400": + description: Bad request + "401": + description: Not Authorized + "403": + description: Forbidden + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Internal server error + /rest/api/v1/agents/{agent_id}/schemas: + get: + tags: + - Agents + summary: List an agent's schemas + description: Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure. + operationId: getAgentSchemas + x-visibility: Preview + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + - description: The ID of the agent. + required: true + schema: + type: string + title: Agent Id + description: The ID of the agent. + name: agent_id + in: path + responses: + "200": + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/AgentSchemas" + "400": + description: Bad request + "403": + description: Forbidden + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "422": + description: Validation Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Internal server error + x-speakeasy-group: client.agents + x-speakeasy-name-override: retrieveSchemas + /rest/api/v1/agents/search: + post: + tags: + - Agents + summary: Search agents + description: Search for [agents](https://developers.glean.com/agents/agents-api) by agent name. + operationId: searchAgents + x-visibility: Preview + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/SearchAgentsRequest" + responses: + "200": + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/SearchAgentsResponse" + "400": + description: Bad request + "403": + description: Forbidden + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "422": + description: Validation Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Internal server error + x-speakeasy-group: client.agents + x-speakeasy-name-override: list + /rest/api/v1/agents/runs/stream: + post: + tags: + - Agents + summary: Create an agent run and stream the response + description: "Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object." + operationId: createAndStreamRun + x-visibility: Preview + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AgentRunCreate" + required: true + responses: + "200": + description: Success + content: + text/event-stream: + schema: + type: string + description: The server will send a stream of events in server-sent events (SSE) format. If execution fails after the stream has started, the stream may terminate with an error message in a normal `message` event. + example: | + id: 1 + event: message + data: {"messages":[{"role":"GLEAN_AI","content":[{"text":"Hello","type":"text"}]}]} + + id: 2 + event: message + data: {"messages":[{"role":"GLEAN_AI","content":[{"text":",","type":"text"}]}]} + + id: 3 + event: message + data: {"messages":[{"role":"GLEAN_AI","content":[{"text":" I'm","type":"text"}]}]} + + id: 4 + event: message + data: {"messages":[{"role":"GLEAN_AI","content":[{"text":" your","type":"text"}]}]} + "400": + description: Bad request + "403": + description: Forbidden + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: Conflict + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "422": + description: Validation Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Internal server error + x-speakeasy-group: client.agents + x-speakeasy-name-override: runStream + /rest/api/v1/agents/runs/wait: + post: + tags: + - Agents + summary: Create an agent run and wait for the response + description: "Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object." + operationId: createAndWaitRun + x-visibility: Preview + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AgentRunCreate" + required: true + responses: + "200": + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/AgentRunWaitResponse" + "400": + description: Bad request + "403": + description: Forbidden + "404": + description: Not Found + "409": + description: Conflict + "422": + description: Validation Error + "500": + description: Internal server error + x-speakeasy-group: client.agents + x-speakeasy-name-override: run + /rest/api/v1/addcollectionitems: + post: + tags: + - Collections + summary: Add Collection item + description: Add items to a Collection. + operationId: addcollectionitems + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AddCollectionItemsRequest" + description: Data describing the add operation. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/AddCollectionItemsResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: addItems + x-speakeasy-group: client.collections + /rest/api/v1/createcollection: + post: + tags: + - Collections + summary: Create Collection + description: Create a publicly visible (empty) Collection of documents. + operationId: createcollection + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateCollectionRequest" + description: Collection content plus any additional metadata for the request. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CreateCollectionResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "422": + description: Semantic error + content: + application/json: + schema: + $ref: "#/components/schemas/CollectionError" + "429": + description: Too Many Requests + x-speakeasy-group: client.collections + x-speakeasy-name-override: create + /rest/api/v1/deletecollection: + post: + tags: + - Collections + summary: Delete Collection + description: Delete a Collection given the Collection's ID. + operationId: deletecollection + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteCollectionRequest" + description: DeleteCollection request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "422": + description: Semantic error + content: + application/json: + schema: + $ref: "#/components/schemas/CollectionError" + "429": + description: Too Many Requests + x-speakeasy-name-override: delete + x-speakeasy-group: client.collections + /rest/api/v1/deletecollectionitem: + post: + tags: + - Collections + summary: Delete Collection item + description: Delete a single item from a Collection. + operationId: deletecollectionitem + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteCollectionItemRequest" + description: Data describing the delete operation. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteCollectionItemResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "422": + description: Failed to save deletion + "429": + description: Too Many Requests + x-speakeasy-name-override: deleteItem + x-speakeasy-group: client.collections + /rest/api/v1/editcollection: + post: + tags: + - Collections + summary: Update Collection + description: Update the properties of an existing Collection. + operationId: editcollection + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EditCollectionRequest" + description: Collection content plus any additional metadata for the request. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/EditCollectionResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "422": + description: Semantic error + content: + application/json: + schema: + $ref: "#/components/schemas/CollectionError" + "429": + description: Too Many Requests + x-speakeasy-name-override: update + x-speakeasy-group: client.collections + /rest/api/v1/editcollectionitem: + post: + tags: + - Collections + summary: Update Collection item + description: Update the URL, Glean Document ID, description of an item within a Collection given its ID. + operationId: editcollectionitem + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EditCollectionItemRequest" + description: Edit Collection Items request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/EditCollectionItemResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: updateItem + x-speakeasy-group: client.collections + /rest/api/v1/getcollection: + post: + tags: + - Collections + summary: Read Collection + description: Read the details of a Collection given its ID. Does not fetch items in this Collection. + operationId: getcollection + x-visibility: Preview + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetCollectionRequest" + description: GetCollection request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetCollectionResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.collections + /rest/api/v1/listcollections: + post: + tags: + - Collections + summary: List Collections + description: List all existing Collections. + operationId: listcollections + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ListCollectionsRequest" + description: ListCollections request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListCollectionsResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: list + x-speakeasy-group: client.collections + /rest/api/v1/getdocpermissions: + post: + tags: + - Documents + summary: Read document permissions + description: Read the emails of all users who have access to the given document. + operationId: getdocpermissions + x-visibility: Preview + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocPermissionsRequest" + description: Document permissions request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocPermissionsResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-speakeasy-name-override: retrievePermissions + x-speakeasy-group: client.documents + /rest/api/v1/getdocuments: + post: + tags: + - Documents + summary: Read documents + description: Read the documents including metadata (does not include enhanced metadata via `/documentmetadata`) for the given list of Glean Document IDs or URLs specified in the request. + operationId: getdocuments + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentsRequest" + description: Information about documents requested. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentsResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Documents does not exist, or user cannot access documents. + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.documents + /rest/api/v1/getdocumentsbyfacets: + post: + tags: + - Documents + summary: Read documents by facets + description: Read the documents including metadata (does not include enhanced metadata via `/documentmetadata`) macthing the given facet conditions. + operationId: getdocumentsbyfacets + x-visibility: Preview + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentsByFacetsRequest" + description: Information about facet conditions for documents to be retrieved. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentsByFacetsResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "404": + description: Not Found + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieveByFacets + x-speakeasy-group: client.documents + /rest/api/v1/insights: + post: + tags: + - Insights + summary: Get insights + description: Gets the aggregate usage insights data displayed in the Insights Dashboards. + operationId: insights + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/InsightsRequest" + description: Includes request parameters for insights requests. + required: true + x-exportParamName: InsightsRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/InsightsResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.insights + /rest/api/v1/messages: + post: + tags: + - Messages + summary: Read messages + description: Retrieves list of messages from messaging/chat datasources (e.g. Slack, Teams). + operationId: messages + x-visibility: Preview + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MessagesRequest" + description: Includes request params such as the id for channel/message and direction. + required: true + x-exportParamName: MessagesRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/MessagesResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.messages + /rest/api/v1/editpin: + post: + tags: + - Pins + summary: Update pin + description: Update an existing user-generated pin. + operationId: editpin + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EditPinRequest" + description: Edit pins request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/PinDocument" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: update + x-speakeasy-group: client.pins + /rest/api/v1/getpin: + post: + tags: + - Pins + summary: Read pin + description: Read pin details given its ID. + operationId: getpin + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetPinRequest" + description: Get pin request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetPinResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.pins + /rest/api/v1/listpins: + post: + tags: + - Pins + summary: List pins + description: Lists all pins. + operationId: listpins + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + type: object + description: List pins request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListPinsResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: list + x-speakeasy-group: client.pins + /rest/api/v1/pin: + post: + tags: + - Pins + summary: Create pin + description: Pin a document as a result for a given search query.Pin results that are known to be a good match. + operationId: pin + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PinRequest" + description: Details about the document and query for the pin. + required: true + x-exportParamName: PinDocument + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/PinDocument" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: create + x-speakeasy-group: client.pins + /rest/api/v1/unpin: + post: + tags: + - Pins + summary: Delete pin + description: Unpin a previously pinned result. + operationId: unpin + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Unpin" + description: Details about the pin being unpinned. + required: true + x-exportParamName: Unpin + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden from unpinning someone else's pin + "429": + description: Too Many Requests + x-speakeasy-name-override: remove + x-speakeasy-group: client.pins + /rest/api/v1/adminsearch: + post: + tags: + - Search + summary: Search the index (admin) + description: Retrieves results for search query without respect for permissions. This is available only to privileged users. + operationId: adminsearch + x-visibility: Preview + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SearchRequest" + description: Admin search request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/SearchResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfo" + "422": + description: Invalid Query + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfo" + "429": + description: Too Many Requests + x-speakeasy-group: client.search + x-speakeasy-name-override: queryAsAdmin + /rest/api/v1/autocomplete: + post: + tags: + - Search + summary: Autocomplete + description: Retrieve query suggestions, operators and documents for the given partially typed query. + operationId: autocomplete + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AutocompleteRequest" + description: Autocomplete request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/AutocompleteResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-group: client.search + x-speakeasy-name-override: autocomplete + /rest/api/v1/feed: + post: + tags: + - Search + summary: Feed of documents and events + description: The personalized feed/home includes different types of contents including suggestions, recents, calendar events and many more. + operationId: feed + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FeedRequest" + description: Includes request params, client data and more for making user's feed. + required: true + x-exportParamName: FeedRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/FeedResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "408": + description: Request Timeout + "429": + description: Too Many Requests + x-speakeasy-name-override: retrieveFeed + x-speakeasy-group: client.search + /rest/api/v1/recommendations: + post: + tags: + - Search + summary: Recommend documents + description: Retrieve recommended documents for the given URL or Glean Document ID. + operationId: recommendations + x-visibility: Preview + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RecommendationsRequest" + description: Recommendations request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/RecommendationsResponse" + "202": + description: Accepted. The Retry-After header has a hint about when the response will be available + "204": + description: There are no recommendations for this URL + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Document does not exist or user cannot access document + "429": + description: Too Many Requests + x-speakeasy-group: client.search + x-speakeasy-name-override: recommendations + /rest/api/v1/search: + post: + tags: + - Search + summary: Search + description: Retrieve results from the index for the given query and filters. + operationId: search + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SearchRequest" + description: Search request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/SearchResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfo" + "408": + description: Request Timeout + "422": + description: Invalid Query + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfo" + "429": + description: Too Many Requests + x-speakeasy-group: client.search + x-speakeasy-name-override: query + /rest/api/v1/listentities: + post: + tags: + - Entities + summary: List entities + description: List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. + operationId: listentities + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ListEntitiesRequest" + description: List people request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListEntitiesResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-group: client.entities + x-speakeasy-name-override: list + /rest/api/v1/people: + post: + tags: + - Entities + summary: Read people + description: Read people details for the given IDs. + operationId: people + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PeopleRequest" + description: People request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/PeopleResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: readPeople + x-speakeasy-group: client.entities + /rest/api/v1/people/{person_id}/photo: + get: + tags: + - Entities + summary: Get person photo + description: | + Returns the profile photo bytes for a person whose photo is stored in Glean (crawled from an identity source or user-uploaded via admin console). Photos hosted externally (e.g. Slack CDN) are not served by this endpoint; callers should follow the photoUrl from /people or /listentities directly. Responses include a Cache-Control header (max-age=3600) to reduce redundant fetches. + operationId: getPersonPhoto + x-visibility: Public + parameters: + - name: person_id + in: path + required: true + description: The obfuscated ID of the person whose photo to retrieve. + schema: + type: string + - name: ds + in: query + required: false + description: | + Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. + schema: + type: string + responses: + "200": + description: Photo bytes returned successfully. + headers: + Cache-Control: + description: Caching directive for the photo response. + schema: + type: string + example: public, max-age=3600 + example: public, max-age=3600 + content: + image/png: + schema: + type: string + format: binary + image/jpeg: + schema: + type: string + format: binary + "400": + description: Missing person_id parameter. + "401": + description: Not Authorized. + "404": + description: | + Person not found, person has no photo, or photo is not hosted by Glean (follow photoUrl from /people or /listentities directly). + "429": + description: Too Many Requests. + /rest/api/v1/createshortcut: + post: + tags: + - Shortcuts + summary: Create shortcut + description: Create a user-generated shortcut that contains an alias and destination URL. + operationId: createshortcut + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateShortcutRequest" + description: CreateShortcut request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CreateShortcutResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: create + x-speakeasy-group: client.shortcuts + /rest/api/v1/deleteshortcut: + post: + tags: + - Shortcuts + summary: Delete shortcut + description: Delete an existing user-generated shortcut. + operationId: deleteshortcut + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteShortcutRequest" + description: DeleteShortcut request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: delete + x-speakeasy-group: client.shortcuts + /rest/api/v1/getshortcut: + post: + tags: + - Shortcuts + summary: Read shortcut + description: Read a particular shortcut's details given its ID. + operationId: getshortcut + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetShortcutRequest" + description: GetShortcut request + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetShortcutResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-group: client.shortcuts + x-speakeasy-name-override: retrieve + /rest/api/v1/listshortcuts: + post: + tags: + - Shortcuts + summary: List shortcuts + description: List shortcuts editable/owned by the currently authenticated user. + operationId: listshortcuts + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ListShortcutsPaginatedRequest" + description: Filters, sorters, paging params required for pagination + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListShortcutsPaginatedResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-group: client.shortcuts + x-speakeasy-name-override: list + /rest/api/v1/updateshortcut: + post: + tags: + - Shortcuts + summary: Update shortcut + description: Updates the shortcut with the given ID. + operationId: updateshortcut + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateShortcutRequest" + description: Shortcut content. Id need to be specified for the shortcut. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateShortcutResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-group: client.shortcuts + x-speakeasy-name-override: update + /rest/api/v1/summarize: + post: + tags: + - Summarize + summary: Summarize documents + description: Generate an AI summary of the requested documents. + operationId: summarize + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SummarizeRequest" + description: Includes request params such as the query and specs of the documents to summarize. + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/SummarizeResponse" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: summarize + x-speakeasy-group: client.documents + /rest/api/v1/addverificationreminder: + post: + tags: + - Verification + summary: Create verification + description: Creates a verification reminder for the document. Users can create verification reminders from different product surfaces. + operationId: addverificationreminder + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ReminderRequest" + description: Details about the reminder. + required: true + x-exportParamName: ReminderRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Verification" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Document does not exist, does not support verification or user cannot access document + "429": + description: Too Many Requests + x-speakeasy-name-override: addReminder + x-speakeasy-group: client.verification + /rest/api/v1/listverifications: + post: + tags: + - Verification + summary: List verifications + description: Returns the information to be rendered in verification dashboard. Includes information for each document owned by user regarding their verifications. + operationId: listverifications + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - in: query + name: count + description: Maximum number of documents to return + required: false + schema: + type: integer + - $ref: "#/components/parameters/locale" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/VerificationFeed" + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: list + x-speakeasy-group: client.verification + /rest/api/v1/verify: + post: + tags: + - Verification + summary: Update verification + description: Verify documents to keep the knowledge up to date within customer corpus. + operationId: verify + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: "#/components/parameters/locale" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/VerifyRequest" + description: Details about the verification request. + required: true + x-exportParamName: VerifyRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Verification" + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Document does not exist, does not support verification or user cannot access document + "429": + description: Too Many Requests + x-speakeasy-name-override: verify + x-speakeasy-group: client.verification + /rest/api/v1/tools/list: + get: + tags: + - Tools + - Tools + summary: List available tools + description: Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. + x-visibility: Preview + parameters: + - in: query + name: toolNames + description: Optional array of tool names to filter by + required: false + schema: + type: array + items: + type: string + style: form + explode: false + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/ToolsListResponse" + "400": + description: Bad Request + "401": + description: Unauthorized + "404": + description: Not Found + "429": + description: Too Many Requests + x-speakeasy-name-override: list + x-speakeasy-group: client.tools + /rest/api/v1/tools/call: + post: + tags: + - Tools + - Tools + summary: Execute the specified tool + description: Execute the specified tool with provided parameters + x-visibility: Preview + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ToolsCallRequest" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/ToolsCallResponse" + "400": + description: Bad Request + "401": + description: Unauthorized + "404": + description: Not Found + "429": + description: Too Many Requests + x-speakeasy-name-override: run + x-speakeasy-group: client.tools + /rest/api/v1/actions/actionpack/{actionPackId}/auth: + parameters: + - in: path + name: actionPackId + required: true + description: ID of the action pack to query or authorize. schema: type: string - description: The server will send a stream of events in server-sent events (SSE) format. - example: | - id: 1 - event: message - data: {"messages":[{"role":"GLEAN_AI","content":[{"text":"Hello","type":"text"}]}]} + get: + tags: + - Tools + summary: Get end-user authentication status for an action pack. + description: | + Reports whether the calling user is already authenticated against the third-party + tool backing the specified action pack. Intended for headless / server-driven clients + that render an "Authorize" prompt when the user has not yet consented to the tool. + operationId: getActionPackAuthStatus + x-visibility: Preview + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/ActionPackAuthStatusResponse" + "400": + description: Bad Request + "401": + description: Unauthorized + "404": + description: Action pack not found + "429": + description: Too Many Requests + post: + tags: + - Tools + summary: Start the OAuth authorization flow for an action pack. + description: | + Starts the third-party OAuth flow for the specified action pack and returns the + redirect URL that the client should navigate the end user to. After the OAuth + callback completes, the user's browser is redirected back to `returnUrl` with a + status query parameter (`?glean_action_auth=success|error&actionPackId=...`). - id: 2 - event: message - data: {"messages":[{"role":"GLEAN_AI","content":[{"text":",","type":"text"}]}]} + `returnUrl` must match the tenant's configured return URL allowlist; otherwise the + request is rejected with 400. + operationId: authorizeActionPack + x-visibility: Preview + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/AuthorizeActionPackRequest" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AuthorizeActionPackResponse" + "400": + description: Invalid request (e.g. returnUrl not in allowlist, unsupported auth type) + "401": + description: Unauthorized + "403": + description: User not entitled to the action pack + "404": + description: Action pack not found + "429": + description: Too Many Requests + /api/index/v1/indexdocument: + post: + summary: Index document + description: Adds a document to the index or updates an existing document. + tags: + - Documents + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/IndexDocumentRequest" + required: true + x-exportParamName: IndexDocumentRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + "429": + description: Too Many Requests + x-speakeasy-name-override: addOrUpdate + x-speakeasy-group: indexing.documents + /api/index/v1/indexdocuments: + post: + summary: Index documents + description: Adds or updates multiple documents in the index. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-indexing/choosing-indexdocuments-vs-bulkindexdocuments) documentation for an explanation of when to use this endpoint. + tags: + - Documents + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/IndexDocumentsRequest" + required: true + x-exportParamName: IndexDocumentsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + "429": + description: Too Many Requests + x-speakeasy-name-override: index + x-speakeasy-group: indexing.documents + /api/index/v1/bulkindexdocuments: + post: + summary: Bulk index documents + description: Replaces the documents in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. + tags: + - Documents + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BulkIndexDocumentsRequest" + required: true + x-exportParamName: BulkIndexDocumentsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: bulkIndex + x-speakeasy-group: indexing.documents + /api/index/v1/updatepermissions: + post: + summary: Update document permissions + description: Updates the permissions for a given document without modifying document content. + tags: + - Documents + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdatePermissionsRequest" + required: true + x-exportParamName: UpdatePermissionsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + "429": + description: Too Many Requests + x-speakeasy-name-override: updatePermissions + x-speakeasy-group: indexing.permissions + /api/index/v1/processalldocuments: + post: + summary: Schedules the processing of uploaded documents + description: | + Schedules the immediate processing of documents uploaded through the indexing API. By default the uploaded documents will be processed asynchronously but this API can be used to schedule processing of all documents on demand. - id: 3 - event: message - data: {"messages":[{"role":"GLEAN_AI","content":[{"text":" I'm","type":"text"}]}]} + If a `datasource` parameter is specified, processing is limited to that custom datasource. Without it, processing applies to all documents across all custom datasources. + #### Rate Limits + This endpoint is rate-limited to one usage every 3 hours. Exceeding this limit results in a 429 response code. Here's how the rate limit works: + 1. Calling `/processalldocuments` for datasource `foo` prevents another call for `foo` for 3 hours. + 2. Calling `/processalldocuments` for datasource `foo` doesn't affect immediate calls for `bar`. + 3. Calling `/processalldocuments` for all datasources prevents any datasource calls for 3 hours. + 4. Calling `/processalldocuments` for datasource `foo` doesn't affect immediate calls for all datasources. - id: 4 - event: message - data: {"messages":[{"role":"GLEAN_AI","content":[{"text":" your","type":"text"}]}]} - "400": - description: Bad request - "403": - description: Forbidden - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "409": - description: Conflict - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "422": - description: Validation Error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - "500": - description: Internal server error - security: - - APIToken: [] - x-speakeasy-group: client.agents - x-speakeasy-name-override: runStream - /rest/api/v1/agents/runs/wait: - post: - tags: - - Agents - summary: Create an agent run and wait for the response - description: "Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object." - operationId: createAndWaitRun - x-visibility: Preview - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AgentRunCreate" - required: true - responses: - "200": - description: Success - content: - application/json: - schema: - $ref: "#/components/schemas/AgentRunWaitResponse" - "400": - description: Bad request - "403": - description: Forbidden - "404": - description: Not Found - "409": - description: Conflict - "422": - description: Validation Error - "500": - description: Internal server error - security: - - APIToken: [] - x-speakeasy-group: client.agents - x-speakeasy-name-override: run - /rest/api/v1/addcollectionitems: - post: - tags: - - Collections - summary: Add Collection item - description: Add items to a Collection. - operationId: addcollectionitems - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AddCollectionItemsRequest" - description: Data describing the add operation. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AddCollectionItemsResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: addItems - x-speakeasy-group: client.collections - /rest/api/v1/createcollection: - post: - tags: - - Collections - summary: Create Collection - description: Create a publicly visible (empty) Collection of documents. - operationId: createcollection - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateCollectionRequest" - description: Collection content plus any additional metadata for the request. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/CreateCollectionResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "422": - description: Semantic error - content: - application/json: - schema: - $ref: "#/components/schemas/CollectionError" - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.collections - x-speakeasy-name-override: create - /rest/api/v1/deletecollection: - post: - tags: - - Collections - summary: Delete Collection - description: Delete a Collection given the Collection's ID. - operationId: deletecollection - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteCollectionRequest" - description: DeleteCollection request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "422": - description: Semantic error - content: - application/json: - schema: - $ref: "#/components/schemas/CollectionError" - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: delete - x-speakeasy-group: client.collections - /rest/api/v1/deletecollectionitem: - post: - tags: - - Collections - summary: Delete Collection item - description: Delete a single item from a Collection. - operationId: deletecollectionitem - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteCollectionItemRequest" - description: Data describing the delete operation. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteCollectionItemResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "422": - description: Failed to save deletion - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: deleteItem - x-speakeasy-group: client.collections - /rest/api/v1/editcollection: - post: - tags: - - Collections - summary: Update Collection - description: Update the properties of an existing Collection. - operationId: editcollection - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/EditCollectionRequest" - description: Collection content plus any additional metadata for the request. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/EditCollectionResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "422": - description: Semantic error - content: - application/json: - schema: - $ref: "#/components/schemas/CollectionError" - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: update - x-speakeasy-group: client.collections - /rest/api/v1/editcollectionitem: - post: - tags: - - Collections - summary: Update Collection item - description: Update the URL, Glean Document ID, description of an item within a Collection given its ID. - operationId: editcollectionitem - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/EditCollectionItemRequest" - description: Edit Collection Items request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/EditCollectionItemResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: updateItem - x-speakeasy-group: client.collections - /rest/api/v1/getcollection: - post: - tags: - - Collections - summary: Read Collection - description: Read the details of a Collection given its ID. Does not fetch items in this Collection. - operationId: getcollection - x-visibility: Preview - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetCollectionRequest" - description: GetCollection request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetCollectionResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.collections - /rest/api/v1/listcollections: - post: - tags: - - Collections - summary: List Collections - description: List all existing Collections. - operationId: listcollections - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ListCollectionsRequest" - description: ListCollections request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ListCollectionsResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: list - x-speakeasy-group: client.collections - /rest/api/v1/getdocpermissions: - post: - tags: - - Documents - summary: Read document permissions - description: Read the emails of all users who have access to the given document. - operationId: getdocpermissions - x-visibility: Preview - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetDocPermissionsRequest" - description: Document permissions request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetDocPermissionsResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrievePermissions - x-speakeasy-group: client.documents - /rest/api/v1/getdocuments: - post: - tags: - - Documents - summary: Read documents - description: Read the documents including metadata (does not include enhanced metadata via `/documentmetadata`) for the given list of Glean Document IDs or URLs specified in the request. - operationId: getdocuments - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetDocumentsRequest" - description: Information about documents requested. - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetDocumentsResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Documents does not exist, or user cannot access documents. - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.documents - /rest/api/v1/getdocumentsbyfacets: - post: - tags: - - Documents - summary: Read documents by facets - description: Read the documents including metadata (does not include enhanced metadata via `/documentmetadata`) macthing the given facet conditions. - operationId: getdocumentsbyfacets - x-visibility: Preview - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetDocumentsByFacetsRequest" - description: Information about facet conditions for documents to be retrieved. - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetDocumentsByFacetsResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "404": - description: Not Found - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieveByFacets - x-speakeasy-group: client.documents - /rest/api/v1/insights: - post: - tags: - - Insights - summary: Get insights - description: Gets the aggregate usage insights data displayed in the Insights Dashboards. - operationId: insights - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/InsightsRequest" - description: Includes request parameters for insights requests. - required: true - x-exportParamName: InsightsRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/InsightsResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.insights - /rest/api/v1/messages: - post: - tags: - - Messages - summary: Read messages - description: Retrieves list of messages from messaging/chat datasources (e.g. Slack, Teams). - operationId: messages - x-visibility: Preview - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/MessagesRequest" - description: Includes request params such as the id for channel/message and direction. - required: true - x-exportParamName: MessagesRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/MessagesResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.messages - /rest/api/v1/editpin: - post: - tags: - - Pins - summary: Update pin - description: Update an existing user-generated pin. - operationId: editpin - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/EditPinRequest" - description: Edit pins request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/PinDocument" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: update - x-speakeasy-group: client.pins - /rest/api/v1/getpin: - post: - tags: - - Pins - summary: Read pin - description: Read pin details given its ID. - operationId: getpin - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetPinRequest" - description: Get pin request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetPinResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.pins - /rest/api/v1/listpins: - post: - tags: - - Pins - summary: List pins - description: Lists all pins. - operationId: listpins - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - type: object - description: List pins request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ListPinsResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: list - x-speakeasy-group: client.pins - /rest/api/v1/pin: - post: - tags: - - Pins - summary: Create pin - description: Pin a document as a result for a given search query.Pin results that are known to be a good match. - operationId: pin - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/PinRequest" - description: Details about the document and query for the pin. - required: true - x-exportParamName: PinDocument - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/PinDocument" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: create - x-speakeasy-group: client.pins - /rest/api/v1/unpin: - post: - tags: - - Pins - summary: Delete pin - description: Unpin a previously pinned result. - operationId: unpin - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Unpin" - description: Details about the pin being unpinned. - required: true - x-exportParamName: Unpin - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden from unpinning someone else's pin - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: remove - x-speakeasy-group: client.pins - /rest/api/v1/adminsearch: - post: - tags: - - Search - summary: Search the index (admin) - description: Retrieves results for search query without respect for permissions. This is available only to privileged users. - operationId: adminsearch - x-visibility: Preview - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/SearchRequest" - description: Admin search request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/SearchResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorInfo" - "422": - description: Invalid Query - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorInfo" - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.search - x-speakeasy-name-override: queryAsAdmin - /rest/api/v1/autocomplete: - post: - tags: - - Search - summary: Autocomplete - description: Retrieve query suggestions, operators and documents for the given partially typed query. - operationId: autocomplete - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AutocompleteRequest" - description: Autocomplete request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/AutocompleteResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.search - x-speakeasy-name-override: autocomplete - /rest/api/v1/feed: - post: - tags: - - Search - summary: Feed of documents and events - description: The personalized feed/home includes different types of contents including suggestions, recents, calendar events and many more. - operationId: feed - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FeedRequest" - description: Includes request params, client data and more for making user's feed. - required: true - x-exportParamName: FeedRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/FeedResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "408": - description: Request Timeout - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: retrieveFeed - x-speakeasy-group: client.search - /rest/api/v1/recommendations: - post: - tags: - - Search - summary: Recommend documents - description: Retrieve recommended documents for the given URL or Glean Document ID. - operationId: recommendations - x-visibility: Preview - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/RecommendationsRequest" - description: Recommendations request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/RecommendationsResponse" - "202": - description: Accepted. The Retry-After header has a hint about when the response will be available - "204": - description: There are no recommendations for this URL - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Document does not exist or user cannot access document - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.search - x-speakeasy-name-override: recommendations - /rest/api/v1/search: - post: - tags: - - Search - summary: Search - description: Retrieve results from the index for the given query and filters. - operationId: search - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/SearchRequest" - description: Search request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/SearchResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorInfo" - "408": - description: Request Timeout - "422": - description: Invalid Query - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorInfo" - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.search - x-speakeasy-name-override: query - /rest/api/v1/listentities: - post: - tags: - - Entities - summary: List entities - description: List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. - operationId: listentities - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ListEntitiesRequest" - description: List people request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ListEntitiesResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.entities - x-speakeasy-name-override: list - /rest/api/v1/people: - post: - tags: - - Entities - summary: Read people - description: Read people details for the given IDs. - operationId: people - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/PeopleRequest" - description: People request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/PeopleResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: readPeople - x-speakeasy-group: client.entities - /rest/api/v1/people/{person_id}/photo: - get: - tags: - - Entities - summary: Get person photo - description: | - Returns the profile photo bytes for a person whose photo is stored in Glean (crawled from an identity source or user-uploaded via admin console). Photos hosted externally (e.g. Slack CDN) are not served by this endpoint; callers should follow the photoUrl from /people or /listentities directly. Responses include a Cache-Control header (max-age=3600) to reduce redundant fetches. - operationId: getPersonPhoto - x-visibility: Public - parameters: - - name: person_id - in: path - required: true - description: The obfuscated ID of the person whose photo to retrieve. - schema: - type: string - - name: ds - in: query - required: false - description: | - Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. - schema: - type: string - responses: - "200": - description: Photo bytes returned successfully. - headers: - Cache-Control: - description: Caching directive for the photo response. + For more frequent document processing, contact Glean support. + tags: + - Documents + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ProcessAllDocumentsRequest" + x-exportParamName: ProcessAllDocumentsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: processAll + x-speakeasy-group: indexing.documents + /api/index/v1/deletedocument: + post: + summary: Delete document + description: Deletes the specified document from the index. Succeeds if document is not present. + tags: + - Documents + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteDocumentRequest" + required: true + x-exportParamName: DeleteDocumentRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: delete + x-speakeasy-group: indexing.documents + /api/index/v1/indexuser: + post: + summary: Index user + description: Adds a datasource user or updates an existing user. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/IndexUserRequest" + required: true + x-exportParamName: IndexUserRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: indexUser + x-speakeasy-group: indexing.permissions + /api/index/v1/bulkindexusers: + post: + summary: Bulk index users + description: | + Replaces the users in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. + Note: Any users deleted from the existing set will have their associated memberships deleted as well. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BulkIndexUsersRequest" + required: true + x-exportParamName: BulkIndexUsersRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: bulkIndexUsers + x-speakeasy-group: indexing.permissions + /api/index/v1/indexgroup: + post: + summary: Index group + description: Add or update a group in the datasource. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/IndexGroupRequest" + required: true + x-exportParamName: IndexGroupRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: indexGroup + x-speakeasy-group: indexing.permissions + /api/index/v1/bulkindexgroups: + post: + summary: Bulk index groups + description: | + Replaces the groups in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. + Note: Any groups deleted from the existing set will have their associated memberships deleted as well. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BulkIndexGroupsRequest" + required: true + x-exportParamName: BulkIndexGroupsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: bulkIndexGroups + x-speakeasy-group: indexing.permissions + /api/index/v1/indexmembership: + post: + summary: Index membership + description: Add the memberships of a group in the datasource. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/IndexMembershipRequest" + required: true + x-exportParamName: IndexMembershipRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: indexMembership + x-speakeasy-group: indexing.permissions + /api/index/v1/bulkindexmemberships: + post: + summary: Bulk index memberships for a group + description: Replaces the memberships for a group in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BulkIndexMembershipsRequest" + required: true + x-exportParamName: BulkIndexMembershipsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: bulkIndexMemberships + x-speakeasy-group: indexing.permissions + /api/index/v1/processallmemberships: + post: + summary: Schedules the processing of group memberships + description: | + Schedules the immediate processing of all group memberships uploaded through the indexing API. By default the uploaded group memberships will be processed asynchronously but this API can be used to schedule processing of all memberships on demand. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ProcessAllMembershipsRequest" + x-exportParamName: ProcessAllMembershipsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + x-speakeasy-name-override: processMemberships + x-speakeasy-group: indexing.permissions + /api/index/v1/deleteuser: + post: + summary: Delete user + description: | + Delete the user from the datasource. Silently succeeds if user is not present. + Note: All memberships associated with the deleted user will also be deleted. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteUserRequest" + required: true + x-exportParamName: DeleteUserRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: deleteUser + x-speakeasy-group: indexing.permissions + /api/index/v1/deletegroup: + post: + summary: Delete group + description: | + Delete group from the datasource. Silently succeeds if group is not present. + Note: All memberships associated with the deleted group will also be deleted. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteGroupRequest" + required: true + x-exportParamName: DeleteGroupRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: deleteGroup + x-speakeasy-group: indexing.permissions + /api/index/v1/deletemembership: + post: + summary: Delete membership + description: Delete membership to a group in the specified datasource. Silently succeeds if membership is not present. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteMembershipRequest" + required: true + x-exportParamName: DeleteMembershipRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: deleteMembership + x-speakeasy-group: indexing.permissions + /api/index/v1/debug/{datasource}/status: + post: + x-beta: true + summary: | + Beta: Get datasource status + description: | + Gather information about the datasource's overall status. Currently in beta, might undergo breaking changes without prior notice. + + Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. + tags: + - Troubleshooting + parameters: + - name: datasource + in: path + description: The datasource to get debug status for. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugDatasourceStatusResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + x-speakeasy-name-override: status + x-speakeasy-group: indexing.datasource + /api/index/v1/debug/{datasource}/document: + post: + x-beta: true + summary: | + Beta: Get document information + description: | + Gives various information that would help in debugging related to a particular document. Currently in beta, might undergo breaking changes without prior notice. + + Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. + tags: + - Troubleshooting + parameters: + - name: datasource + in: path + description: The datasource to which the document belongs + required: true + schema: + type: string + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugDocumentRequest" + required: true + x-exportParamName: DebugDocumentRequest + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugDocumentResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + x-speakeasy-group: indexing.documents + x-speakeasy-name-override: debug + /api/index/v1/debug/{datasource}/documents: + post: + x-beta: true + summary: | + Beta: Get information of a batch of documents + description: | + Gives various information that would help in debugging related to a batch of documents. Currently in beta, might undergo breaking changes without prior notice. + + Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. + tags: + - Troubleshooting + parameters: + - name: datasource + in: path + description: The datasource to which the document belongs + required: true + schema: + type: string + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugDocumentsRequest" + required: true + x-exportParamName: DebugDocumentsRequest + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugDocumentsResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + x-speakeasy-group: indexing.documents + x-speakeasy-name-override: debugMany + /api/index/v1/debug/{datasource}/user: + post: + x-beta: true + summary: | + Beta: Get user information + description: | + Gives various information that would help in debugging related to a particular user. Currently in beta, might undergo breaking changes without prior notice. + + Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. + tags: + - Troubleshooting + parameters: + - name: datasource + in: path + description: The datasource to which the user belongs + required: true + schema: + type: string + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugUserRequest" + required: true + x-exportParamName: DebugUserRequest + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugUserResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + x-speakeasy-name-override: debug + x-speakeasy-group: indexing.people + /api/index/v1/checkdocumentaccess: + post: + summary: Check document access + description: | + Check if a given user has access to access a document in a custom datasource + + Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. + tags: + - Troubleshooting + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CheckDocumentAccessRequest" + required: true + x-exportParamName: CheckDocumentAccessRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CheckDocumentAccessResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-group: indexing.documents + x-speakeasy-name-override: checkAccess + /api/index/v1/getdocumentstatus: + post: + deprecated: true + summary: Get document upload and indexing status + description: | + Intended for debugging/validation. Fetches the current upload and indexing status of documents. + + Tip: Use [/debug/{datasource}/document](https://developers.glean.com/indexing/debugging/datasource-document) for richer information. + tags: + - Troubleshooting + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentStatusRequest" + required: true + x-exportParamName: GetDocumentStatusRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentStatusResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-glean-deprecated: + id: 7eec0433-78fd-49f9-a34f-cca83640ec24 + introduced: "2026-02-03" + message: Endpoint is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" + x-speakeasy-group: indexing.documents + x-speakeasy-name-override: status + /api/index/v1/getdocumentcount: + post: + deprecated: true + summary: Get document count + description: | + Fetches document count for the specified custom datasource. + + Tip: Use [/debug/{datasource}/status](https://developers.glean.com/indexing/debugging/datasource-status) for richer information. + tags: + - Troubleshooting + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentCountRequest" + required: true + x-exportParamName: GetDocumentCountRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetDocumentCountResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-glean-deprecated: + id: c164089c-9412-4724-acf6-caf3b0d2a527 + introduced: "2026-02-03" + message: Endpoint is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" + x-speakeasy-group: indexing.documents + x-speakeasy-name-override: count + /api/index/v1/getusercount: + post: + deprecated: true + summary: Get user count + description: | + Fetches user count for the specified custom datasource. + + Tip: Use [/debug/{datasource}/status](https://developers.glean.com/indexing/debugging/datasource-status) for richer information. + tags: + - Troubleshooting + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetUserCountRequest" + required: true + x-exportParamName: GetUserCountRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetUserCountResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-glean-deprecated: + id: 4f5df873-385e-4539-8183-cb764b0f06b9 + introduced: "2026-02-03" + message: Endpoint is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" + x-speakeasy-name-override: count + x-speakeasy-group: indexing.people + /api/index/v1/betausers: + post: + summary: Beta users + description: Allow the datasource be visible to the specified beta users. The default behaviour is datasource being visible to all users if it is enabled and not visible to any user if it is not enabled. + tags: + - Permissions + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GreenlistUsersRequest" + required: true + x-exportParamName: GreenlistUsersRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: authorizeBetaUsers + x-speakeasy-group: indexing.permissions + /api/index/v1/adddatasource: + post: + summary: Add or update datasource + description: Add or update a custom datasource and its schema. + tags: + - Datasources + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CustomDatasourceConfig" + required: true + x-exportParamName: DatasourceConfig + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + x-speakeasy-name-override: add + x-speakeasy-group: indexing.datasources + /api/index/v1/getdatasourceconfig: + post: + summary: Get datasource config + description: Fetches the datasource config for the specified custom datasource. + tags: + - Datasources + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GetDatasourceConfigRequest" + required: true + x-exportParamName: GetDatasourceConfigRequest + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CustomDatasourceConfig" + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: retrieveConfig + x-speakeasy-group: indexing.datasources + /api/index/v1/rotatetoken: + post: + summary: Rotate token + description: Rotates the secret value inside the Indexing API token and returns the new raw secret. All other properties of the token are unchanged. In order to rotate the secret value, include the token as the bearer token in the `/rotatetoken` request. Please refer to [Token rotation](https://developers.glean.com/indexing/authentication/token-rotation) documentation for more information. + tags: + - Authentication + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/RotateTokenResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + x-speakeasy-name-override: rotateToken + x-speakeasy-group: indexing.authentication + /api/index/v1/indexemployee: + post: + summary: Index employee + description: Adds an employee or replaces the existing information about an employee. + tags: + - People + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/IndexEmployeeRequest" + required: true + x-exportParamName: IndexEmployeeRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: index + x-speakeasy-group: indexing.people + /api/index/v1/bulkindexemployees: + post: + summary: Bulk index employees + description: Replaces all the currently indexed employees using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. + tags: + - People + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/BulkIndexEmployeesRequest" + required: true + x-exportParamName: BulkIndexEmployeesRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-glean-deprecated: + id: ce596f49-55c4-465e-bf3c-5a3a33906e1f + introduced: "2026-02-03" + message: Endpoint is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" + deprecated: true + x-speakeasy-name-override: bulkIndex + x-speakeasy-group: indexing.people + /api/index/v1/indexemployeelist: {} + /api/index/v1/processallemployeesandteams: + post: + summary: Schedules the processing of uploaded employees and teams + description: | + Schedules the immediate processing of employees and teams uploaded through the indexing API. By default all uploaded people data will be processed asynchronously but this API can be used to schedule its processing on demand. + tags: + - People + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-speakeasy-name-override: processAllEmployeesAndTeams + x-speakeasy-group: indexing.people + /api/index/v1/deleteemployee: + post: + summary: Delete employee + description: Delete an employee. Silently succeeds if employee is not present. + tags: + - People + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DeleteEmployeeRequest" + required: true + x-exportParamName: DeleteEmployeeRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: delete + x-speakeasy-group: indexing.people + /api/index/v1/indexteam: + post: + summary: Index team + description: Adds a team or updates information about a team + tags: + - People + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/IndexTeamRequest" + required: true + x-exportParamName: IndexTeamRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: indexTeam + x-speakeasy-group: indexing.people + /api/index/v1/deleteteam: + post: + summary: Delete team + description: Delete a team based on provided id. + tags: + - People + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DeleteTeamRequest" + required: true + x-exportParamName: DeleteTeamRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: deleteTeam + x-speakeasy-group: indexing.people + /api/index/v1/bulkindexteams: + post: + summary: Bulk index teams + description: Replaces all the currently indexed teams using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. + tags: + - People + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/BulkIndexTeamsRequest" + required: true + x-exportParamName: BulkIndexTeamsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: bulkIndexTeams + x-speakeasy-group: indexing.people + /api/index/v1/bulkindexshortcuts: + post: + summary: Bulk index external shortcuts + description: Replaces all the currently indexed shortcuts using paginated batch API calls. Note that this endpoint is used for indexing shortcuts not hosted by Glean. If you want to upload shortcuts that would be hosted by Glean, please use the `/uploadshortcuts` endpoint. For information on what you can do with Golinks, which are Glean-hosted shortcuts, please refer to [this](https://docs.glean.com/user-guide/knowledge/go-links/how-go-links-work) page. + tags: + - Shortcuts + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/BulkIndexShortcutsRequest" + required: true + x-exportParamName: BulkIndexShortcutsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: bulkIndex + x-speakeasy-group: indexing.shortcuts + /api/index/v1/uploadshortcuts: + post: + summary: Upload shortcuts + description: Creates glean shortcuts for uploaded shortcuts info. Glean would host the shortcuts, and they can be managed in the knowledge tab once uploaded. + tags: + - Shortcuts + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/UploadShortcutsRequest" + required: true + x-exportParamName: UploadShortcutsRequest + responses: + "200": + description: OK + "400": + description: Bad Request + "401": + description: Not Authorized + "409": + description: Conflict + x-speakeasy-name-override: upload + x-speakeasy-group: indexing.shortcuts + /api/index/v1/debug/{datasource}/document/events: + post: + x-beta: true + summary: | + Beta: Get document lifecycle events + description: | + Retrieves lifecycle events for a specific document including upload time, index times and deletions. Rate limited to 1 request per minute per datasource. Currently in beta, might undergo breaking changes without prior notice. + tags: + - Troubleshooting + parameters: + - name: datasource + in: path + description: The datasource to which the document belongs + required: true + schema: + type: string + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugDocumentLifecycleRequest" + required: true + x-exportParamName: DebugDocumentLifecycleRequest + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DebugDocumentLifecycleResponse" + "400": + description: Bad Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + /rest/api/index/document/{docId}/custom-metadata/{groupName}: + servers: + - url: https://{instance}-be.glean.com + variables: + instance: + default: instance-name + description: The instance name (typically the email domain without the TLD) that determines the deployment backend. + parameters: + - name: docId + in: path + description: Unique Glean identifier of the document + required: true schema: type: string - example: public, max-age=3600 - content: - image/png: + - name: groupName + in: path + description: Name of the metadata group as specified while adding schema + required: true schema: type: string - format: binary - image/jpeg: + put: + summary: Add or update custom metadata + description: Associates custom metadata with a specific document. Custom metadata enables you to enrich documents with additional structured information that can be used for search, filtering, and faceting. + tags: + - Custom Metadata + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CustomMetadataPutRequest" + required: true + x-exportParamName: CustomMetadataPutRequest + responses: + "200": + $ref: "#/components/responses/SuccessResponse" + "400": + $ref: "#/components/responses/BadRequestError" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" + "429": + $ref: "#/components/responses/TooManyRequestsError" + "500": + $ref: "#/components/responses/InternalServerError" + x-speakeasy-name-override: upsert + x-speakeasy-group: indexing.customMetadata + delete: + summary: Remove custom metadata + description: Removes all custom metadata for the specified metadata group from a document. + tags: + - Custom Metadata + responses: + "200": + $ref: "#/components/responses/SuccessResponse" + "400": + $ref: "#/components/responses/BadRequestError" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" + "429": + $ref: "#/components/responses/TooManyRequestsError" + "500": + $ref: "#/components/responses/InternalServerError" + x-speakeasy-name-override: delete + x-speakeasy-group: indexing.customMetadata + /rest/api/index/custom-metadata/schema/{groupName}: + servers: + - url: https://{instance}-be.glean.com + variables: + instance: + default: instance-name + description: The instance name (typically the email domain without the TLD) that determines the deployment backend. + parameters: + - name: groupName + in: path + description: Name of the metadata group schema + required: true schema: type: string - format: binary - "400": - description: Missing person_id parameter. - "401": - description: Not Authorized. - "404": - description: | - Person not found, person has no photo, or photo is not hosted by Glean (follow photoUrl from /people or /listentities directly). - "429": - description: Too Many Requests. - security: - - APIToken: [] - /rest/api/v1/createshortcut: - post: - tags: - - Shortcuts - summary: Create shortcut - description: Create a user-generated shortcut that contains an alias and destination URL. - operationId: createshortcut - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateShortcutRequest" - description: CreateShortcut request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/CreateShortcutResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: create - x-speakeasy-group: client.shortcuts - /rest/api/v1/deleteshortcut: - post: - tags: - - Shortcuts - summary: Delete shortcut - description: Delete an existing user-generated shortcut. - operationId: deleteshortcut - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteShortcutRequest" - description: DeleteShortcut request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: delete - x-speakeasy-group: client.shortcuts - /rest/api/v1/getshortcut: - post: - tags: - - Shortcuts - summary: Read shortcut - description: Read a particular shortcut's details given its ID. - operationId: getshortcut - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GetShortcutRequest" - description: GetShortcut request - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GetShortcutResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.shortcuts - x-speakeasy-name-override: retrieve - /rest/api/v1/listshortcuts: - post: - tags: - - Shortcuts - summary: List shortcuts - description: List shortcuts editable/owned by the currently authenticated user. - operationId: listshortcuts - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ListShortcutsPaginatedRequest" - description: Filters, sorters, paging params required for pagination - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ListShortcutsPaginatedResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.shortcuts - x-speakeasy-name-override: list - /rest/api/v1/updateshortcut: - post: - tags: - - Shortcuts - summary: Update shortcut - description: Updates the shortcut with the given ID. - operationId: updateshortcut - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateShortcutRequest" - description: Shortcut content. Id need to be specified for the shortcut. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateShortcutResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-group: client.shortcuts - x-speakeasy-name-override: update - /rest/api/v1/summarize: - post: - tags: - - Summarize - summary: Summarize documents - description: Generate an AI summary of the requested documents. - operationId: summarize - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/SummarizeRequest" - description: Includes request params such as the query and specs of the documents to summarize. - required: true - x-exportParamName: Request - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/SummarizeResponse" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: summarize - x-speakeasy-group: client.documents - /rest/api/v1/addverificationreminder: - post: - tags: - - Verification - summary: Create verification - description: Creates a verification reminder for the document. Users can create verification reminders from different product surfaces. - operationId: addverificationreminder - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ReminderRequest" - description: Details about the reminder. - required: true - x-exportParamName: ReminderRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/Verification" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Document does not exist, does not support verification or user cannot access document - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: addReminder - x-speakeasy-group: client.verification - /rest/api/v1/listverifications: - post: - tags: - - Verification - summary: List verifications - description: Returns the information to be rendered in verification dashboard. Includes information for each document owned by user regarding their verifications. - operationId: listverifications - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - in: query - name: count - description: Maximum number of documents to return - required: false - schema: - type: integer - - $ref: "#/components/parameters/locale" - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/VerificationFeed" - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: list - x-speakeasy-group: client.verification - /rest/api/v1/verify: - post: - tags: - - Verification - summary: Update verification - description: Verify documents to keep the knowledge up to date within customer corpus. - operationId: verify - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: "#/components/parameters/locale" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/VerifyRequest" - description: Details about the verification request. - required: true - x-exportParamName: VerifyRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/Verification" - "400": - description: Invalid request - "401": - description: Not Authorized - "403": - description: Document does not exist, does not support verification or user cannot access document - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: verify - x-speakeasy-group: client.verification - /rest/api/v1/tools/list: - get: - tags: - - Tools - - Tools - summary: List available tools - description: Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. - x-visibility: Preview - parameters: - - in: query - name: toolNames - description: Optional array of tool names to filter by - required: false - schema: - type: array - items: - type: string - style: form - explode: false - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/ToolsListResponse" - "400": - description: Bad Request - "401": - description: Unauthorized - "404": - description: Not Found - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: list - x-speakeasy-group: client.tools - /rest/api/v1/tools/call: - post: - tags: - - Tools - - Tools - summary: Execute the specified tool - description: Execute the specified tool with provided parameters - x-visibility: Preview - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/ToolsCallRequest" - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/ToolsCallResponse" - "400": - description: Bad Request - "401": - description: Unauthorized - "404": - description: Not Found - "429": - description: Too Many Requests - security: - - APIToken: [] - x-speakeasy-name-override: run - x-speakeasy-group: client.tools - /rest/api/v1/actions/actionpack/{actionPackId}/auth: - parameters: - - in: path - name: actionPackId - required: true - description: ID of the action pack to query or authorize. - schema: - type: string - get: - tags: - - Tools - summary: Get end-user authentication status for an action pack. - description: | - Reports whether the calling user is already authenticated against the third-party - tool backing the specified action pack. Intended for headless / server-driven clients - that render an "Authorize" prompt when the user has not yet consented to the tool. - operationId: getActionPackAuthStatus - x-visibility: Preview - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/ActionPackAuthStatusResponse" - "400": - description: Bad Request - "401": - description: Unauthorized - "404": - description: Action pack not found - "429": - description: Too Many Requests - security: - - APIToken: [] - post: - tags: - - Tools - summary: Start the OAuth authorization flow for an action pack. - description: | - Starts the third-party OAuth flow for the specified action pack and returns the - redirect URL that the client should navigate the end user to. After the OAuth - callback completes, the user's browser is redirected back to `returnUrl` with a - status query parameter (`?glean_action_auth=success|error&actionPackId=...`). - - `returnUrl` must match the tenant's configured return URL allowlist; otherwise the - request is rejected with 400. - operationId: authorizeActionPack - x-visibility: Preview - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/AuthorizeActionPackRequest" - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/AuthorizeActionPackResponse" - "400": - description: Invalid request (e.g. returnUrl not in allowlist, unsupported auth type) - "401": - description: Unauthorized - "403": - description: User not entitled to the action pack - "404": - description: Action pack not found - "429": - description: Too Many Requests - security: - - APIToken: [] - /api/index/v1/indexdocument: - post: - summary: Index document - description: Adds a document to the index or updates an existing document. - tags: - - Documents - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IndexDocumentRequest' - required: true - x-exportParamName: IndexDocumentRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - "429": - description: Too Many Requests - x-speakeasy-name-override: addOrUpdate - x-speakeasy-group: indexing.documents - /api/index/v1/indexdocuments: - post: - summary: Index documents - description: Adds or updates multiple documents in the index. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-indexing/choosing-indexdocuments-vs-bulkindexdocuments) documentation for an explanation of when to use this endpoint. - tags: - - Documents - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IndexDocumentsRequest' - required: true - x-exportParamName: IndexDocumentsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - "429": - description: Too Many Requests - x-speakeasy-name-override: index - x-speakeasy-group: indexing.documents - /api/index/v1/bulkindexdocuments: - post: - summary: Bulk index documents - description: Replaces the documents in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. - tags: - - Documents - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BulkIndexDocumentsRequest' - required: true - x-exportParamName: BulkIndexDocumentsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: bulkIndex - x-speakeasy-group: indexing.documents - /api/index/v1/updatepermissions: - post: - summary: Update document permissions - description: Updates the permissions for a given document without modifying document content. - tags: - - Documents - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePermissionsRequest' - required: true - x-exportParamName: UpdatePermissionsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - "429": - description: Too Many Requests - x-speakeasy-name-override: updatePermissions - x-speakeasy-group: indexing.permissions - /api/index/v1/processalldocuments: - post: - summary: Schedules the processing of uploaded documents - description: | - Schedules the immediate processing of documents uploaded through the indexing API. By default the uploaded documents will be processed asynchronously but this API can be used to schedule processing of all documents on demand. - - If a `datasource` parameter is specified, processing is limited to that custom datasource. Without it, processing applies to all documents across all custom datasources. - #### Rate Limits - This endpoint is rate-limited to one usage every 3 hours. Exceeding this limit results in a 429 response code. Here's how the rate limit works: - 1. Calling `/processalldocuments` for datasource `foo` prevents another call for `foo` for 3 hours. - 2. Calling `/processalldocuments` for datasource `foo` doesn't affect immediate calls for `bar`. - 3. Calling `/processalldocuments` for all datasources prevents any datasource calls for 3 hours. - 4. Calling `/processalldocuments` for datasource `foo` doesn't affect immediate calls for all datasources. - - For more frequent document processing, contact Glean support. - tags: - - Documents - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProcessAllDocumentsRequest' - x-exportParamName: ProcessAllDocumentsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "429": - description: Too Many Requests - x-speakeasy-name-override: processAll - x-speakeasy-group: indexing.documents - /api/index/v1/deletedocument: - post: - summary: Delete document - description: Deletes the specified document from the index. Succeeds if document is not present. - tags: - - Documents - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteDocumentRequest' - required: true - x-exportParamName: DeleteDocumentRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: delete - x-speakeasy-group: indexing.documents - /api/index/v1/indexuser: - post: - summary: Index user - description: Adds a datasource user or updates an existing user. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IndexUserRequest' - required: true - x-exportParamName: IndexUserRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: indexUser - x-speakeasy-group: indexing.permissions - /api/index/v1/bulkindexusers: - post: - summary: Bulk index users - description: | - Replaces the users in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. - Note: Any users deleted from the existing set will have their associated memberships deleted as well. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BulkIndexUsersRequest' - required: true - x-exportParamName: BulkIndexUsersRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: bulkIndexUsers - x-speakeasy-group: indexing.permissions - /api/index/v1/indexgroup: - post: - summary: Index group - description: Add or update a group in the datasource. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IndexGroupRequest' - required: true - x-exportParamName: IndexGroupRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: indexGroup - x-speakeasy-group: indexing.permissions - /api/index/v1/bulkindexgroups: - post: - summary: Bulk index groups - description: | - Replaces the groups in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. - Note: Any groups deleted from the existing set will have their associated memberships deleted as well. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BulkIndexGroupsRequest' - required: true - x-exportParamName: BulkIndexGroupsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: bulkIndexGroups - x-speakeasy-group: indexing.permissions - /api/index/v1/indexmembership: - post: - summary: Index membership - description: Add the memberships of a group in the datasource. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IndexMembershipRequest' - required: true - x-exportParamName: IndexMembershipRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: indexMembership - x-speakeasy-group: indexing.permissions - /api/index/v1/bulkindexmemberships: - post: - summary: Bulk index memberships for a group - description: Replaces the memberships for a group in a datasource using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BulkIndexMembershipsRequest' - required: true - x-exportParamName: BulkIndexMembershipsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: bulkIndexMemberships - x-speakeasy-group: indexing.permissions - /api/index/v1/processallmemberships: - post: - summary: Schedules the processing of group memberships - description: | - Schedules the immediate processing of all group memberships uploaded through the indexing API. By default the uploaded group memberships will be processed asynchronously but this API can be used to schedule processing of all memberships on demand. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProcessAllMembershipsRequest' - x-exportParamName: ProcessAllMembershipsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - x-speakeasy-name-override: processMemberships - x-speakeasy-group: indexing.permissions - /api/index/v1/deleteuser: - post: - summary: Delete user - description: | - Delete the user from the datasource. Silently succeeds if user is not present. - Note: All memberships associated with the deleted user will also be deleted. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteUserRequest' - required: true - x-exportParamName: DeleteUserRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: deleteUser - x-speakeasy-group: indexing.permissions - /api/index/v1/deletegroup: - post: - summary: Delete group - description: | - Delete group from the datasource. Silently succeeds if group is not present. - Note: All memberships associated with the deleted group will also be deleted. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteGroupRequest' - required: true - x-exportParamName: DeleteGroupRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: deleteGroup - x-speakeasy-group: indexing.permissions - /api/index/v1/deletemembership: - post: - summary: Delete membership - description: Delete membership to a group in the specified datasource. Silently succeeds if membership is not present. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteMembershipRequest' - required: true - x-exportParamName: DeleteMembershipRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: deleteMembership - x-speakeasy-group: indexing.permissions - /api/index/v1/debug/{datasource}/status: - post: - summary: | - Beta: Get datasource status - description: | - Gather information about the datasource's overall status. Currently in beta, might undergo breaking changes without prior notice. - - Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. - tags: - - Troubleshooting - security: - - APIToken: [] - parameters: - - name: datasource - in: path - description: The datasource to get debug status for. - required: true - schema: - type: string - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugDatasourceStatusResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - x-beta: true - x-speakeasy-name-override: status - x-speakeasy-group: indexing.datasource - /api/index/v1/debug/{datasource}/document: - post: - summary: | - Beta: Get document information - description: | - Gives various information that would help in debugging related to a particular document. Currently in beta, might undergo breaking changes without prior notice. - - Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. - tags: - - Troubleshooting - security: - - APIToken: [] - parameters: - - name: datasource - in: path - description: The datasource to which the document belongs - required: true - schema: - type: string - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugDocumentRequest' - required: true - x-exportParamName: DebugDocumentRequest - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugDocumentResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - x-beta: true - x-speakeasy-group: indexing.documents - x-speakeasy-name-override: debug - /api/index/v1/debug/{datasource}/documents: - post: - summary: | - Beta: Get information of a batch of documents - description: | - Gives various information that would help in debugging related to a batch of documents. Currently in beta, might undergo breaking changes without prior notice. - - Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. - tags: - - Troubleshooting - security: - - APIToken: [] - parameters: - - name: datasource - in: path - description: The datasource to which the document belongs - required: true - schema: - type: string - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugDocumentsRequest' - required: true - x-exportParamName: DebugDocumentsRequest - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugDocumentsResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - x-beta: true - x-speakeasy-group: indexing.documents - x-speakeasy-name-override: debugMany - /api/index/v1/debug/{datasource}/user: - post: - summary: | - Beta: Get user information - description: | - Gives various information that would help in debugging related to a particular user. Currently in beta, might undergo breaking changes without prior notice. - - Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. - tags: - - Troubleshooting - security: - - APIToken: [] - parameters: - - name: datasource - in: path - description: The datasource to which the user belongs - required: true - schema: - type: string - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugUserRequest' - required: true - x-exportParamName: DebugUserRequest - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugUserResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - x-beta: true - x-speakeasy-name-override: debug - x-speakeasy-group: indexing.people - /api/index/v1/checkdocumentaccess: - post: - summary: Check document access - description: | - Check if a given user has access to access a document in a custom datasource - - Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. - tags: - - Troubleshooting - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CheckDocumentAccessRequest' - required: true - x-exportParamName: CheckDocumentAccessRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CheckDocumentAccessResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - "429": - description: Too Many Requests - x-speakeasy-group: indexing.documents - x-speakeasy-name-override: checkAccess - /api/index/v1/getdocumentstatus: - post: - summary: Get document upload and indexing status - description: | - Intended for debugging/validation. Fetches the current upload and indexing status of documents. - - Tip: Use [/debug/{datasource}/document](https://developers.glean.com/indexing/debugging/datasource-document) for richer information. - tags: - - Troubleshooting - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetDocumentStatusRequest' - required: true - x-exportParamName: GetDocumentStatusRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GetDocumentStatusResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - "429": - description: Too Many Requests - deprecated: true - x-glean-deprecated: - id: 7eec0433-78fd-49f9-a34f-cca83640ec24 - introduced: "2026-02-03" - message: Endpoint is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" - x-speakeasy-group: indexing.documents - x-speakeasy-name-override: status - /api/index/v1/getdocumentcount: - post: - summary: Get document count - description: | - Fetches document count for the specified custom datasource. - - Tip: Use [/debug/{datasource}/status](https://developers.glean.com/indexing/debugging/datasource-status) for richer information. - tags: - - Troubleshooting - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetDocumentCountRequest' - required: true - x-exportParamName: GetDocumentCountRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GetDocumentCountResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - deprecated: true - x-glean-deprecated: - id: c164089c-9412-4724-acf6-caf3b0d2a527 - introduced: "2026-02-03" - message: Endpoint is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" - x-speakeasy-group: indexing.documents - x-speakeasy-name-override: count - /api/index/v1/getusercount: - post: - summary: Get user count - description: | - Fetches user count for the specified custom datasource. - - Tip: Use [/debug/{datasource}/status](https://developers.glean.com/indexing/debugging/datasource-status) for richer information. - tags: - - Troubleshooting - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetUserCountRequest' - required: true - x-exportParamName: GetUserCountRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GetUserCountResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - deprecated: true - x-glean-deprecated: - id: 4f5df873-385e-4539-8183-cb764b0f06b9 - introduced: "2026-02-03" - message: Endpoint is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" - x-speakeasy-name-override: count - x-speakeasy-group: indexing.people - /api/index/v1/betausers: - post: - summary: Beta users - description: Allow the datasource be visible to the specified beta users. The default behaviour is datasource being visible to all users if it is enabled and not visible to any user if it is not enabled. - tags: - - Permissions - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GreenlistUsersRequest' - required: true - x-exportParamName: GreenlistUsersRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: authorizeBetaUsers - x-speakeasy-group: indexing.permissions - /api/index/v1/adddatasource: - post: - summary: Add or update datasource - description: Add or update a custom datasource and its schema. - tags: - - Datasources - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDatasourceConfig' - required: true - x-exportParamName: DatasourceConfig - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - x-speakeasy-name-override: add - x-speakeasy-group: indexing.datasources - /api/index/v1/getdatasourceconfig: - post: - summary: Get datasource config - description: Fetches the datasource config for the specified custom datasource. - tags: - - Datasources - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetDatasourceConfigRequest' - required: true - x-exportParamName: GetDatasourceConfigRequest - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDatasourceConfig' - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: retrieveConfig - x-speakeasy-group: indexing.datasources - /api/index/v1/rotatetoken: - post: - summary: Rotate token - description: Rotates the secret value inside the Indexing API token and returns the new raw secret. All other properties of the token are unchanged. In order to rotate the secret value, include the token as the bearer token in the `/rotatetoken` request. Please refer to [Token rotation](https://developers.glean.com/indexing/authentication/token-rotation) documentation for more information. - tags: - - Authentication - security: - - APIToken: [] - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/RotateTokenResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - x-speakeasy-name-override: rotateToken - x-speakeasy-group: indexing.authentication - /api/index/v1/indexemployee: - post: - summary: Index employee - description: Adds an employee or replaces the existing information about an employee. - tags: - - People - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/IndexEmployeeRequest' - required: true - x-exportParamName: IndexEmployeeRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: index - x-speakeasy-group: indexing.people - /api/index/v1/bulkindexemployees: - post: - summary: Bulk index employees - description: Replaces all the currently indexed employees using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. - tags: - - People - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/BulkIndexEmployeesRequest' - required: true - x-exportParamName: BulkIndexEmployeesRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - deprecated: true - x-glean-deprecated: - id: ce596f49-55c4-465e-bf3c-5a3a33906e1f - introduced: "2026-02-03" - message: Endpoint is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" - x-speakeasy-name-override: bulkIndex - x-speakeasy-group: indexing.people - /api/index/v1/indexemployeelist: {} - /api/index/v1/processallemployeesandteams: - post: - summary: Schedules the processing of uploaded employees and teams - description: | - Schedules the immediate processing of employees and teams uploaded through the indexing API. By default all uploaded people data will be processed asynchronously but this API can be used to schedule its processing on demand. - tags: - - People - security: - - APIToken: [] - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "429": - description: Too Many Requests - x-speakeasy-name-override: processAllEmployeesAndTeams - x-speakeasy-group: indexing.people - /api/index/v1/deleteemployee: - post: - summary: Delete employee - description: Delete an employee. Silently succeeds if employee is not present. - tags: - - People - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DeleteEmployeeRequest' - required: true - x-exportParamName: DeleteEmployeeRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: delete - x-speakeasy-group: indexing.people - /api/index/v1/indexteam: - post: - summary: Index team - description: Adds a team or updates information about a team - tags: - - People - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/IndexTeamRequest' - required: true - x-exportParamName: IndexTeamRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: indexTeam - x-speakeasy-group: indexing.people - /api/index/v1/deleteteam: - post: - summary: Delete team - description: Delete a team based on provided id. - tags: - - People - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DeleteTeamRequest' - required: true - x-exportParamName: DeleteTeamRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: deleteTeam - x-speakeasy-group: indexing.people - /api/index/v1/bulkindexteams: - post: - summary: Bulk index teams - description: Replaces all the currently indexed teams using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. - tags: - - People - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/BulkIndexTeamsRequest' - required: true - x-exportParamName: BulkIndexTeamsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: bulkIndexTeams - x-speakeasy-group: indexing.people - /api/index/v1/bulkindexshortcuts: - post: - summary: Bulk index external shortcuts - description: Replaces all the currently indexed shortcuts using paginated batch API calls. Note that this endpoint is used for indexing shortcuts not hosted by Glean. If you want to upload shortcuts that would be hosted by Glean, please use the `/uploadshortcuts` endpoint. For information on what you can do with Golinks, which are Glean-hosted shortcuts, please refer to [this](https://docs.glean.com/user-guide/knowledge/go-links/how-go-links-work) page. - tags: - - Shortcuts - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/BulkIndexShortcutsRequest' - required: true - x-exportParamName: BulkIndexShortcutsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: bulkIndex - x-speakeasy-group: indexing.shortcuts - /api/index/v1/uploadshortcuts: - post: - summary: Upload shortcuts - description: Creates glean shortcuts for uploaded shortcuts info. Glean would host the shortcuts, and they can be managed in the knowledge tab once uploaded. - tags: - - Shortcuts - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/UploadShortcutsRequest' - required: true - x-exportParamName: UploadShortcutsRequest - responses: - "200": - description: OK - "400": - description: Bad Request - "401": - description: Not Authorized - "409": - description: Conflict - x-speakeasy-name-override: upload - x-speakeasy-group: indexing.shortcuts - /api/index/v1/debug/{datasource}/document/events: - post: - summary: | - Beta: Get document lifecycle events - description: | - Retrieves lifecycle events for a specific document including upload time, index times and deletions. Rate limited to 1 request per minute per datasource. Currently in beta, might undergo breaking changes without prior notice. - tags: - - Troubleshooting - security: - - APIToken: [] - parameters: - - name: datasource - in: path - description: The datasource to which the document belongs - required: true - schema: - type: string - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugDocumentLifecycleRequest' - required: true - x-exportParamName: DebugDocumentLifecycleRequest - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DebugDocumentLifecycleResponse' - "400": - description: Bad Request - "401": - description: Not Authorized - "429": - description: Too Many Requests - x-beta: true - /rest/api/index/document/{docId}/custom-metadata/{groupName}: - put: - summary: Add or update custom metadata - description: Associates custom metadata with a specific document. Custom metadata enables you to enrich documents with additional structured information that can be used for search, filtering, and faceting. - tags: - - Custom Metadata - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CustomMetadataPutRequest' - required: true - x-exportParamName: CustomMetadataPutRequest - responses: - "200": - $ref: '#/components/responses/SuccessResponse' - "400": - $ref: '#/components/responses/BadRequestError' - "401": - $ref: '#/components/responses/UnauthorizedError' - "404": - $ref: '#/components/responses/NotFoundError' - "429": - $ref: '#/components/responses/TooManyRequestsError' - "500": - $ref: '#/components/responses/InternalServerError' - x-speakeasy-name-override: upsert - x-speakeasy-group: indexing.customMetadata - delete: - summary: Remove custom metadata - description: Removes all custom metadata for the specified metadata group from a document. - tags: - - Custom Metadata - security: - - APIToken: [] - responses: - "200": - $ref: '#/components/responses/SuccessResponse' - "400": - $ref: '#/components/responses/BadRequestError' - "401": - $ref: '#/components/responses/UnauthorizedError' - "404": - $ref: '#/components/responses/NotFoundError' - "429": - $ref: '#/components/responses/TooManyRequestsError' - "500": - $ref: '#/components/responses/InternalServerError' - x-speakeasy-name-override: delete - x-speakeasy-group: indexing.customMetadata - servers: - - url: https://{instance}-be.glean.com - variables: - instance: - default: instance-name - description: The instance name (typically the email domain without the TLD) that determines the deployment backend. - parameters: - - name: docId - in: path - description: Unique Glean identifier of the document - required: true - schema: - type: string - - name: groupName - in: path - description: Name of the metadata group as specified while adding schema - required: true - schema: - type: string - /rest/api/index/custom-metadata/schema/{groupName}: - get: - summary: Retrieve metadata schema - description: Retrieves the current schema definition for a metadata group. - tags: - - Custom Metadata - security: - - APIToken: [] - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CustomMetadataSchema' - "401": - $ref: '#/components/responses/UnauthorizedError' - "404": - $ref: '#/components/responses/NotFoundError' - "429": - $ref: '#/components/responses/TooManyRequestsError' - "500": - $ref: '#/components/responses/InternalServerError' - x-speakeasy-name-override: getSchema - x-speakeasy-group: indexing.customMetadata - put: - summary: Create or update metadata schema - description: Defines or updates the schema for a metadata group. Schemas should be defined before indexing metadata. - tags: - - Custom Metadata - security: - - APIToken: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CustomMetadataSchema' - required: true - x-exportParamName: CustomMetadataSchema - responses: - "200": - $ref: '#/components/responses/SuccessResponse' - "400": - $ref: '#/components/responses/BadRequestError' - "401": - $ref: '#/components/responses/UnauthorizedError' - "409": - description: Conflict - Schema already exists with incompatible changes - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorInfoResponse' - "429": - $ref: '#/components/responses/TooManyRequestsError' - "500": - $ref: '#/components/responses/InternalServerError' - x-speakeasy-name-override: upsertSchema - x-speakeasy-group: indexing.customMetadata - delete: - summary: Remove metadata schema - description: Deletes the schema definition for a metadata group. This does not delete existing metadata values on documents. - tags: - - Custom Metadata - security: - - APIToken: [] - responses: - "200": - $ref: '#/components/responses/SuccessResponse' - "400": - $ref: '#/components/responses/BadRequestError' - "401": - $ref: '#/components/responses/UnauthorizedError' - "404": - $ref: '#/components/responses/NotFoundError' - "429": - $ref: '#/components/responses/TooManyRequestsError' - "500": - $ref: '#/components/responses/InternalServerError' - x-speakeasy-name-override: deleteSchema - x-speakeasy-group: indexing.customMetadata - servers: - - url: https://{instance}-be.glean.com - variables: - instance: - default: instance-name - description: The instance name (typically the email domain without the TLD) that determines the deployment backend. - parameters: - - name: groupName - in: path - description: Name of the metadata group schema - required: true - schema: - type: string - /rest/api/v1/governance/data/policies/{id}: - get: - operationId: getpolicy - summary: Gets specified policy - description: Fetches the specified policy version, or the latest if no version is provided. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: id - in: path - description: The id of the policy to fetch. - required: true - schema: - type: string - - name: version - in: query - description: The version of the policy to fetch. Each time a policy is updated, the older version is still stored. If this is left empty, the latest policy is fetched. - required: false - schema: - type: integer - format: int64 - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GetDlpReportResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.data.policies - x-speakeasy-name-override: retrieve - post: - operationId: updatepolicy - summary: Updates an existing policy - description: Updates an existing policy. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: id - in: path - description: The id of the policy to fetch. - required: true - schema: - type: string - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/UpdateDlpReportRequest' - required: true - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/UpdateDlpReportResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-speakeasy-group: client.governance.data.policies - x-speakeasy-name-override: update - /rest/api/v1/governance/data/policies: - get: - operationId: listpolicies - summary: Lists policies - description: Lists policies with filtering. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: autoHide - in: query - description: Filter to return reports with a given value of auto-hide. - required: false - schema: - type: boolean - - name: frequency - in: query - description: Filter to return reports with a given frequency. - required: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ListDlpReportsResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.data.policies - x-speakeasy-name-override: list - post: - operationId: createpolicy - summary: Creates new policy - description: Creates a new policy with specified specifications and returns its id. - tags: - - Governance - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/CreateDlpReportRequest' - required: true - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/CreateDlpReportResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.data.policies - x-speakeasy-name-override: create - /rest/api/v1/governance/data/policies/{id}/download: - get: - operationId: downloadpolicycsv - summary: Downloads violations CSV for policy - description: Downloads CSV violations report for a specific policy id. This does not support continuous policies. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: id - in: path - description: The id of the policy to download violations for. - required: true - schema: - type: string - responses: - "200": - description: Downloads csv of batch policy violations. - content: - text/csv; charset=UTF-8: - schema: - type: string - description: CSV of all the violations found for this policy. - "400": - description: Bad request error (e.g., continuous policies are not supported). - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.data.policies - x-speakeasy-name-override: download - /rest/api/v1/governance/data/reports: - post: - operationId: createreport - summary: Creates new one-time report - description: Creates a new one-time report and executes its batch job. - tags: - - Governance - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/UpdateDlpConfigRequest' - required: true - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/UpdateDlpConfigResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.data.reports - x-speakeasy-name-override: create - /rest/api/v1/governance/data/reports/{id}/download: - get: - operationId: downloadreportcsv - summary: Downloads violations CSV for report - description: Downloads CSV violations report for a specific report id. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: id - in: path - description: The id of the report to download violations for. - required: true - schema: - type: string - responses: - "200": - description: Downloads csv of one-time report violations. - content: - text/csv; charset=UTF-8: - schema: - type: string - description: CSV of all the violations found for this report. - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.data.reports - x-speakeasy-name-override: download - /rest/api/v1/governance/data/reports/{id}/status: - get: - operationId: getreportstatus - summary: Fetches report run status - description: Fetches the status of the run corresponding to the report-id. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: id - in: path - description: The id of the report to get run status for. - required: true - schema: - type: string - responses: - "200": - description: Fetches status of report run. - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/ReportStatusResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.data.reports - x-speakeasy-name-override: status - /rest/api/v1/governance/documents/visibilityoverrides: - get: - operationId: getdocvisibility - summary: Fetches documents visibility - description: Fetches the visibility override status of the documents passed. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: docIds - in: query - description: List of doc-ids which will have their hide status fetched. - schema: - type: array - items: - type: string - responses: - "200": - description: The visibility status of documents - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/GetDocumentVisibilityOverridesResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.documents.visibilityoverrides - x-speakeasy-name-override: list - post: - operationId: setdocvisibility - summary: Hide or unhide docs - description: Sets the visibility-override state of the documents specified, effectively hiding or un-hiding documents. - tags: - - Governance - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/UpdateDocumentVisibilityOverridesRequest' - required: true - responses: - "200": - description: OK - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/UpdateDocumentVisibilityOverridesResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - x-speakeasy-group: client.governance.documents.visibilityoverrides - x-speakeasy-name-override: create - /rest/api/v1/governance/data/findings/exports: - post: - operationId: createfindingsexport - summary: Creates findings export - description: Creates a new DLP findings export job. - tags: - - Governance - security: - - APIToken: [] - requestBody: - content: - application/json; charset=UTF-8: - schema: - $ref: '#/components/schemas/DlpExportFindingsRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ExportInfo' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - get: - operationId: listfindingsexports - summary: Lists findings exports - description: Lists all DLP findings exports. - tags: - - Governance - security: - - APIToken: [] - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ListDlpFindingsExportsResponse' - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - /rest/api/v1/governance/data/findings/exports/{id}: - get: - operationId: downloadfindingsexport - summary: Downloads findings export - description: Downloads a DLP findings export as a CSV file. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: id - in: path - description: The ID of the export to download. - required: true - schema: - type: string - responses: - "200": - description: Downloads CSV of exported findings. - content: - text/csv; charset=UTF-8: - schema: - type: string - description: CSV of all the exported findings. - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - delete: - operationId: deletefindingsexport - summary: Deletes findings export - description: Deletes a DLP findings export. - tags: - - Governance - security: - - APIToken: [] - parameters: - - name: id - in: path - description: The ID of the export to delete. - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: OK - "403": - description: Permissions error - "500": - description: Internal error - x-visibility: Public - /rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}: - get: - operationId: getDatasourceInstanceConfiguration - summary: Get datasource instance configuration - description: | - Gets the greenlisted configuration values for a datasource instance. Returns only configuration keys that are exposed via the public API greenlist. - tags: - - Datasources - security: - - APIToken: [] - parameters: - - $ref: '#/components/parameters/datasourceId' - - $ref: '#/components/parameters/instanceId' - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DatasourceConfigurationResponse' - "400": - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "401": - description: Not authorized - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "404": - description: Datasource instance not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-visibility: Preview - patch: - operationId: updateDatasourceInstanceConfiguration - summary: Update datasource instance configuration - description: | - Updates the greenlisted configuration values for a datasource instance. Only configuration keys that are exposed via the public API greenlist may be set. Returns the full greenlisted configuration after the update is applied. - tags: - - Datasources - security: - - APIToken: [] - parameters: - - $ref: '#/components/parameters/datasourceId' - - $ref: '#/components/parameters/instanceId' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateDatasourceConfigurationRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DatasourceConfigurationResponse' - "400": - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "401": - description: Not authorized - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "404": - description: Datasource instance not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-visibility: Preview - /rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus: - get: - operationId: getDatasourceCredentialStatus - summary: Get datasource instance credential status - description: | - Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. - tags: - - Datasources - security: - - APIToken: [] - parameters: - - $ref: '#/components/parameters/datasourceInstanceId' - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DatasourceCredentialStatusResponse' - "400": - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "401": - description: Not authorized - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "404": - description: Datasource instance not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-visibility: Preview - /rest/api/v1/datasource/{datasourceInstanceId}/credentials: - post: - operationId: rotateDatasourceCredentials - summary: Rotate datasource instance credentials - description: | - 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. - 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}. - tags: - - Datasources - security: - - APIToken: [] - parameters: - - $ref: '#/components/parameters/datasourceInstanceId' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RotateDatasourceCredentialsRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DatasourceCredentialStatusResponse' - "400": - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "401": - description: Not authorized - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - "404": - description: Datasource instance not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - x-visibility: Preview - /rest/api/v1/chat#stream: - post: - tags: - - Chat - summary: Chat - description: Have a conversation with Glean AI. - operationId: chatStream - x-visibility: Public - x-codegen-request-body-name: payload - parameters: - - $ref: '#/components/parameters/timezoneOffset' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ChatRequest' - examples: - defaultExample: - value: - messages: - - author: USER - messageType: CONTENT - fragments: - - text: What are the company holidays this year? - gptAgentExample: - value: - agentConfig: - agent: GPT - messages: - - author: USER - messageType: CONTENT - fragments: - - text: Who was the first person to land on the moon? - description: Includes chat history for Glean AI to respond to. - required: true - x-exportParamName: Request - responses: - '200': - description: OK - content: - text/plain: - schema: - $ref: '#/components/schemas/ChatRequestStream' - examples: - defaultExample: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - hasMoreFragments: false - agentConfig: - agent: DEFAULT - mode: DEFAULT - fragments: - - text: There are no holidays! - streamingExample: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: null - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: null - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: - - text: e are - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: - - text: no hol - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: false - fragments: - - text: idays! - updateResponse: - value: - messages: - - author: GLEAN_AI - messageType: UPDATE - agentConfig: - agent: DEFAULT - mode: DEFAULT - fragments: - - text: '**Reading:**' - - structuredResults: - - document: - id: '123' - title: Company Handbook - citationResponse: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - citations: - - sourceDocument: - id: '123' - title: Company Handbook - referenceRanges: - - textRange: - startIndex: 0 - endIndex: 12 - type: CITATION - '400': - description: Invalid request - '401': - description: Not Authorized - '408': - description: Request Timeout - '429': - description: Too Many Requests - x-speakeasy-group: client.chat - x-speakeasy-name-override: createStream - x-speakeasy-usage-example: true + get: + summary: Retrieve metadata schema + description: Retrieves the current schema definition for a metadata group. + tags: + - Custom Metadata + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CustomMetadataSchema" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" + "429": + $ref: "#/components/responses/TooManyRequestsError" + "500": + $ref: "#/components/responses/InternalServerError" + x-speakeasy-name-override: getSchema + x-speakeasy-group: indexing.customMetadata + put: + summary: Create or update metadata schema + description: Defines or updates the schema for a metadata group. Schemas should be defined before indexing metadata. + tags: + - Custom Metadata + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CustomMetadataSchema" + required: true + x-exportParamName: CustomMetadataSchema + responses: + "200": + $ref: "#/components/responses/SuccessResponse" + "400": + $ref: "#/components/responses/BadRequestError" + "401": + $ref: "#/components/responses/UnauthorizedError" + "409": + description: Conflict - Schema already exists with incompatible changes + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfoResponse" + "429": + $ref: "#/components/responses/TooManyRequestsError" + "500": + $ref: "#/components/responses/InternalServerError" + x-speakeasy-name-override: upsertSchema + x-speakeasy-group: indexing.customMetadata + delete: + summary: Remove metadata schema + description: Deletes the schema definition for a metadata group. This does not delete existing metadata values on documents. + tags: + - Custom Metadata + responses: + "200": + $ref: "#/components/responses/SuccessResponse" + "400": + $ref: "#/components/responses/BadRequestError" + "401": + $ref: "#/components/responses/UnauthorizedError" + "404": + $ref: "#/components/responses/NotFoundError" + "429": + $ref: "#/components/responses/TooManyRequestsError" + "500": + $ref: "#/components/responses/InternalServerError" + x-speakeasy-name-override: deleteSchema + x-speakeasy-group: indexing.customMetadata + /rest/api/v1/governance/data/policies/{id}: + get: + description: Fetches the specified policy version, or the latest if no version is provided. + summary: Gets specified policy + operationId: getpolicy + x-visibility: Public + tags: + - Governance + parameters: + - name: id + in: path + description: The id of the policy to fetch. + required: true + schema: + type: string + - name: version + in: query + description: The version of the policy to fetch. Each time a policy is updated, the older version is still stored. If this is left empty, the latest policy is fetched. + required: false + schema: + type: integer + format: int64 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetDlpReportResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.policies + x-speakeasy-name-override: retrieve + post: + description: Updates an existing policy. + summary: Updates an existing policy + operationId: updatepolicy + tags: + - Governance + parameters: + - name: id + in: path + description: The id of the policy to fetch. + required: true + schema: + type: string + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/UpdateDlpReportRequest" + required: true + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/UpdateDlpReportResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.policies + x-speakeasy-name-override: update + /rest/api/v1/governance/data/policies: + get: + description: Lists policies with filtering. + summary: Lists policies + operationId: listpolicies + x-visibility: Public + tags: + - Governance + parameters: + - name: autoHide + in: query + description: Filter to return reports with a given value of auto-hide. + required: false + schema: + type: boolean + - name: frequency + in: query + description: Filter to return reports with a given frequency. + required: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListDlpReportsResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.policies + x-speakeasy-name-override: list + post: + description: Creates a new policy with specified specifications and returns its id. + summary: Creates new policy + operationId: createpolicy + x-visibility: Public + tags: + - Governance + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/CreateDlpReportRequest" + required: true + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/CreateDlpReportResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.policies + x-speakeasy-name-override: create + /rest/api/v1/governance/data/policies/{id}/download: + get: + description: Downloads CSV violations report for a specific policy id. This does not support continuous policies. + summary: Downloads violations CSV for policy + operationId: downloadpolicycsv + x-visibility: Public + tags: + - Governance + parameters: + - name: id + in: path + description: The id of the policy to download violations for. + required: true + schema: + type: string + responses: + "200": + description: Downloads csv of batch policy violations. + content: + text/csv; charset=UTF-8: + schema: + description: CSV of all the violations found for this policy. + type: string + "400": + description: Bad request error (e.g., continuous policies are not supported). + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.policies + x-speakeasy-name-override: download + /rest/api/v1/governance/data/reports: + post: + description: Creates a new one-time report and executes its batch job. + summary: Creates new one-time report + operationId: createreport + x-visibility: Public + tags: + - Governance + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/UpdateDlpConfigRequest" + required: true + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/UpdateDlpConfigResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.reports + x-speakeasy-name-override: create + /rest/api/v1/governance/data/reports/{id}/download: + get: + description: Downloads CSV violations report for a specific report id. + summary: Downloads violations CSV for report + operationId: downloadreportcsv + x-visibility: Public + tags: + - Governance + parameters: + - name: id + in: path + description: The id of the report to download violations for. + required: true + schema: + type: string + responses: + "200": + description: Downloads csv of one-time report violations. + content: + text/csv; charset=UTF-8: + schema: + description: CSV of all the violations found for this report. + type: string + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.reports + x-speakeasy-name-override: download + /rest/api/v1/governance/data/reports/{id}/status: + get: + description: Fetches the status of the run corresponding to the report-id. + summary: Fetches report run status + operationId: getreportstatus + x-visibility: Public + tags: + - Governance + parameters: + - name: id + in: path + description: The id of the report to get run status for. + required: true + schema: + type: string + responses: + "200": + description: Fetches status of report run. + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/ReportStatusResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.data.reports + x-speakeasy-name-override: status + /rest/api/v1/governance/documents/visibilityoverrides: + get: + description: Fetches the visibility override status of the documents passed. + summary: Fetches documents visibility + operationId: getdocvisibility + x-visibility: Public + tags: + - Governance + parameters: + - name: docIds + in: query + description: List of doc-ids which will have their hide status fetched. + schema: + type: array + items: + type: string + responses: + "200": + description: The visibility status of documents + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/GetDocumentVisibilityOverridesResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.documents.visibilityoverrides + x-speakeasy-name-override: list + post: + description: Sets the visibility-override state of the documents specified, effectively hiding or un-hiding documents. + summary: Hide or unhide docs + operationId: setdocvisibility + x-visibility: Public + tags: + - Governance + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/UpdateDocumentVisibilityOverridesRequest" + required: true + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/UpdateDocumentVisibilityOverridesResponse" + "403": + description: Permissions error + "500": + description: Internal error + x-speakeasy-group: client.governance.documents.visibilityoverrides + x-speakeasy-name-override: create + /rest/api/v1/governance/data/findings/exports: + post: + description: Creates a new DLP findings export job. + summary: Creates findings export + operationId: createfindingsexport + x-visibility: Public + tags: + - Governance + requestBody: + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/DlpExportFindingsRequest" + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ExportInfo" + "403": + description: Permissions error + "500": + description: Internal error + get: + description: Lists all DLP findings exports. + summary: Lists findings exports + operationId: listfindingsexports + x-visibility: Public + tags: + - Governance + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ListDlpFindingsExportsResponse" + "403": + description: Permissions error + "500": + description: Internal error + /rest/api/v1/governance/data/findings/exports/{id}: + get: + description: Downloads a DLP findings export as a CSV file. + summary: Downloads findings export + operationId: downloadfindingsexport + x-visibility: Public + tags: + - Governance + parameters: + - name: id + in: path + description: The ID of the export to download. + required: true + schema: + type: string + responses: + "200": + description: Downloads CSV of exported findings. + content: + text/csv; charset=UTF-8: + schema: + description: CSV of all the exported findings. + type: string + "403": + description: Permissions error + "500": + description: Internal error + delete: + description: Deletes a DLP findings export. + summary: Deletes findings export + operationId: deletefindingsexport + x-visibility: Public + tags: + - Governance + parameters: + - name: id + in: path + description: The ID of the export to delete. + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: OK + "403": + description: Permissions error + "500": + description: Internal error + /rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}: + get: + description: | + Gets the greenlisted configuration values for a datasource instance. Returns only configuration keys that are exposed via the public API greenlist. + summary: Get datasource instance configuration + operationId: getDatasourceInstanceConfiguration + x-visibility: Preview + tags: + - Datasources + parameters: + - $ref: "#/components/parameters/datasourceId" + - $ref: "#/components/parameters/instanceId" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/DatasourceConfigurationResponse" + "400": + description: Invalid request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + patch: + description: | + Updates the greenlisted configuration values for a datasource instance. Only configuration keys that are exposed via the public API greenlist may be set. Returns the full greenlisted configuration after the update is applied. + summary: Update datasource instance configuration + operationId: updateDatasourceInstanceConfiguration + x-visibility: Preview + tags: + - Datasources + parameters: + - $ref: "#/components/parameters/datasourceId" + - $ref: "#/components/parameters/instanceId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateDatasourceConfigurationRequest" + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/DatasourceConfigurationResponse" + "400": + description: Invalid request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + /rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus: + get: + description: | + Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. + summary: Get datasource instance credential status + operationId: getDatasourceCredentialStatus + x-visibility: Preview + tags: + - Datasources + parameters: + - $ref: "#/components/parameters/datasourceInstanceId" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/DatasourceCredentialStatusResponse" + "400": + description: Invalid request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + /rest/api/v1/datasource/{datasourceInstanceId}/credentials: + post: + description: | + 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. + 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}. + summary: Rotate datasource instance credentials + operationId: rotateDatasourceCredentials + x-visibility: Preview + tags: + - Datasources + parameters: + - $ref: "#/components/parameters/datasourceInstanceId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RotateDatasourceCredentialsRequest" + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/DatasourceCredentialStatusResponse" + "400": + description: Invalid request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + /rest/api/v1/chat#stream: + post: + tags: + - Chat + summary: Chat + description: Have a conversation with Glean AI. + operationId: chatStream + x-visibility: Public + x-codegen-request-body-name: payload + parameters: + - $ref: '#/components/parameters/timezoneOffset' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChatRequest' + examples: + defaultExample: + value: + messages: + - author: USER + messageType: CONTENT + fragments: + - text: What are the company holidays this year? + gptAgentExample: + value: + agentConfig: + agent: GPT + messages: + - author: USER + messageType: CONTENT + fragments: + - text: Who was the first person to land on the moon? + description: Includes chat history for Glean AI to respond to. + required: true + x-exportParamName: Request + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/ChatRequestStream' + examples: + defaultExample: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + hasMoreFragments: false + agentConfig: + agent: DEFAULT + mode: DEFAULT + fragments: + - text: There are no holidays! + streamingExample: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: null + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: null + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: + - text: e are + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: + - text: no hol + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: false + fragments: + - text: idays! + updateResponse: + value: + messages: + - author: GLEAN_AI + messageType: UPDATE + agentConfig: + agent: DEFAULT + mode: DEFAULT + fragments: + - text: '**Reading:**' + - structuredResults: + - document: + id: '123' + title: Company Handbook + citationResponse: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + citations: + - sourceDocument: + id: '123' + title: Company Handbook + referenceRanges: + - textRange: + startIndex: 0 + endIndex: 12 + type: CITATION + '400': + description: Invalid request + '401': + description: Not Authorized + '408': + description: Request Timeout + '429': + description: Too Many Requests + x-speakeasy-group: client.chat + x-speakeasy-name-override: createStream + x-speakeasy-usage-example: true components: - securitySchemes: - APIToken: - scheme: bearer - type: http - schemas: - ActivityEventParams: - properties: - bodyContent: - description: The HTML content of the page body. - type: string - datasourceInstance: - type: string - description: The full datasource instance name inferred from the URL of the event - datasource: - type: string - description: The datasource without the instance inferred from the URL of the event - instanceOnlyName: - type: string - description: The instance only name of the datasource instance, e.g. 1 for jira_1, inferred from the URL of the event - duration: - description: Length in seconds of the activity. For VIEWS, this represents the amount the page was visible in the foreground. - type: integer - query: - description: The user's search query associated with a SEARCH. - type: string - referrer: - description: The referring URL of the VIEW or SEARCH. - type: string - title: - description: The page title associated with the URL of the event - type: string - truncated: - description: Indicates that the parameters are incomplete and more parameters may be sent with the same action+timestamp+URL in the future. This is used for sending the duration when a `VIEW` is finished. - type: boolean - ActivityEvent: - required: - - action - - source - - timestamp - - url - properties: - id: - type: string - description: Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. - action: - type: string - description: The type of activity this represents. - x-enumDescriptions: - VIEW: Represents a visit to the given `url`. - EDIT: Represents an edit of the document represented by the `url`. - SEARCH: Represents a search performed at the given `url`. - COMMENT: Represents a comment on the document represented by the `url`. - CRAWL: Represents an explicit request to index the given `url` along with associated attributes in this payload. - HISTORICAL_SEARCH: Represents a search performed at the given `url` as indicated by the user's history. - HISTORICAL_VIEW: Represents a visit to the given `url` as indicated by the user's history. - enum: - - VIEW - - EDIT - - SEARCH - - COMMENT - - CRAWL - - HISTORICAL_SEARCH - - HISTORICAL_VIEW - x-speakeasy-enum-descriptions: - VIEW: Represents a visit to the given `url`. - EDIT: Represents an edit of the document represented by the `url`. - SEARCH: Represents a search performed at the given `url`. - COMMENT: Represents a comment on the document represented by the `url`. - CRAWL: Represents an explicit request to index the given `url` along with associated attributes in this payload. - HISTORICAL_SEARCH: Represents a search performed at the given `url` as indicated by the user's history. - HISTORICAL_VIEW: Represents a visit to the given `url` as indicated by the user's history. - params: - $ref: "#/components/schemas/ActivityEventParams" - timestamp: - type: string - description: The ISO 8601 timestamp when the activity began. - format: date-time - url: - description: The URL of the activity. - type: string - Activity: - required: - - events - properties: - events: - type: array - items: - $ref: "#/components/schemas/ActivityEvent" - example: - events: - - url: https://example.com/ - action: HISTORICAL_VIEW - timestamp: "2000-01-23T04:56:07.000Z" - - url: https://example.com/search?q=query - action: SEARCH - timestamp: "2000-01-23T04:56:07.000Z" - params: - query: query - - url: https://example.com/ - action: VIEW - timestamp: "2000-01-23T04:56:07.000Z" - params: - duration: 20 - referrer: https://example.com/document - SessionInfo: - properties: - sessionTrackingToken: - type: string - description: A unique token for this session. A new session (and token) is created when the user issues a request from a new tab or when our server hasn't seen activity for more than 10 minutes from a tab. - tabId: - type: string - description: A unique id for all requests a user makes from a given tab, no matter how far apart. A new tab id is only generated when a user issues a request from a new tab. - lastSeen: - type: string - format: date-time - description: The last time the server saw this token. - lastQuery: - type: string - description: The last query seen by the server. - User: - properties: - userID: - description: An opaque user ID for the claimed authority (i.e., the actas param, or the origid if actas is not specified). - type: string - origID: - description: An opaque user ID for the authenticated user (ignores actas). - type: string - FeedbackChatExchange: - properties: - timestamp: - type: integer - format: int64 - description: Unix timestamp in millis for the chat request. - agent: - type: string - description: Either DEFAULT (company knowledge) or GPT (world knowledge). - userQuery: - type: string - description: Initial query entered by the user. - searchQuery: - type: string - description: Search query performed by the agent. - resultDocuments: - type: array - description: List of documents read by the agent. - items: - properties: - title: - type: string - url: - type: string - response: - type: string - ManualFeedbackInfo: - properties: - email: - type: string - description: The email address of the user who submitted the Feedback.event.MANUAL_FEEDBACK event. - deprecated: true - source: - type: string - description: The source associated with the Feedback.event.MANUAL_FEEDBACK event. - enum: - - AUTOCOMPLETE - - CALENDAR - - CHAT - - CHAT_GENERAL - - CONCEPT_CARD - - DESKTOP_APP - - DISAMBIGUATION_CARD - - EXPERT_DETECTION - - FEED - - GENERATED_Q_AND_A - - INLINE_MENU - - NATIVE_RESULT - - PRISM - - Q_AND_A - - RELATED_QUESTIONS - - REPORT_ISSUE - - SCIOBOT - - SEARCH - - SIDEBAR - - SUMMARY - - TASKS - - TASK_EXECUTION - issue: - type: string - description: The issue the user indicated in the feedback. - deprecated: true - issues: - type: array - description: The issue(s) the user indicated in the feedback. - items: + securitySchemes: + APIToken: + scheme: bearer + type: http + description: >- + HTTP bearer token. Accepts a Glean-issued API token, an OAuth access token from the Glean OAuth Authorization Server (including Dynamic Client Registration clients), or an OAuth access token issued by an external identity provider. External-IdP OAuth tokens must also include the `X-Glean-Auth-Type: OAUTH` request header. OAuth is supported on the Client API only; the Indexing API requires a Glean-issued token. + schemas: + ActivityEventParams: + properties: + bodyContent: + description: The HTML content of the page body. + type: string + datasourceInstance: + type: string + description: The full datasource instance name inferred from the URL of the event + datasource: + type: string + description: The datasource without the instance inferred from the URL of the event + instanceOnlyName: + type: string + description: The instance only name of the datasource instance, e.g. 1 for jira_1, inferred from the URL of the event + duration: + description: Length in seconds of the activity. For VIEWS, this represents the amount the page was visible in the foreground. + type: integer + query: + description: The user's search query associated with a SEARCH. + type: string + referrer: + description: The referring URL of the VIEW or SEARCH. + type: string + title: + description: The page title associated with the URL of the event + type: string + truncated: + description: Indicates that the parameters are incomplete and more parameters may be sent with the same action+timestamp+URL in the future. This is used for sending the duration when a `VIEW` is finished. + type: boolean + ActivityEvent: + required: + - action + - source + - timestamp + - url + properties: + id: + type: string + description: Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. + action: + type: string + description: The type of activity this represents. + x-enumDescriptions: + VIEW: Represents a visit to the given `url`. + EDIT: Represents an edit of the document represented by the `url`. + SEARCH: Represents a search performed at the given `url`. + COMMENT: Represents a comment on the document represented by the `url`. + CRAWL: Represents an explicit request to index the given `url` along with associated attributes in this payload. + HISTORICAL_SEARCH: Represents a search performed at the given `url` as indicated by the user's history. + HISTORICAL_VIEW: Represents a visit to the given `url` as indicated by the user's history. + x-speakeasy-enum-descriptions: + VIEW: Represents a visit to the given `url`. + EDIT: Represents an edit of the document represented by the `url`. + SEARCH: Represents a search performed at the given `url`. + COMMENT: Represents a comment on the document represented by the `url`. + CRAWL: Represents an explicit request to index the given `url` along with associated attributes in this payload. + HISTORICAL_SEARCH: Represents a search performed at the given `url` as indicated by the user's history. + HISTORICAL_VIEW: Represents a visit to the given `url` as indicated by the user's history. + enum: + - VIEW + - EDIT + - SEARCH + - COMMENT + - CRAWL + - HISTORICAL_SEARCH + - HISTORICAL_VIEW + params: + $ref: "#/components/schemas/ActivityEventParams" + timestamp: + type: string + description: The ISO 8601 timestamp when the activity began. + format: date-time + url: + description: The URL of the activity. + type: string + Activity: + required: + - events + properties: + events: + type: array + items: + $ref: "#/components/schemas/ActivityEvent" + example: + events: + - url: https://example.com/ + action: HISTORICAL_VIEW + timestamp: "2000-01-23T04:56:07.000Z" + - url: https://example.com/search?q=query + action: SEARCH + timestamp: "2000-01-23T04:56:07.000Z" + params: + query: query + - url: https://example.com/ + action: VIEW + timestamp: "2000-01-23T04:56:07.000Z" + params: + duration: 20 + referrer: https://example.com/document + SessionInfo: + properties: + sessionTrackingToken: + type: string + description: A unique token for this session. A new session (and token) is created when the user issues a request from a new tab or when our server hasn't seen activity for more than 10 minutes from a tab. + tabId: + type: string + description: A unique id for all requests a user makes from a given tab, no matter how far apart. A new tab id is only generated when a user issues a request from a new tab. + lastSeen: + type: string + format: date-time + description: The last time the server saw this token. + lastQuery: + type: string + description: The last query seen by the server. + User: + properties: + userID: + description: An opaque user ID for the claimed authority (i.e., the actas param, or the origid if actas is not specified). + type: string + origID: + description: An opaque user ID for the authenticated user (ignores actas). + type: string + FeedbackChatExchange: + properties: + timestamp: + type: integer + format: int64 + description: Unix timestamp in millis for the chat request. + agent: + type: string + description: Either DEFAULT (company knowledge) or GPT (world knowledge). + userQuery: + type: string + description: Initial query entered by the user. + searchQuery: + type: string + description: Search query performed by the agent. + resultDocuments: + type: array + description: List of documents read by the agent. + items: + properties: + title: + type: string + url: + type: string + response: + type: string + ManualFeedbackInfo: + properties: + email: + type: string + description: The email address of the user who submitted the Feedback.event.MANUAL_FEEDBACK event. + deprecated: true + source: + type: string + description: The source associated with the Feedback.event.MANUAL_FEEDBACK event. + enum: + - AUTOCOMPLETE + - CALENDAR + - CHAT + - CHAT_GENERAL + - CONCEPT_CARD + - DESKTOP_APP + - DISAMBIGUATION_CARD + - EXPERT_DETECTION + - FEED + - GENERATED_Q_AND_A + - INLINE_MENU + - NATIVE_RESULT + - PRISM + - Q_AND_A + - RELATED_QUESTIONS + - REPORT_ISSUE + - SCIOBOT + - SEARCH + - SIDEBAR + - SUMMARY + - TASKS + - TASK_EXECUTION + issue: + type: string + description: The issue the user indicated in the feedback. + deprecated: true + issues: + type: array + description: The issue(s) the user indicated in the feedback. + items: + type: string + enum: + - AGENT_CANVAS_FAILED + - AGENT_CLARIFYING_QUESTIONS + - AGENT_INTERMEDIATE_STEPS_FAILED + - AGENT_TOOL_CALL_FAILED + - INACCURATE_RESPONSE + - INCOMPLETE_OR_NO_ANSWER + - INCORRECT_CITATION + - MISSING_CITATION + - OTHER + - OUTDATED_RESPONSE + - RESULT_MISSING + - RESULT_SHOULD_NOT_APPEAR + - RESULTS_HELPFUL + - RESULTS_POOR_ORDER + - TOO_MUCH_ONE_KIND + imageUrls: + type: array + items: + type: string + description: URLs of images uploaded by user when providing feedback + query: + type: string + description: The query associated with the Feedback.event.MANUAL_FEEDBACK event. + obscuredQuery: + type: string + description: The query associated with the Feedback.event.MANUAL_FEEDBACK event, but obscured such that the vowels are replaced with special characters. For search feedback events only. + activeTab: + type: string + description: Which tabs the user had chosen at the time of the Feedback.event.MANUAL_FEEDBACK event. For search feedback events only. + comments: + type: string + description: The comments users can optionally add to the Feedback.event.MANUAL_FEEDBACK events. + searchResults: + type: array + items: + type: string + description: The array of search result Glean Document IDs, ordered by top to bottom result. + previousMessages: + type: array + items: + type: string + description: The array of previous messages in a chat session, ordered by oldest to newest. + chatTranscript: + type: array + items: + $ref: "#/components/schemas/FeedbackChatExchange" + description: Array of previous request/response exchanges, ordered by oldest to newest. + numQueriesFromFirstRun: + type: integer + description: How many times this query has been run in the past. + vote: + type: string + description: The vote associated with the Feedback.event.MANUAL_FEEDBACK event. + enum: + - UPVOTE + - DOWNVOTE + rating: + type: integer + description: A rating associated with the user feedback. The value will be between one and the maximum given by ratingScale, inclusive. + ratingKey: + type: string + description: A description of the rating that contextualizes how it appeared to the user, e.g. "satisfied". + ratingScale: + type: integer + description: The scale of comparison for a rating associated with the feedback. Rating values start from one and go up to the maximum specified by ratingScale. For example, a five-option satisfaction rating will have a ratingScale of 5 and a thumbs-up/thumbs-down rating will have a ratingScale of 2. + SideBySideImplementation: + properties: + implementationId: + type: string + description: Unique identifier for this implementation variant. + implementationName: + type: string + description: Human-readable name for this implementation (e.g., "Variant A", "GPT-4", "Claude"). + searchParams: + type: object + description: The search/chat parameters used for this implementation. + additionalProperties: + type: string + response: + type: string + description: The full response generated by this implementation. + responseMetadata: + type: object + description: Metadata about the response (e.g., latency, token count). + properties: + latencyMs: + type: integer + description: Time taken to generate the response in milliseconds. + tokenCount: + type: integer + description: Number of tokens in the response. + modelUsed: + type: string + description: The specific model version used. + ManualFeedbackSideBySideInfo: + properties: + email: + type: string + description: The email address of the user who submitted the side-by-side feedback. + source: + type: string + description: The source associated with the side-by-side feedback event. + enum: + - LIVE_EVAL + - CHAT + - SEARCH + query: + type: string + description: The query or prompt that was evaluated across multiple implementations. + implementations: + type: array + description: Array of implementations that were compared side-by-side. + items: + $ref: "#/components/schemas/SideBySideImplementation" + evaluationSessionId: + type: string + description: Unique identifier for this evaluation session to group related feedback events. + implementationId: + type: string + description: The ID of the implementation this specific feedback event is for. + vote: + type: string + description: The vote for this specific implementation. + enum: + - UPVOTE + - DOWNVOTE + - NEUTRAL + comments: + type: string + description: Specific feedback comments for this implementation. + SeenFeedbackInfo: + properties: + isExplicit: + type: boolean + description: The confidence of the user seeing the object is high because they explicitly interacted with it e.g. answer impression in SERP with additional user interaction. + UserViewInfo: + properties: + docId: + type: string + description: Unique Glean Document ID of the associated document. + docTitle: + type: string + description: Title of associated document. + docUrl: + type: string + description: URL of associated document. + WorkflowFeedbackInfo: + properties: + source: + type: string + enum: + - ZERO_STATE + - LIBRARY + - HOMEPAGE + description: Where the feedback of the workflow originated from + Feedback: + required: + - event + - trackingTokens + properties: + id: + type: string + description: Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. + category: + type: string + description: The feature category to which the feedback applies. These should be broad product areas such as Announcements, Answers, Search, etc. rather than specific components or UI treatments within those areas. + enum: + - ANNOUNCEMENT + - ANSWERS + - ARTIFACTS + - AUTOCOMPLETE + - COLLECTIONS + - FEED + - SEARCH + - CHAT + - NTP + - WORKFLOWS + - SUMMARY + - GENERAL + - PRISM + - PROMPTS + trackingTokens: + type: array + description: A list of server-generated trackingTokens to which this event applies. + items: + type: string + event: + type: string + description: The action the user took within a Glean client with respect to the object referred to by the given `trackingToken`. + x-enumDescriptions: + CLICK: The object's primary link was clicked with the intent to view its full representation. Depending on the object type, this may imply an external navigation or navigating to a new page or view within the Glean app. + CONTAINER_CLICK: A link to the object's parent container (e.g. the folder in which it's located) was clicked. + COPY_LINK: The user copied a link to the primary link. + CREATE: The user creates a document. + DISMISS: The user dismissed the object such that it was hidden from view. + DOWNVOTE: The user gave feedback that the object was not useful. + EMAIL: The user attempted to send an email. + EXECUTE: The user executed the object (e.g. ran a workflow). + FILTER: The user applied a filter. + FIRST_TOKEN: The first token of a streaming response is received. + FOCUS_IN: The user clicked into an interactive element, e.g. the search box. + LAST_TOKEN: The final token of a streaming response is received. + MANUAL_FEEDBACK: The user submitted textual manual feedback regarding the object. + MANUAL_FEEDBACK_SIDE_BY_SIDE: The user submitted comparative feedback for multiple side-by-side implementations. + FEEDBACK_TIME_SAVED: The user submitted feedback about time saved by an agent or workflow. + MARK_AS_READ: The user explicitly marked the content as read. + MESSAGE: The user attempted to send a message using their default messaing app. + MIDDLE_CLICK: The user middle clicked the object's primary link with the intent to open its full representation in a new tab. + PAGE_BLUR: The user puts a page out of focus but keeps it in the background. + PAGE_FOCUS: The user puts a page in focus, meaning it is the first to receive keyboard events. + PAGE_LEAVE: The user leaves a page and it is unloaded (by clicking a link, closing the tab/window, etc). + PREVIEW: The user clicked the object's inline preview affordance. + RIGHT_CLICK: The user right clicked the object's primary link. This may indicate an intent to open it in a new tab or copy it. + SECTION_CLICK: The user clicked a link to a subsection of the primary object. + SEEN: The user has likely seen the object (e.g. took action to make the object visible within the user's viewport). + SELECT: The user explicitly selected something, eg. a chat response variant they prefer. + SHARE: The user shared the object with another user. + SHOW_MORE: The user clicked the object's show more affordance. + UPVOTE: The user gave feedback that the object was useful. + VIEW: The object was visible within the user's viewport. + VISIBLE: The object was visible within the user's viewport. + x-speakeasy-enum-descriptions: + CLICK: The object's primary link was clicked with the intent to view its full representation. Depending on the object type, this may imply an external navigation or navigating to a new page or view within the Glean app. + CONTAINER_CLICK: A link to the object's parent container (e.g. the folder in which it's located) was clicked. + COPY_LINK: The user copied a link to the primary link. + CREATE: The user creates a document. + DISMISS: The user dismissed the object such that it was hidden from view. + DOWNVOTE: The user gave feedback that the object was not useful. + EMAIL: The user attempted to send an email. + EXECUTE: The user executed the object (e.g. ran a workflow). + FILTER: The user applied a filter. + FIRST_TOKEN: The first token of a streaming response is received. + FOCUS_IN: The user clicked into an interactive element, e.g. the search box. + LAST_TOKEN: The final token of a streaming response is received. + MANUAL_FEEDBACK: The user submitted textual manual feedback regarding the object. + MANUAL_FEEDBACK_SIDE_BY_SIDE: The user submitted comparative feedback for multiple side-by-side implementations. + FEEDBACK_TIME_SAVED: The user submitted feedback about time saved by an agent or workflow. + MARK_AS_READ: The user explicitly marked the content as read. + MESSAGE: The user attempted to send a message using their default messaing app. + MIDDLE_CLICK: The user middle clicked the object's primary link with the intent to open its full representation in a new tab. + PAGE_BLUR: The user puts a page out of focus but keeps it in the background. + PAGE_FOCUS: The user puts a page in focus, meaning it is the first to receive keyboard events. + PAGE_LEAVE: The user leaves a page and it is unloaded (by clicking a link, closing the tab/window, etc). + PREVIEW: The user clicked the object's inline preview affordance. + RIGHT_CLICK: The user right clicked the object's primary link. This may indicate an intent to open it in a new tab or copy it. + SECTION_CLICK: The user clicked a link to a subsection of the primary object. + SEEN: The user has likely seen the object (e.g. took action to make the object visible within the user's viewport). + SELECT: The user explicitly selected something, eg. a chat response variant they prefer. + SHARE: The user shared the object with another user. + SHOW_MORE: The user clicked the object's show more affordance. + UPVOTE: The user gave feedback that the object was useful. + VIEW: The object was visible within the user's viewport. + VISIBLE: The object was visible within the user's viewport. + enum: + - CLICK + - CONTAINER_CLICK + - COPY_LINK + - CREATE + - DISMISS + - DOWNVOTE + - EMAIL + - EXECUTE + - FILTER + - FIRST_TOKEN + - FOCUS_IN + - LAST_TOKEN + - MANUAL_FEEDBACK + - MANUAL_FEEDBACK_SIDE_BY_SIDE + - FEEDBACK_TIME_SAVED + - MARK_AS_READ + - MESSAGE + - MIDDLE_CLICK + - PAGE_BLUR + - PAGE_FOCUS + - PAGE_LEAVE + - PREVIEW + - RELATED_CLICK + - RIGHT_CLICK + - SECTION_CLICK + - SEEN + - SELECT + - SHARE + - SHOW_MORE + - UPVOTE + - VIEW + - VISIBLE + position: + type: integer + description: Position of the element in the case that the client controls order (such as feed and autocomplete). + payload: + type: string + description: For type MANUAL_FEEDBACK, contains string of user feedback. For autocomplete, partial query string. For feed, string of user feedback in addition to manual feedback signals extracted from all suggested content. + sessionInfo: + $ref: "#/components/schemas/SessionInfo" + timestamp: + type: string + description: The ISO 8601 timestamp when the event occured. + format: date-time + user: + $ref: "#/components/schemas/User" + pathname: + type: string + description: The path the client was at when the feedback event triggered. + channels: + type: array + description: Where the feedback will be sent, e.g. to Glean, the user's company, or both. If no channels are specified, feedback will go only to Glean. + items: + type: string + enum: + - COMPANY + - GLEAN + url: + type: string + description: The URL the client was at when the feedback event triggered. + uiTree: + description: The UI element tree associated with the event, if any. + items: + type: string + type: array + uiElement: + type: string + description: The UI element associated with the event, if any. + manualFeedbackInfo: + $ref: "#/components/schemas/ManualFeedbackInfo" + manualFeedbackSideBySideInfo: + $ref: "#/components/schemas/ManualFeedbackSideBySideInfo" + seenFeedbackInfo: + $ref: "#/components/schemas/SeenFeedbackInfo" + userViewInfo: + $ref: "#/components/schemas/UserViewInfo" + workflowFeedbackInfo: + $ref: "#/components/schemas/WorkflowFeedbackInfo" + applicationId: + type: string + description: The application ID of the client that sent the feedback event. + agentId: + type: string + description: The agent ID of the client that sent the feedback event. + example: + trackingTokens: + - trackingTokens + event: VIEW + StructuredTextMutableProperties: + required: + - text + properties: + text: + type: string + example: From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light. + ConnectorType: type: string + description: The source from which document content was pulled, e.g. an API crawl or browser history enum: - - AGENT_CANVAS_FAILED - - AGENT_CLARIFYING_QUESTIONS - - AGENT_INTERMEDIATE_STEPS_FAILED - - AGENT_TOOL_CALL_FAILED - - INACCURATE_RESPONSE - - INCOMPLETE_OR_NO_ANSWER - - INCORRECT_CITATION - - MISSING_CITATION - - OTHER - - OUTDATED_RESPONSE - - RESULT_MISSING - - RESULT_SHOULD_NOT_APPEAR - - RESULTS_HELPFUL - - RESULTS_POOR_ORDER - - TOO_MUCH_ONE_KIND - imageUrls: - type: array - items: + - API_CRAWL + - BROWSER_CRAWL + - BROWSER_HISTORY + - BUILTIN + - FEDERATED_SEARCH + - PUSH_API + - WEB_CRAWL + - NATIVE_HISTORY + DocumentContent: + properties: + fullTextList: + type: array + items: + type: string + description: The plaintext content of the document. + Document: + properties: + id: + type: string + description: The Glean Document ID. + datasource: + type: string + description: The app or other repository type from which the document was extracted + connectorType: + $ref: "#/components/schemas/ConnectorType" + docType: + type: string + description: The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). + content: + $ref: "#/components/schemas/DocumentContent" + containerDocument: + $ref: "#/components/schemas/Document" + parentDocument: + $ref: "#/components/schemas/Document" + title: + type: string + description: The title of the document. + url: + type: string + description: A permalink for the document. + metadata: + $ref: "#/components/schemas/DocumentMetadata" + sections: + type: array + description: A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page. + items: + $ref: "#/components/schemas/DocumentSection" + SearchProviderInfo: + properties: + name: + type: string + description: Name of the search provider. + logoUrl: + type: string + description: URL to the provider's logo. + searchLinkUrlTemplate: + type: string + description: URL template that can be used to perform the suggested search by replacing the {query} placeholder with the query suggestion. + example: + name: Google + logo: https://app.glean.com/images/feather/globe.svg + searchLinkUrlTemplate: https://www.google.com/search?q={query}&hl=en + ResultTab: + properties: + id: + type: string + description: The unique ID of the tab. Can be passed in a search request to get results for that tab. + count: + type: integer + description: The number of results in this tab for the current query. + datasource: + type: string + description: The datasource associated with the tab, if any. + datasourceInstance: + type: string + description: The datasource instance associated with the tab, if any. + FacetFilterValue: + properties: + value: + type: string + example: Spreadsheet + relationType: + type: string + enum: + - EQUALS + - ID_EQUALS + - LT + - GT + - NOT_EQUALS + x-enumDescriptions: + EQUALS: The value is equal to the specified value. + ID_EQUALS: The value is equal to the specified ID. + LT: The value is less than the specified value. + GT: The value is greater than the specified value. + NOT_EQUALS: The value is not equal to the specified value. + x-speakeasy-enum-descriptions: + EQUALS: The value is equal to the specified value. + ID_EQUALS: The value is equal to the specified ID. + LT: The value is less than the specified value. + GT: The value is greater than the specified value. + NOT_EQUALS: The value is not equal to the specified value. + example: EQUALS + isNegated: + type: boolean + deprecated: true + description: DEPRECATED - please use relationType instead + x-glean-deprecated: + id: 75a48c79-b36a-4171-a0a0-4af7189da66e + introduced: "2026-02-05" + message: Use relationType instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use relationType instead" + FacetFilter: + properties: + fieldName: + type: string + example: owner + values: + type: array + items: + $ref: "#/components/schemas/FacetFilterValue" + description: Within a single FacetFilter, the values are to be treated like an OR. For example, fieldName type with values [EQUALS Presentation, EQUALS Spreadsheet] means we want to show a document if it's a Presentation OR a Spreadsheet. + groupName: + type: string + example: Spreadsheet + description: Indicates the value of a facet, if any, that the given facet is grouped under. This is only used for nested facets, for example, fieldName could be owner and groupName would be Spreadsheet if showing all owners for spreadsheets as a nested facet. + example: + fieldName: type + values: + - value: Spreadsheet + relationType: EQUALS + - value: Presentation + relationType: EQUALS + FacetFilterSet: + properties: + filters: + type: array + items: + $ref: "#/components/schemas/FacetFilter" + description: Within a single FacetFilterSet, the filters are treated as AND. For example, owner Sumeet and type Spreadsheet shows documents that are by Sumeet AND are Spreadsheets. + FacetBucketFilter: + properties: + facet: + type: string + description: The facet whose buckets should be filtered. + prefix: + type: string + description: The per-term prefix that facet buckets should be filtered on. + AuthToken: + required: + - accessToken + - datasource + properties: + accessToken: + type: string + datasource: + type: string + scope: + type: string + tokenType: + type: string + authUser: + description: Used by Google to indicate the index of the logged in user. Useful for generating hyperlinks that support multilogin. + type: string + expiration: + description: Unix timestamp when this token expires (in seconds since epoch UTC). + type: integer + format: int64 + example: + accessToken: 123abc + datasource: gmail + scope: email profile https://www.googleapis.com/auth/gmail.readonly + tokenType: Bearer + authUser: "1" + DocumentSpec: + x-multiple-discriminators: true + oneOf: + - type: object + required: + - url + properties: + url: + type: string + x-discriminator: true + description: The URL of the document. + - type: object + required: + - id + properties: + id: + type: string + x-discriminator: true + description: The ID of the document. + - type: object + required: + - contentId + - ugcType + properties: + ugcType: + type: string + enum: + - ANNOUNCEMENTS + - ANSWERS + - COLLECTIONS + - SHORTCUTS + - CHATS + description: The type of the user generated content (UGC datasource). + contentId: + type: integer + x-discriminator: true + description: The numeric id for user generated content. Used for ANNOUNCEMENTS, ANSWERS, COLLECTIONS, SHORTCUTS. + docType: + type: string + description: The specific type of the user generated content type. + - type: object + required: + - ugcType + - ugcId + properties: + ugcType: + type: string + enum: + - ANNOUNCEMENTS + - ANSWERS + - ARTIFACTS + - COLLECTIONS + - SHORTCUTS + - CHATS + description: The type of the user generated content (UGC datasource). + ugcId: + type: string + x-discriminator: true + description: The string id for user generated content. Used for CHATS. + docType: + type: string + description: The specific type of the user generated content type. + RestrictionFilters: + properties: + containerSpecs: + description: "Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections." + type: array + items: + $ref: "#/components/schemas/DocumentSpec" + SearchRequestOptions: + required: + - facetBucketSize + properties: + datasourceFilter: + type: string + description: Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. + datasourcesFilter: + type: array + items: + type: string + description: Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. + queryOverridesFacetFilters: + type: boolean + description: If true, the operators in the query are taken to override any operators in facetFilters in the case of conflict. This is used to correctly set rewrittenFacetFilters and rewrittenQuery. + facetFilters: + type: array + items: + $ref: "#/components/schemas/FacetFilter" + description: A list of filters for the query. An AND is assumed between different facetFilters. For example, owner Sumeet and type Spreadsheet shows documents that are by Sumeet AND are Spreadsheets. + facetFilterSets: + type: array + items: + $ref: "#/components/schemas/FacetFilterSet" + description: A list of facet filter sets that will be OR'ed together. SearchRequestOptions where both facetFilterSets and facetFilters set are considered as bad request. Callers should set only one of these fields. + facetBucketFilter: + $ref: "#/components/schemas/FacetBucketFilter" + facetBucketSize: + type: integer + description: The maximum number of FacetBuckets to return in each FacetResult. + defaultFacets: + type: array + items: + type: string + description: Facets for which FacetResults should be fetched and that don't apply to a particular datasource. If specified, these values will replace the standard default facets (last_updated_at, from, etc.). The requested facets will be returned alongside datasource-specific facets if searching a single datasource. + authTokens: + type: array + description: Auth tokens which may be used for non-indexed, federated results (e.g. Gmail). + items: + $ref: "#/components/schemas/AuthToken" + fetchAllDatasourceCounts: + type: boolean + description: Hints that the QE should return result counts (via the datasource facet result) for all supported datasources, rather than just those specified in the datasource[s]Filter + responseHints: + type: array + description: Array of hints containing which fields should be populated in the response. + items: + type: string + description: Hints for the response content. + x-enumDescriptions: + ALL_RESULT_COUNTS: Return result counts for each result set which has non-zero results, even when the request itself is limited to a subset. + FACET_RESULTS: Return only facet results. + QUERY_METADATA: Returns result counts for each result set which has non-zero results, as well as other information about the search such as suggested spelling corrections. + RESULTS: Return search result documents. + SPELLCHECK_METADATA: Return metadata pertaining to spellcheck results. + x-speakeasy-enum-descriptions: + ALL_RESULT_COUNTS: Return result counts for each result set which has non-zero results, even when the request itself is limited to a subset. + FACET_RESULTS: Return only facet results. + QUERY_METADATA: Returns result counts for each result set which has non-zero results, as well as other information about the search such as suggested spelling corrections. + RESULTS: Return search result documents. + SPELLCHECK_METADATA: Return metadata pertaining to spellcheck results. + enum: + - ALL_RESULT_COUNTS + - FACET_RESULTS + - QUERY_METADATA + - RESULTS + - SPELLCHECK_METADATA + timezoneOffset: + type: integer + description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + disableSpellcheck: + type: boolean + description: Whether or not to disable spellcheck. + disableQueryAutocorrect: + type: boolean + description: Disables automatic adjustment of the input query for spelling corrections or other reasons. + returnLlmContentOverSnippets: + type: boolean + description: Enables expanded content to be returned for LLM usage. The size of content per result returned should be modified using maxSnippetSize. Server may return less or more than what is specified in maxSnippetSize. For more details, see https://developers.glean.com/guides/search/llm-content. + inclusions: + $ref: "#/components/schemas/RestrictionFilters" + description: A list of filters which restrict the search results to only the specified content. + exclusions: + $ref: "#/components/schemas/RestrictionFilters" + description: A list of filters specifying content to avoid getting search results from. Exclusions take precendence over inclusions and other query parameters, such as search operators and search facets. + example: + datasourceFilter: JIRA + datasourcesFilter: + - JIRA + queryOverridesFacetFilters: true + facetFilters: + - fieldName: fieldName + values: + - fieldValues + - fieldValues + - fieldName: fieldName + values: + - fieldValues + - fieldValues + TextRange: + required: + - startIndex + description: A subsection of a given string to which some special formatting should be applied. + properties: + startIndex: + type: integer + description: The inclusive start index of the range. + endIndex: + type: integer + description: The exclusive end index of the range. + type: + type: string + enum: + - BOLD + - CITATION + - HIGHLIGHT + - LINK + url: + type: string + description: The URL associated with the range, if applicable. For example, the linked URL for a LINK range. + document: + $ref: "#/components/schemas/Document" + description: A document corresponding to the range, if applicable. For example, the cited document for a CITATION range. + SearchRequestInputDetails: + properties: + hasCopyPaste: + type: boolean + description: Whether the associated query was at least partially copy-pasted. If subsequent requests are issued after a copy-pasted query is constructed (e.g. with facet modifications), this bit should continue to be set for those requests. + example: + hasCopyPaste: true + QuerySuggestion: + required: + - query + properties: + missingTerm: + type: string + description: A query term missing from the original query on which this suggestion is based. + query: + type: string + description: The query being suggested (e.g. enforcing the missing term from the original query). + searchProviderInfo: + $ref: "#/components/schemas/SearchProviderInfo" + description: Information about the search provider that generated this suggestion. + label: + type: string + description: A user-facing description to display for the suggestion. + datasource: + type: string + description: The datasource associated with the suggestion. + resultTab: + $ref: "#/components/schemas/ResultTab" + description: The result tab associated with the suggestion. + requestOptions: + $ref: "#/components/schemas/SearchRequestOptions" + ranges: + type: array + items: + $ref: "#/components/schemas/TextRange" + description: The bolded ranges within the query of the QuerySuggestion. + inputDetails: + $ref: "#/components/schemas/SearchRequestInputDetails" + example: + query: app:github type:pull author:mortimer + label: Mortimer's PRs + datasource: github + Person: + required: + - name + - obfuscatedId + properties: + name: + type: string + description: The display name. + obfuscatedId: + type: string + description: An opaque identifier that can be used to request metadata for a Person. + relatedDocuments: + type: array + items: + $ref: "#/components/schemas/RelatedDocuments" + description: A list of documents related to this person. + metadata: + $ref: "#/components/schemas/PersonMetadata" + example: + name: George Clooney + obfuscatedId: abc123 + Company: + required: + - name + properties: + name: + type: string + description: User-friendly display name. + profileUrl: + type: string + description: Link to internal company company profile. + websiteUrls: + type: array + description: Link to company's associated websites. + items: + type: string + logoUrl: + type: string + description: The URL of the company's logo. Public, Glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + location: + type: string + description: User facing string representing the company's location. + example: New York City + phone: + type: string + description: Phone number as a number string. + fax: + type: string + description: Fax number as a number string. + industry: + type: string + description: User facing string representing the company's industry. + example: Finances + annualRevenue: + type: number + format: double + description: Average company's annual revenue for reference. + numberOfEmployees: + type: integer + format: int64 + description: Average company's number of employees for reference. + stockSymbol: + type: string + description: Company's stock symbol if company is public. + foundedDate: + type: string + format: date + description: The date when the company was founded. + about: + type: string + description: User facing description of company. + example: Financial, software, data, and media company headquartered in Midtown Manhattan, New York City + DocumentCounts: + type: object + description: A map of {string, int} pairs representing counts of each document type associated with this customer. + additionalProperties: + type: integer + CustomDataValue: + properties: + displayLabel: + type: string + stringValue: + type: string + stringListValue: + type: array + description: list of strings for multi-value properties + items: + type: string + numberValue: + type: number + booleanValue: + type: boolean + CustomData: + type: object + description: Custom fields specific to individual datasources + additionalProperties: + $ref: "#/components/schemas/CustomDataValue" + CustomerMetadata: + properties: + datasourceId: + type: string + description: The user visible id of the salesforce customer account. + customData: + $ref: "#/components/schemas/CustomData" + Customer: + required: + - id + - company + properties: + id: + type: string + description: Unique identifier. + domains: + type: array + description: Link to company's associated website domains. + items: + type: string + company: + $ref: "#/components/schemas/Company" + documentCounts: + $ref: "#/components/schemas/DocumentCounts" + poc: + type: array + description: A list of POC for company. + items: + $ref: "#/components/schemas/Person" + metadata: + $ref: "#/components/schemas/CustomerMetadata" + mergedCustomers: + type: array + description: A list of Customers. + items: + $ref: "#/components/schemas/Customer" + startDate: + type: string + format: date + description: The date when the interaction with customer started. + contractAnnualRevenue: + type: number + format: double + description: Average contract annual revenue with that customer. + notes: + type: string + description: User facing (potentially generated) notes about company. + example: CIO is interested in trying out the product. + RelatedObject: + required: + - id + properties: + id: + type: string + description: The ID of the related object + metadata: + type: object + description: Some metadata of the object which can be displayed, while not having the actual object. + properties: + name: + type: string + description: Placeholder name of the object, not the relationship. + RelatedObjectEdge: + properties: + objects: + type: array + items: + $ref: "#/components/schemas/RelatedObject" + RelatedObjects: + properties: + relatedObjects: + type: object + description: A list of objects related to a source object. + additionalProperties: + $ref: "#/components/schemas/RelatedObjectEdge" + ScopeType: type: string - description: URLs of images uploaded by user when providing feedback - query: - type: string - description: The query associated with the Feedback.event.MANUAL_FEEDBACK event. - obscuredQuery: - type: string - description: The query associated with the Feedback.event.MANUAL_FEEDBACK event, but obscured such that the vowels are replaced with special characters. For search feedback events only. - activeTab: - type: string - description: Which tabs the user had chosen at the time of the Feedback.event.MANUAL_FEEDBACK event. For search feedback events only. - comments: - type: string - description: The comments users can optionally add to the Feedback.event.MANUAL_FEEDBACK events. - searchResults: - type: array - items: + description: Describes the scope for a ReadPermission, WritePermission, or GrantPermission object + enum: + - GLOBAL + - OWN + WritePermission: + description: Describes the write permissions levels that a user has for a specific feature + properties: + scopeType: + $ref: "#/components/schemas/ScopeType" + create: + type: boolean + description: True if user has create permission for this feature and scope + update: + type: boolean + description: True if user has update permission for this feature and scope + delete: + type: boolean + description: True if user has delete permission for this feature and scope + ObjectPermissions: + properties: + write: + $ref: "#/components/schemas/WritePermission" + PermissionedObject: + properties: + permissions: + $ref: "#/components/schemas/ObjectPermissions" + description: The permissions the current viewer has with respect to a particular object. + PersonToTeamRelationship: + required: + - person + type: object + description: Metadata about the relationship of a person to a team. + properties: + person: + $ref: "#/components/schemas/Person" + relationship: + type: string + description: The team member's relationship to the team. This defaults to MEMBER if not set. + default: MEMBER + enum: + - MEMBER + - MANAGER + - LEAD + - POINT_OF_CONTACT + - OTHER + customRelationshipStr: + type: string + description: Displayed name for the relationship if relationship is set to `OTHER`. + joinDate: + type: string + format: date-time + description: The team member's start date + TeamEmail: + type: object + description: Information about a team's email + properties: + email: + type: string + format: email + description: An email address + type: + type: string + description: An enum of `PRIMARY`, `SECONDARY`, `ONCALL`, `OTHER` + default: OTHER + required: + - email + - type + CustomFieldValueStr: + properties: + strText: + type: string + description: Text field for string value. + CustomFieldValueHyperlink: + properties: + urlAnchor: + type: string + description: Anchor text for hyperlink. + urlLink: + type: string + description: Link for this URL. + CustomFieldValuePerson: + properties: + person: + $ref: "#/components/schemas/Person" + CustomFieldValue: + oneOf: + - $ref: "#/components/schemas/CustomFieldValueStr" + - $ref: "#/components/schemas/CustomFieldValueHyperlink" + - $ref: "#/components/schemas/CustomFieldValuePerson" + CustomFieldData: + required: + - label + - values + - displayable + properties: + label: + type: string + description: A user-facing label for this field. + values: + type: array + items: + $ref: "#/components/schemas/CustomFieldValue" + displayable: + type: boolean + description: Determines whether the client should display this custom field + default: true + DatasourceProfile: + required: + - datasource + - handle + properties: + datasource: + type: string + example: github + description: The datasource the profile is of. + handle: + type: string + description: The display name of the entity in the given datasource. + url: + type: string + description: URL to view the entity's profile. + nativeAppUrl: + type: string + description: A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...). + isUserGenerated: + type: boolean + description: For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source) + Team: + allOf: + - $ref: "#/components/schemas/RelatedObjects" + - $ref: "#/components/schemas/PermissionedObject" + - type: object + required: + - id + - name + properties: + id: + type: string + description: Unique identifier + name: + type: string + description: Team name + description: + type: string + description: A description of the team + businessUnit: + type: string + description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + department: + type: string + description: An organizational unit where everyone has a similar task, e.g. `Engineering`. + photoUrl: + type: string + format: url + description: A link to the team's photo. + bannerUrl: + type: string + format: url + description: A link to the team's banner photo. + externalLink: + type: string + format: uri + description: Link to a team page on the internet or your company's intranet + members: + type: array + description: The members on this team + items: + $ref: "#/components/schemas/PersonToTeamRelationship" + memberCount: + type: integer + description: Number of members on this team (recursive; includes all individuals that belong to this team, and all individuals that belong to a subteam within this team) + emails: + type: array + description: The emails for this team + items: + $ref: "#/components/schemas/TeamEmail" + customFields: + type: array + description: Customizable fields for additional team information. + items: + $ref: "#/components/schemas/CustomFieldData" + datasourceProfiles: + type: array + description: The datasource profiles of the team + items: + $ref: "#/components/schemas/DatasourceProfile" + datasource: + type: string + description: the data source of the team, e.g. GDRIVE + createdFrom: + type: string + description: For teams created from docs, the doc title. Otherwise empty. + lastUpdatedAt: + type: string + format: date-time + description: when this team was last updated. + status: + type: string + description: whether this team is fully processed or there are still unprocessed operations that'll affect it + default: PROCESSED + enum: + - PROCESSED + - QUEUED_FOR_CREATION + - QUEUED_FOR_DELETION + canBeDeleted: + type: boolean + description: can this team be deleted. Some manually ingested teams like GCS_CSV or PUSH_API cannot + default: true + loggingId: + type: string + description: The logging id of the team used in scrubbed logs, client analytics, and metrics. + CustomEntityMetadata: + properties: + customData: + $ref: "#/components/schemas/CustomData" + GroupType: type: string - description: The array of search result Glean Document IDs, ordered by top to bottom result. - previousMessages: - type: array - items: + description: The type of user group + x-enumDescriptions: + COLLECTION_AUDIENCE: Refers to any viewers of the Collection. + x-speakeasy-enum-descriptions: + COLLECTION_AUDIENCE: Refers to any viewers of the Collection. + enum: + - DEPARTMENT + - ALL + - TEAM + - JOB_TITLE + - ROLE_TYPE + - LOCATION + - REGION + - EXTERNAL_GROUP + - COLLECTION_AUDIENCE + Group: + required: + - type + - id + properties: + type: + $ref: "#/components/schemas/GroupType" + id: + type: string + description: A unique identifier for the group. May be the same as name. + name: + type: string + description: Name of the group. + datasourceInstance: + type: string + description: Datasource instance if the group belongs to one e.g. external groups. + provisioningId: + type: string + description: identifier for greenlist provisioning, aka sciokey + UserRole: type: string - description: The array of previous messages in a chat session, ordered by oldest to newest. - chatTranscript: - type: array - items: - $ref: "#/components/schemas/FeedbackChatExchange" - description: Array of previous request/response exchanges, ordered by oldest to newest. - numQueriesFromFirstRun: - type: integer - description: How many times this query has been run in the past. - vote: - type: string - description: The vote associated with the Feedback.event.MANUAL_FEEDBACK event. - enum: - - UPVOTE - - DOWNVOTE - rating: - type: integer - description: A rating associated with the user feedback. The value will be between one and the maximum given by ratingScale, inclusive. - ratingKey: - type: string - description: A description of the rating that contextualizes how it appeared to the user, e.g. "satisfied". - ratingScale: - type: integer - description: The scale of comparison for a rating associated with the feedback. Rating values start from one and go up to the maximum specified by ratingScale. For example, a five-option satisfaction rating will have a ratingScale of 5 and a thumbs-up/thumbs-down rating will have a ratingScale of 2. - SideBySideImplementation: - properties: - implementationId: - type: string - description: Unique identifier for this implementation variant. - implementationName: - type: string - description: Human-readable name for this implementation (e.g., "Variant A", "GPT-4", "Claude"). - searchParams: - type: object - description: The search/chat parameters used for this implementation. - additionalProperties: + description: A user's role with respect to a specific document. + enum: + - OWNER + - VIEWER + - ANSWER_MODERATOR + - EDITOR + - VERIFIER + UserRoleSpecification: + required: + - role + properties: + sourceDocumentSpec: + $ref: "#/components/schemas/DocumentSpec" + description: The document spec of the object this role originates from. The object this role is included with will usually have the same information as this document spec, but if the role is inherited, then the document spec refers to the parent document that the role came from. + person: + $ref: "#/components/schemas/Person" + group: + $ref: "#/components/schemas/Group" + role: + $ref: "#/components/schemas/UserRole" + CustomEntity: + allOf: + - $ref: "#/components/schemas/PermissionedObject" + - type: object + properties: + id: + type: string + description: Unique identifier. + title: + type: string + description: Title or name of the custom entity. + datasource: + type: string + description: The datasource the custom entity is from. + objectType: + type: string + description: The type of the entity. Interpretation is specific to each datasource + metadata: + $ref: "#/components/schemas/CustomEntityMetadata" + roles: + type: array + description: A list of user roles for the custom entity explicitly granted by the owner. + items: + $ref: "#/components/schemas/UserRoleSpecification" + AnswerId: + properties: + id: + type: integer + description: The opaque ID of the Answer. + example: 3 + AnswerDocId: + properties: + docId: + type: string + description: Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. + example: ANSWERS_answer_3 + AnswerMutableProperties: + properties: + question: + type: string + example: Why is the sky blue? + questionVariations: + type: array + description: Additional ways of phrasing this question. + items: + type: string + bodyText: + type: string + description: The plain text answer to the question. + example: From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light. + boardId: + type: integer + description: The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. + deprecated: true + x-glean-deprecated: + id: 3729bc64-8859-4159-b93c-ce2d5f0e7304 + introduced: "2026-02-05" + message: Answer Boards no longer supported + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Answer Boards no longer supported" + audienceFilters: + type: array + description: Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. + items: + $ref: "#/components/schemas/FacetFilter" + addedRoles: + type: array + description: A list of user roles for the answer added by the owner. + items: + $ref: "#/components/schemas/UserRoleSpecification" + removedRoles: + type: array + description: A list of user roles for the answer removed by the owner. + items: + $ref: "#/components/schemas/UserRoleSpecification" + roles: + type: array + description: A list of roles for this answer explicitly granted by an owner, editor, or admin. + items: + $ref: "#/components/schemas/UserRoleSpecification" + sourceDocumentSpec: + $ref: "#/components/schemas/DocumentSpec" + sourceType: + type: string + enum: + - DOCUMENT + - ASSISTANT + UgcTrackingSignals: + type: object + properties: + trackingToken: + type: string + description: An opaque token that represents this particular UGC. To be used for `/feedback` reporting. + StructuredText: + allOf: + - $ref: "#/components/schemas/StructuredTextMutableProperties" + - type: object + properties: + structuredList: + type: array + items: + $ref: "#/components/schemas/StructuredTextItem" + description: An array of objects each of which contains either a string or a link which optionally corresponds to a document. + AnswerLike: + properties: + user: + $ref: "#/components/schemas/Person" + createTime: + type: string + format: date-time + description: The time the user liked the answer in ISO format (ISO 8601). + AnswerLikes: + required: + - likedBy + - likedByUser + - numLikes + properties: + likedBy: + type: array + items: + $ref: "#/components/schemas/AnswerLike" + likedByUser: + type: boolean + description: Whether the user in context liked the answer. + numLikes: + type: integer + description: The total number of likes for the answer. + Reminder: + required: + - assignee + - remindAt + properties: + assignee: + $ref: "#/components/schemas/Person" + requestor: + $ref: "#/components/schemas/Person" + remindAt: + type: integer + description: Unix timestamp for when the reminder should trigger (in seconds since epoch UTC). + createdAt: + type: integer + description: Unix timestamp for when the reminder was first created (in seconds since epoch UTC). + reason: + type: string + description: An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). + TimePoint: + properties: + epochSeconds: + type: integer + description: Epoch seconds. Has precedence over daysFromNow. + daysFromNow: + type: integer + description: Number of days in the past, relative to the current date. + Period: + properties: + minDaysFromNow: + type: integer + description: DEPRECATED - The number of days from now in the past to define upper boundary of time period. + deprecated: true + maxDaysFromNow: + type: integer + description: DEPRECATED - The number of days from now in the past to define lower boundary of time period. + deprecated: true + start: + $ref: "#/components/schemas/TimePoint" + end: + $ref: "#/components/schemas/TimePoint" + CountInfo: + required: + - count + properties: + count: + type: integer + description: The counter value + period: + $ref: "#/components/schemas/Period" + org: + type: string + description: The unit of organization over which we did the count aggregation, e.g. org (department) or company + VerificationMetadata: + required: + - documentId + properties: + lastVerifier: + $ref: "#/components/schemas/Person" + lastVerificationTs: + type: integer + description: The unix timestamp of the verification (in seconds since epoch UTC). + expirationTs: + type: integer + description: The unix timestamp of the verification expiration if applicable (in seconds since epoch UTC). + document: + $ref: "#/components/schemas/Document" + reminders: + type: array + items: + $ref: "#/components/schemas/Reminder" + description: Info about all outstanding verification reminders for the document if exists. + lastReminder: + $ref: "#/components/schemas/Reminder" + visitorCount: + type: array + items: + $ref: "#/components/schemas/CountInfo" + description: Number of visitors to the document during included time periods. + candidateVerifiers: + type: array + items: + $ref: "#/components/schemas/Person" + description: List of potential verifiers for the document e.g. old verifiers and/or users with view/edit permissions. + Verification: + required: + - state + properties: + state: + type: string + enum: + - UNVERIFIED + - VERIFIED + - DEPRECATED + description: The verification state for the document. + metadata: + $ref: "#/components/schemas/VerificationMetadata" + CollectionBaseMutableProperties: + required: + - name + properties: + name: + type: string + description: The unique name of the Collection. + description: + type: string + description: A brief summary of the Collection's contents. + addedRoles: + type: array + description: A list of added user roles for the Collection. + items: + $ref: "#/components/schemas/UserRoleSpecification" + removedRoles: + type: array + description: A list of removed user roles for the Collection. + items: + $ref: "#/components/schemas/UserRoleSpecification" + audienceFilters: + type: array + items: + $ref: "#/components/schemas/FacetFilter" + description: Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. + Thumbnail: + properties: + photoId: + type: string + description: Photo id if the thumbnail is from splash. + url: + type: string + description: Thumbnail URL. This can be user provided image and/or from downloaded images hosted by Glean. + CollectionMutableProperties: + allOf: + - $ref: "#/components/schemas/CollectionBaseMutableProperties" + - type: object + required: + - name + properties: + icon: + type: string + description: The emoji icon of this Collection. + adminLocked: + type: boolean + description: Indicates whether edits are allowed for everyone or only admins. + parentId: + type: integer + description: The parent of this Collection, or 0 if it's a top-level Collection. + thumbnail: + $ref: "#/components/schemas/Thumbnail" + allowedDatasource: + type: string + description: The datasource type this Collection can hold. + CollectionItemMutableProperties: + properties: + name: + type: string + description: The optional name of the Collection item. + description: + type: string + description: A helpful description of why this CollectionItem is in the Collection that it's in. + icon: + type: string + description: The emoji icon for this CollectionItem. Only used for Text type items. + UserGeneratedContentId: + properties: + id: + type: integer + description: The opaque id of the user generated content. + ShortcutMutableProperties: + properties: + inputAlias: + type: string + description: Link text following go/ prefix as entered by the user. + destinationUrl: + type: string + description: Destination URL for the shortcut. + destinationDocumentId: + type: string + description: Glean Document ID for the URL, if known. + description: + type: string + description: A short, plain text blurb to help people understand the intent of the shortcut. + unlisted: + type: boolean + description: Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. + urlTemplate: + type: string + description: For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. + addedRoles: + type: array + description: A list of user roles added for the Shortcut. + items: + $ref: "#/components/schemas/UserRoleSpecification" + removedRoles: + type: array + description: A list of user roles removed for the Shortcut. + items: + $ref: "#/components/schemas/UserRoleSpecification" + ShortcutMetadata: + properties: + createdBy: + $ref: "#/components/schemas/Person" + createTime: + type: string + format: date-time + description: The time the shortcut was created in ISO format (ISO 8601). + updatedBy: + $ref: "#/components/schemas/Person" + updateTime: + type: string + format: date-time + description: The time the shortcut was updated in ISO format (ISO 8601). + destinationDocument: + $ref: "#/components/schemas/Document" + description: Document that corresponds to the destination URL, if applicable. + intermediateUrl: + type: string + description: The URL from which the user is then redirected to the destination URL. Full replacement for https://go/. + viewPrefix: + type: string + description: The part of the shortcut preceding the input alias when used for showing shortcuts to users. Should end with "/". e.g. "go/" for native shortcuts. + isExternal: + type: boolean + description: Indicates whether a shortcut is native or external. + editUrl: + type: string + description: The URL using which the user can access the edit page of the shortcut. + Shortcut: + allOf: + - $ref: "#/components/schemas/UserGeneratedContentId" + - $ref: "#/components/schemas/ShortcutMutableProperties" + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/ShortcutMetadata" + - type: object + required: + - inputAlias + properties: + alias: + type: string + description: canonical link text following go/ prefix where hyphen/underscore is removed. + title: + type: string + description: Title for the Go Link + roles: + type: array + description: A list of user roles for the Go Link. + items: + $ref: "#/components/schemas/UserRoleSpecification" + Collection: + allOf: + - $ref: "#/components/schemas/CollectionMutableProperties" + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/UgcTrackingSignals" + - type: object + required: + - id + - description + properties: + id: + type: integer + description: The unique ID of the Collection. + createTime: + type: string + format: date-time + updateTime: + type: string + format: date-time + creator: + $ref: "#/components/schemas/Person" + updatedBy: + $ref: "#/components/schemas/Person" + itemCount: + type: integer + description: The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. + childCount: + type: integer + description: The number of children Collections. Separated from the actual children so we can grab the count without children. + items: + type: array + items: + $ref: "#/components/schemas/CollectionItem" + description: The items in this Collection. + pinMetadata: + $ref: "#/components/schemas/CollectionPinnedMetadata" + description: Metadata having what categories this Collection is pinned to and the eligible categories to pin to + shortcuts: + type: array + items: + type: string + description: The names of the shortcuts (Go Links) that point to this Collection. + children: + type: array + items: + $ref: "#/components/schemas/Collection" + description: The children Collections of this Collection. + roles: + type: array + description: A list of user roles for the Collection. + items: + $ref: "#/components/schemas/UserRoleSpecification" + CollectionItem: + allOf: + - $ref: "#/components/schemas/CollectionItemMutableProperties" + - type: object + required: + - collectionId + - itemType + properties: + collectionId: + type: integer + description: The Collection ID of the Collection that this CollectionItem belongs in. + documentId: + type: string + description: If this CollectionItem is indexed, the Glean Document ID of that document. + url: + type: string + description: The URL of this CollectionItem. + itemId: + type: string + description: Unique identifier for the item within the Collection it belongs to. + createdBy: + $ref: "#/components/schemas/Person" + description: The person who added this Collection item. + createdAt: + type: string + format: date-time + description: Unix timestamp for when the item was first added (in seconds since epoch UTC). + document: + $ref: "#/components/schemas/Document" + description: The Document this CollectionItem corresponds to (omitted if item is a non-indexed URL). + shortcut: + $ref: "#/components/schemas/Shortcut" + description: The Shortcut this CollectionItem corresponds to (only included if item URL is for a Go Link). + collection: + $ref: "#/components/schemas/Collection" + description: The Collection this CollectionItem corresponds to (only included if item type is COLLECTION). + itemType: + type: string + enum: + - DOCUMENT + - TEXT + - URL + - COLLECTION + CollectionPinnableCategories: type: string - response: - type: string - description: The full response generated by this implementation. - responseMetadata: - type: object - description: Metadata about the response (e.g., latency, token count). - properties: - latencyMs: - type: integer - description: Time taken to generate the response in milliseconds. - tokenCount: - type: integer - description: Number of tokens in the response. - modelUsed: - type: string - description: The specific model version used. - ManualFeedbackSideBySideInfo: - properties: - email: - type: string - description: The email address of the user who submitted the side-by-side feedback. - source: - type: string - description: The source associated with the side-by-side feedback event. - enum: - - LIVE_EVAL - - CHAT - - SEARCH - query: - type: string - description: The query or prompt that was evaluated across multiple implementations. - implementations: - type: array - description: Array of implementations that were compared side-by-side. - items: - $ref: "#/components/schemas/SideBySideImplementation" - evaluationSessionId: - type: string - description: Unique identifier for this evaluation session to group related feedback events. - implementationId: - type: string - description: The ID of the implementation this specific feedback event is for. - vote: - type: string - description: The vote for this specific implementation. - enum: - - UPVOTE - - DOWNVOTE - - NEUTRAL - comments: - type: string - description: Specific feedback comments for this implementation. - SeenFeedbackInfo: - properties: - isExplicit: - type: boolean - description: The confidence of the user seeing the object is high because they explicitly interacted with it e.g. answer impression in SERP with additional user interaction. - UserViewInfo: - properties: - docId: - type: string - description: Unique Glean Document ID of the associated document. - docTitle: - type: string - description: Title of associated document. - docUrl: - type: string - description: URL of associated document. - WorkflowFeedbackInfo: - properties: - source: - type: string - enum: - - ZERO_STATE - - LIBRARY - - HOMEPAGE - description: Where the feedback of the workflow originated from - Feedback: - required: - - event - - trackingTokens - properties: - id: - type: string - description: Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. - category: - type: string - description: The feature category to which the feedback applies. These should be broad product areas such as Announcements, Answers, Search, etc. rather than specific components or UI treatments within those areas. - enum: - - ANNOUNCEMENT - - ANSWERS - - ARTIFACTS - - AUTOCOMPLETE - - COLLECTIONS - - FEED - - SEARCH - - CHAT - - NTP - - WORKFLOWS - - SUMMARY - - GENERAL - - PRISM - - PROMPTS - trackingTokens: - type: array - description: A list of server-generated trackingTokens to which this event applies. - items: + description: Categories a Collection can be pinned to. + enum: + - COMPANY_RESOURCE + - DEPARTMENT_RESOURCE + - TEAM_RESOURCE + CollectionPinnableTargets: type: string - event: - type: string - description: The action the user took within a Glean client with respect to the object referred to by the given `trackingToken`. - x-enumDescriptions: - CLICK: The object's primary link was clicked with the intent to view its full representation. Depending on the object type, this may imply an external navigation or navigating to a new page or view within the Glean app. - CONTAINER_CLICK: A link to the object's parent container (e.g. the folder in which it's located) was clicked. - COPY_LINK: The user copied a link to the primary link. - CREATE: The user creates a document. - DISMISS: The user dismissed the object such that it was hidden from view. - DOWNVOTE: The user gave feedback that the object was not useful. - EMAIL: The user attempted to send an email. - EXECUTE: The user executed the object (e.g. ran a workflow). - FILTER: The user applied a filter. - FIRST_TOKEN: The first token of a streaming response is received. - FOCUS_IN: The user clicked into an interactive element, e.g. the search box. - LAST_TOKEN: The final token of a streaming response is received. - MANUAL_FEEDBACK: The user submitted textual manual feedback regarding the object. - MANUAL_FEEDBACK_SIDE_BY_SIDE: The user submitted comparative feedback for multiple side-by-side implementations. - FEEDBACK_TIME_SAVED: The user submitted feedback about time saved by an agent or workflow. - MARK_AS_READ: The user explicitly marked the content as read. - MESSAGE: The user attempted to send a message using their default messaing app. - MIDDLE_CLICK: The user middle clicked the object's primary link with the intent to open its full representation in a new tab. - PAGE_BLUR: The user puts a page out of focus but keeps it in the background. - PAGE_FOCUS: The user puts a page in focus, meaning it is the first to receive keyboard events. - PAGE_LEAVE: The user leaves a page and it is unloaded (by clicking a link, closing the tab/window, etc). - PREVIEW: The user clicked the object's inline preview affordance. - RIGHT_CLICK: The user right clicked the object's primary link. This may indicate an intent to open it in a new tab or copy it. - SECTION_CLICK: The user clicked a link to a subsection of the primary object. - SEEN: The user has likely seen the object (e.g. took action to make the object visible within the user's viewport). - SELECT: The user explicitly selected something, eg. a chat response variant they prefer. - SHARE: The user shared the object with another user. - SHOW_MORE: The user clicked the object's show more affordance. - UPVOTE: The user gave feedback that the object was useful. - VIEW: The object was visible within the user's viewport. - VISIBLE: The object was visible within the user's viewport. - enum: - - CLICK - - CONTAINER_CLICK - - COPY_LINK - - CREATE - - DISMISS - - DOWNVOTE - - EMAIL - - EXECUTE - - FILTER - - FIRST_TOKEN - - FOCUS_IN - - LAST_TOKEN - - MANUAL_FEEDBACK - - MANUAL_FEEDBACK_SIDE_BY_SIDE - - FEEDBACK_TIME_SAVED - - MARK_AS_READ - - MESSAGE - - MIDDLE_CLICK - - PAGE_BLUR - - PAGE_FOCUS - - PAGE_LEAVE - - PREVIEW - - RELATED_CLICK - - RIGHT_CLICK - - SECTION_CLICK - - SEEN - - SELECT - - SHARE - - SHOW_MORE - - UPVOTE - - VIEW - - VISIBLE - x-speakeasy-enum-descriptions: - CLICK: The object's primary link was clicked with the intent to view its full representation. Depending on the object type, this may imply an external navigation or navigating to a new page or view within the Glean app. - CONTAINER_CLICK: A link to the object's parent container (e.g. the folder in which it's located) was clicked. - COPY_LINK: The user copied a link to the primary link. - CREATE: The user creates a document. - DISMISS: The user dismissed the object such that it was hidden from view. - DOWNVOTE: The user gave feedback that the object was not useful. - EMAIL: The user attempted to send an email. - EXECUTE: The user executed the object (e.g. ran a workflow). - FILTER: The user applied a filter. - FIRST_TOKEN: The first token of a streaming response is received. - FOCUS_IN: The user clicked into an interactive element, e.g. the search box. - LAST_TOKEN: The final token of a streaming response is received. - MANUAL_FEEDBACK: The user submitted textual manual feedback regarding the object. - MANUAL_FEEDBACK_SIDE_BY_SIDE: The user submitted comparative feedback for multiple side-by-side implementations. - FEEDBACK_TIME_SAVED: The user submitted feedback about time saved by an agent or workflow. - MARK_AS_READ: The user explicitly marked the content as read. - MESSAGE: The user attempted to send a message using their default messaing app. - MIDDLE_CLICK: The user middle clicked the object's primary link with the intent to open its full representation in a new tab. - PAGE_BLUR: The user puts a page out of focus but keeps it in the background. - PAGE_FOCUS: The user puts a page in focus, meaning it is the first to receive keyboard events. - PAGE_LEAVE: The user leaves a page and it is unloaded (by clicking a link, closing the tab/window, etc). - PREVIEW: The user clicked the object's inline preview affordance. - RIGHT_CLICK: The user right clicked the object's primary link. This may indicate an intent to open it in a new tab or copy it. - SECTION_CLICK: The user clicked a link to a subsection of the primary object. - SEEN: The user has likely seen the object (e.g. took action to make the object visible within the user's viewport). - SELECT: The user explicitly selected something, eg. a chat response variant they prefer. - SHARE: The user shared the object with another user. - SHOW_MORE: The user clicked the object's show more affordance. - UPVOTE: The user gave feedback that the object was useful. - VIEW: The object was visible within the user's viewport. - VISIBLE: The object was visible within the user's viewport. - position: - type: integer - description: Position of the element in the case that the client controls order (such as feed and autocomplete). - payload: - type: string - description: For type MANUAL_FEEDBACK, contains string of user feedback. For autocomplete, partial query string. For feed, string of user feedback in addition to manual feedback signals extracted from all suggested content. - sessionInfo: - $ref: "#/components/schemas/SessionInfo" - timestamp: - type: string - description: The ISO 8601 timestamp when the event occured. - format: date-time - user: - $ref: "#/components/schemas/User" - pathname: - type: string - description: The path the client was at when the feedback event triggered. - channels: - type: array - description: Where the feedback will be sent, e.g. to Glean, the user's company, or both. If no channels are specified, feedback will go only to Glean. - items: + description: What targets can a Collection be pinned to. + enum: + - RESOURCE_CARD + - TEAM_PROFILE_PAGE + CollectionPinTarget: + required: + - category + properties: + category: + $ref: "#/components/schemas/CollectionPinnableCategories" + value: + type: string + description: Optional. If category supports values, then the additional value for the category e.g. department name for DEPARTMENT_RESOURCE, team name/id for TEAM_RESOURCE and so on. + target: + $ref: "#/components/schemas/CollectionPinnableTargets" + CollectionPinMetadata: + required: + - id + - target + properties: + id: + type: integer + description: The ID of the Collection. + target: + $ref: "#/components/schemas/CollectionPinTarget" + CollectionPinnedMetadata: + properties: + existingPins: + type: array + items: + $ref: "#/components/schemas/CollectionPinTarget" + description: List of targets this Collection is pinned to. + eligiblePins: + type: array + items: + $ref: "#/components/schemas/CollectionPinMetadata" + description: List of targets this Collection can be pinned to, excluding the targets this Collection is already pinned to. We also include Collection ID already is pinned to each eligible target, which will be 0 if the target has no pinned Collection. + Answer: + allOf: + - $ref: "#/components/schemas/AnswerId" + - $ref: "#/components/schemas/AnswerDocId" + - $ref: "#/components/schemas/AnswerMutableProperties" + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/UgcTrackingSignals" + - type: object + required: + - id + properties: + combinedAnswerText: + $ref: "#/components/schemas/StructuredText" + likes: + $ref: "#/components/schemas/AnswerLikes" + author: + $ref: "#/components/schemas/Person" + createTime: + type: string + format: date-time + description: The time the answer was created in ISO format (ISO 8601). + updateTime: + type: string + format: date-time + description: The time the answer was last updated in ISO format (ISO 8601). + updatedBy: + $ref: "#/components/schemas/Person" + verification: + $ref: "#/components/schemas/Verification" + collections: + type: array + description: The collections to which the answer belongs. + items: + $ref: "#/components/schemas/Collection" + documentCategory: + type: string + description: The document's document_category(.proto). + sourceDocument: + $ref: "#/components/schemas/Document" + FollowupAction: + description: A follow-up action that can be invoked by the user after a response. The action parameters are not included and need to be predicted/filled separately. + properties: + actionRunId: + type: string + description: Unique identifier for this actionRun recommendation event. + actionInstanceId: + type: string + description: The ID of the action instance that will be invoked. + actionId: + type: string + description: The ID of the associated action. + parameters: + type: object + description: Map of assistant predicted parameters and their corresponding values. + additionalProperties: + type: string + recommendationText: + type: string + description: Text to be displayed to the user when recommending the action instance. + actionLabel: + type: string + description: The label to be used when displaying a button to execute this action instance. + userConfirmationRequired: + type: boolean + description: Whether user confirmation is needed before executing this action instance. + GeneratedQna: + properties: + question: + type: string + description: Search query rephrased into a question. + answer: + type: string + description: Answer generated for the given query or the generated question. + followUpPrompts: + type: array + items: + type: string + description: List of all follow-up prompts generated for the given query or the generated question. + followupActions: + description: List of follow-up actions generated for the given query or the generated question. + type: array + items: + $ref: "#/components/schemas/FollowupAction" + ranges: + type: array + items: + $ref: "#/components/schemas/TextRange" + description: Answer subsections to mark with special formatting (citations, bolding etc) + status: + type: string + enum: + - COMPUTING + - DISABLED + - FAILED + - NO_ANSWER + - SKIPPED + - STREAMING + - SUCCEEDED + - TIMEOUT + description: Status of backend generating the answer + cursor: + type: string + description: An opaque cursor representing the search request + trackingToken: + type: string + description: An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. + SearchResult: + required: + - url + allOf: + - $ref: "#/components/schemas/Result" + - type: object + properties: + document: + $ref: "#/components/schemas/Document" + title: + type: string + url: + type: string + nativeAppUrl: + type: string + description: A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...). + snippets: + type: array + items: + $ref: "#/components/schemas/SearchResultSnippet" + description: Text content from the result document which contains search query terms, if available. + fullText: + type: string + description: The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack). + fullTextList: + type: array + description: The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack). + items: + type: string + relatedResults: + type: array + items: + $ref: "#/components/schemas/RelatedDocuments" + description: A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP. + clusteredResults: + type: array + description: A list of results that should be displayed as associated with this result. + items: + $ref: "#/components/schemas/SearchResult" + allClusteredResults: + type: array + description: A list of results that should be displayed as associated with this result. + items: + $ref: "#/components/schemas/ClusterGroup" + attachmentCount: + type: integer + description: The total number of attachments. + attachments: + type: array + description: A (potentially partial) list of results representing documents attached to the main result document. + items: + $ref: "#/components/schemas/SearchResult" + backlinkResults: + type: array + description: A list of results that should be displayed as backlinks of this result in reverse chronological order. + items: + $ref: "#/components/schemas/SearchResult" + clusterType: + $ref: "#/components/schemas/ClusterTypeEnum" + mustIncludeSuggestions: + $ref: "#/components/schemas/QuerySuggestionList" + querySuggestion: + $ref: "#/components/schemas/QuerySuggestion" + prominence: + $ref: "#/components/schemas/SearchResultProminenceEnum" + attachmentContext: + type: string + description: Additional context for the relationship between the result and the document it's attached to. + pins: + type: array + description: A list of pins associated with this search result. + items: + $ref: "#/components/schemas/PinDocument" + example: + snippets: + - snippet: snippet + mimeType: mimeType + metadata: + container: container + createTime: "2000-01-23T04:56:07.000Z" + datasource: datasource + author: + name: name + documentId: documentId + updateTime: "2000-01-23T04:56:07.000Z" + mimeType: mimeType + objectType: objectType + title: title + url: https://example.com/foo/bar + nativeAppUrl: slack://foo/bar + mustIncludeSuggestions: + - missingTerm: container + query: container + ExtractedQnA: + properties: + heading: + type: string + description: Heading text that was matched to produce this result. + question: + type: string + description: Question text that was matched to produce this result. + questionResult: + $ref: "#/components/schemas/SearchResult" + CalendarAttendee: + required: + - person + properties: + isOrganizer: + type: boolean + description: Whether or not this attendee is an organizer. + isInGroup: + type: boolean + description: Whether or not this attendee is in a group. Needed temporarily at least to support both flat attendees and tree for compatibility. + person: + $ref: "#/components/schemas/Person" + groupAttendees: + type: array + description: If this attendee is a group, represents the list of individual attendees in the group. + items: + $ref: "#/components/schemas/CalendarAttendee" + responseStatus: + type: string + enum: + - ACCEPTED + - DECLINED + - NO_RESPONSE + - TENTATIVE + CalendarAttendees: + properties: + people: + type: array + items: + $ref: "#/components/schemas/CalendarAttendee" + description: Full details of some of the attendees of this event + isLimit: + type: boolean + description: Whether the total count of the people returned is at the retrieval limit. + total: + type: integer + description: Total number of attendees in this event. + numAccepted: + type: integer + description: Total number of attendees who have accepted this event. + numDeclined: + type: integer + description: Total number of attendees who have declined this event. + numNoResponse: + type: integer + description: Total number of attendees who have not responded to this event. + numTentative: + type: integer + description: Total number of attendees who have responded tentatively (i.e. responded maybe) to this event. + Meeting: + properties: + id: + type: string + title: + type: string + description: + type: string + url: + type: string + startTime: + type: string + format: date-time + endTime: + type: string + format: date-time + attendees: + $ref: "#/components/schemas/CalendarAttendees" + description: The attendee list, including their response status + isCancelled: + type: boolean + description: Whether the meeting has been cancelled + location: + type: string + description: The location/venue of the meeting + responseStatus: + type: string + description: The current user's response status (accepted, declined, tentativelyAccepted, none) + conferenceUri: + type: string + description: The meeting join link (Teams, Zoom, etc.) + conferenceProvider: + type: string + description: The conference provider (e.g., "Microsoft Teams", "Zoom") + AppResult: + required: + - datasource + properties: + datasource: + type: string + description: The app or other repository type this represents + docType: + type: string + description: The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). + mimeType: + type: string + description: Mimetype is used to differentiate between sub applications from a datasource (e.g. Sheets, Docs from Gdrive) + iconUrl: + type: string + description: If there is available icon URL. + CodeLine: + properties: + lineNumber: + type: integer + content: + type: string + ranges: + type: array + items: + $ref: "#/components/schemas/TextRange" + description: Index ranges depicting matched sections of the line + Code: + properties: + repoName: + type: string + fileName: + type: string + fileUrl: + type: string + lines: + type: array + items: + $ref: "#/components/schemas/CodeLine" + isLastMatch: + type: boolean + description: Last file match for a repo + example: + repoName: scio + fileName: README.md + matches: + - lineNumber: 1 + content: Welcome to the beginning + ranges: [] + - lineNumber: 2 + content: Second line of the file + ranges: [] + - lineNumber: 3 + content: hello world hello world + ranges: + - startindex: 0 + endIndex: 5 + - startIndex: 12 + endIndex: 17 + QuerySuggestionList: + properties: + suggestions: + type: array + items: + $ref: "#/components/schemas/QuerySuggestion" + person: + $ref: "#/components/schemas/Person" + IconConfig: + description: Defines how to render an icon + properties: + generatedBackgroundColorKey: + type: string + backgroundColor: + type: string + color: + type: string + key: + type: string + iconType: + enum: + - COLLECTION + - CUSTOM + - DATASOURCE + - DATASOURCE_INSTANCE + - FAVICON + - FILE_TYPE + - GENERATED_BACKGROUND + - GLYPH + - MIME_TYPE + - NO_ICON + - PERSON + - REACTIONS + - URL + masked: + type: boolean + description: Whether the icon should be masked based on current theme. + name: + type: string + description: The name of the icon if applicable, e.g. the glyph name for `IconType.GLYPH` icons. + url: + type: string + description: The URL to an image to be displayed if applicable, e.g. the URL for `iconType.URL` icons. + example: + color: "#343CED" + key: person_icon + iconType: GLYPH + name: user + ChatMetadata: + description: Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. + properties: + id: + type: string + description: The opaque id of the Chat. + createTime: + type: integer + description: Server Unix timestamp of the creation time (in seconds since epoch UTC). + createdBy: + $ref: "#/components/schemas/Person" + description: The user who created this Chat. + updateTime: + type: integer + description: Server Unix timestamp of the update time (in seconds since epoch UTC). + name: + type: string + description: The name of the Chat. + applicationId: + type: string + description: The ID of the AI App that this Chat is associated to. + applicationName: + type: string + description: The display name of the AI App that this Chat is associated to. + icon: + $ref: "#/components/schemas/IconConfig" + RelatedDocuments: + properties: + relation: + type: string + description: How this document relates to the including entity. + enum: + - ATTACHMENT + - CANONICAL + - CASE + - contact + - CONTACT + - CONVERSATION_MESSAGES + - EXPERT + - FROM + - HIGHLIGHT + - opportunity + - OPPORTUNITY + - RECENT + - SOURCE + - TICKET + - TRANSCRIPT + - WITH + x-enum-varnames: + - ATTACHMENT + - CANONICAL + - CASE + - CONTACT_LOWERCASE + - CONTACT + - CONVERSATION_MESSAGES + - EXPERT + - FROM + - HIGHLIGHT + - OPPORTUNITY_LOWERCASE + - OPPORTUNITY + - RECENT + - SOURCE + - TICKET + - TRANSCRIPT + - WITH + x-enumDescriptions: + CANONICAL: Canonical documents for the entity, such as overview docs, architecture docs elastic. + x-speakeasy-enum-descriptions: + CANONICAL: Canonical documents for the entity, such as overview docs, architecture docs elastic. + associatedEntityId: + type: string + description: Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers) + querySuggestion: + $ref: "#/components/schemas/QuerySuggestion" + documents: + type: array + items: + $ref: "#/components/schemas/Document" + description: A truncated list of documents with this relation. TO BE DEPRECATED. + deprecated: true + x-glean-deprecated: + id: 68de0429-b0cc-4b40-8061-f848788079a2 + introduced: "2026-02-05" + message: Field is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" + results: + type: array + items: + $ref: "#/components/schemas/SearchResult" + description: A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken. + RelatedQuestion: + properties: + question: + type: string + description: The text of the related question + answer: + type: string + description: The answer for the related question + ranges: + type: array + items: + $ref: "#/components/schemas/TextRange" + description: Subsections of the answer string to which some special formatting should be applied (eg. bold) + EntityType: type: string + description: The type of entity. + x-include-enum-class-prefix: true enum: - - COMPANY - - GLEAN - url: - type: string - description: The URL the client was at when the feedback event triggered. - uiTree: - description: The UI element tree associated with the event, if any. - items: - type: string - type: array - uiElement: - type: string - description: The UI element associated with the event, if any. - manualFeedbackInfo: - $ref: "#/components/schemas/ManualFeedbackInfo" - manualFeedbackSideBySideInfo: - $ref: "#/components/schemas/ManualFeedbackSideBySideInfo" - seenFeedbackInfo: - $ref: "#/components/schemas/SeenFeedbackInfo" - userViewInfo: - $ref: "#/components/schemas/UserViewInfo" - workflowFeedbackInfo: - $ref: "#/components/schemas/WorkflowFeedbackInfo" - applicationId: - type: string - description: The application ID of the client that sent the feedback event. - agentId: - type: string - description: The agent ID of the client that sent the feedback event. - example: - trackingTokens: - - trackingTokens - event: VIEW - StructuredTextMutableProperties: - required: - - text - properties: - text: - type: string - example: From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light. - ConnectorType: - type: string - description: The source from which document content was pulled, e.g. an API crawl or browser history - enum: - - API_CRAWL - - BROWSER_CRAWL - - BROWSER_HISTORY - - BUILTIN - - FEDERATED_SEARCH - - PUSH_API - - WEB_CRAWL - - NATIVE_HISTORY - DocumentContent: - properties: - fullTextList: - type: array - items: + - PERSON + - PROJECT + - CUSTOMER + Disambiguation: + type: object + description: A disambiguation between multiple entities with the same name + properties: + name: + type: string + description: Name of the ambiguous entity + id: + type: string + description: The unique id of the entity in the knowledge graph + type: + $ref: "#/components/schemas/EntityType" + SearchResultSnippet: + properties: + mimeType: + type: string + description: The mime type of the snippets, currently either text/plain or text/html. + text: + type: string + description: A matching snippet from the document with no highlights. + snippetTextOrdering: + type: integer + description: Used for sorting based off the snippet's location within all_snippetable_text + ranges: + type: array + items: + $ref: "#/components/schemas/TextRange" + description: The bolded ranges within text. + url: + type: string + description: A URL, generated based on availability, that links to the position of the snippet text or to the nearest header above the snippet text. + snippet: + type: string + deprecated: true + description: A matching snippet from the document. Query term matches are marked by the unicode characters uE006 and uE007. Use 'text' field instead. + x-glean-deprecated: + id: e55ddf30-7c47-43a5-b775-d78f8b29411a + introduced: "2026-02-05" + message: Use 'text' field instead + removal: "2026-10-15" + x-includeEmpty: true + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use 'text' field instead" + example: + snippet: snippet + mimeType: mimeType + StructuredResult: + description: A single object that can support any object in the work graph. Only a single object will be populated. + properties: + document: + $ref: "#/components/schemas/Document" + person: + $ref: "#/components/schemas/Person" + customer: + $ref: "#/components/schemas/Customer" + team: + $ref: "#/components/schemas/Team" + customEntity: + $ref: "#/components/schemas/CustomEntity" + answer: + $ref: "#/components/schemas/Answer" + generatedQna: + $ref: "#/components/schemas/GeneratedQna" + extractedQnA: + $ref: "#/components/schemas/ExtractedQnA" + meeting: + $ref: "#/components/schemas/Meeting" + app: + $ref: "#/components/schemas/AppResult" + collection: + $ref: "#/components/schemas/Collection" + code: + $ref: "#/components/schemas/Code" + shortcut: + $ref: "#/components/schemas/Shortcut" + querySuggestions: + $ref: "#/components/schemas/QuerySuggestionList" + chat: + $ref: "#/components/schemas/ChatMetadata" + relatedDocuments: + type: array + items: + $ref: "#/components/schemas/RelatedDocuments" + description: A list of documents related to this structured result. + relatedQuestion: + $ref: "#/components/schemas/RelatedQuestion" + disambiguation: + $ref: "#/components/schemas/Disambiguation" + snippets: + description: Any snippets associated to the populated object. + type: array + items: + $ref: "#/components/schemas/SearchResultSnippet" + trackingToken: + type: string + description: An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. + prominence: + type: string + description: The level of visual distinction that should be given to a result. + x-enumDescriptions: + HERO: A high-confidence result that should feature prominently on the page. + PROMOTED: May not be the best result but should be given additional visual distinction. + STANDARD: Should not be distinct from any other results. + x-speakeasy-enum-descriptions: + HERO: A high-confidence result that should feature prominently on the page. + PROMOTED: May not be the best result but should be given additional visual distinction. + STANDARD: Should not be distinct from any other results. + enum: + - HERO + - PROMOTED + - STANDARD + source: + type: string + description: Source context for this result. Possible values depend on the result type. + enum: + - EXPERT_DETECTION + - ENTITY_NLQ + - CALENDAR_EVENT + - AGENT + Result: + properties: + structuredResults: + type: array + description: An array of entities in the work graph retrieved via a data request. + items: + $ref: "#/components/schemas/StructuredResult" + trackingToken: + type: string + description: An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. + ClusterTypeEnum: type: string - description: The plaintext content of the document. - Document: - properties: - id: - type: string - description: The Glean Document ID. - datasource: - type: string - description: The app or other repository type from which the document was extracted - connectorType: - $ref: "#/components/schemas/ConnectorType" - docType: - type: string - description: The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). - content: - $ref: "#/components/schemas/DocumentContent" - containerDocument: - $ref: "#/components/schemas/Document" - parentDocument: - $ref: "#/components/schemas/Document" - title: - type: string - description: The title of the document. - url: - type: string - description: A permalink for the document. - metadata: - $ref: "#/components/schemas/DocumentMetadata" - sections: - type: array - description: A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page. - items: - $ref: "#/components/schemas/DocumentSection" - SearchProviderInfo: - properties: - name: - type: string - description: Name of the search provider. - logoUrl: - type: string - description: URL to the provider's logo. - searchLinkUrlTemplate: - type: string - description: URL template that can be used to perform the suggested search by replacing the {query} placeholder with the query suggestion. - example: - name: Google - logo: https://app.glean.com/images/feather/globe.svg - searchLinkUrlTemplate: https://www.google.com/search?q={query}&hl=en - ResultTab: - properties: - id: - type: string - description: The unique ID of the tab. Can be passed in a search request to get results for that tab. - count: - type: integer - description: The number of results in this tab for the current query. - datasource: - type: string - description: The datasource associated with the tab, if any. - datasourceInstance: - type: string - description: The datasource instance associated with the tab, if any. - FacetFilterValue: - properties: - value: - type: string - example: Spreadsheet - relationType: - type: string - enum: - - EQUALS - - ID_EQUALS - - LT - - GT - - NOT_EQUALS - x-enumDescriptions: - EQUALS: The value is equal to the specified value. - ID_EQUALS: The value is equal to the specified ID. - LT: The value is less than the specified value. - GT: The value is greater than the specified value. - NOT_EQUALS: The value is not equal to the specified value. - example: EQUALS - x-speakeasy-enum-descriptions: - EQUALS: The value is equal to the specified value. - ID_EQUALS: The value is equal to the specified ID. - LT: The value is less than the specified value. - GT: The value is greater than the specified value. - NOT_EQUALS: The value is not equal to the specified value. - isNegated: - type: boolean - deprecated: true - description: DEPRECATED - please use relationType instead - x-glean-deprecated: - id: 75a48c79-b36a-4171-a0a0-4af7189da66e - introduced: "2026-02-05" - message: Use relationType instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use relationType instead" - FacetFilter: - properties: - fieldName: - type: string - example: owner - values: - type: array - items: - $ref: "#/components/schemas/FacetFilterValue" - description: Within a single FacetFilter, the values are to be treated like an OR. For example, fieldName type with values [EQUALS Presentation, EQUALS Spreadsheet] means we want to show a document if it's a Presentation OR a Spreadsheet. - groupName: - type: string - example: Spreadsheet - description: Indicates the value of a facet, if any, that the given facet is grouped under. This is only used for nested facets, for example, fieldName could be owner and groupName would be Spreadsheet if showing all owners for spreadsheets as a nested facet. - example: - fieldName: type - values: - - value: Spreadsheet - relationType: EQUALS - - value: Presentation - relationType: EQUALS - FacetFilterSet: - properties: - filters: - type: array - items: - $ref: "#/components/schemas/FacetFilter" - description: Within a single FacetFilterSet, the filters are treated as AND. For example, owner Sumeet and type Spreadsheet shows documents that are by Sumeet AND are Spreadsheets. - FacetBucketFilter: - properties: - facet: - type: string - description: The facet whose buckets should be filtered. - prefix: - type: string - description: The per-term prefix that facet buckets should be filtered on. - AuthToken: - required: - - accessToken - - datasource - properties: - accessToken: - type: string - datasource: - type: string - scope: - type: string - tokenType: - type: string - authUser: - description: Used by Google to indicate the index of the logged in user. Useful for generating hyperlinks that support multilogin. - type: string - expiration: - description: Unix timestamp when this token expires (in seconds since epoch UTC). - type: integer - format: int64 - example: - accessToken: 123abc - datasource: gmail - scope: email profile https://www.googleapis.com/auth/gmail.readonly - tokenType: Bearer - authUser: "1" - DocumentSpec: - x-multiple-discriminators: true - oneOf: - - type: object - required: - - url - properties: - url: - type: string - x-discriminator: true - description: The URL of the document. - - type: object - required: - - id - properties: - id: - type: string - x-discriminator: true - description: The ID of the document. - - type: object - required: - - contentId - - ugcType - properties: - ugcType: - type: string - enum: - - ANNOUNCEMENTS - - ANSWERS - - COLLECTIONS - - SHORTCUTS - - CHATS - description: The type of the user generated content (UGC datasource). - contentId: - type: integer - x-discriminator: true - description: The numeric id for user generated content. Used for ANNOUNCEMENTS, ANSWERS, COLLECTIONS, SHORTCUTS. - docType: - type: string - description: The specific type of the user generated content type. - - type: object - required: - - ugcType - - ugcId - properties: - ugcType: - type: string - enum: - - ANNOUNCEMENTS - - ANSWERS - - ARTIFACTS - - COLLECTIONS - - SHORTCUTS - - CHATS - description: The type of the user generated content (UGC datasource). - ugcId: - type: string - x-discriminator: true - description: The string id for user generated content. Used for CHATS. - docType: - type: string - description: The specific type of the user generated content type. - RestrictionFilters: - properties: - containerSpecs: - description: "Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections." - type: array - items: - $ref: "#/components/schemas/DocumentSpec" - SearchRequestOptions: - required: - - facetBucketSize - properties: - datasourceFilter: - type: string - description: Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. - datasourcesFilter: - type: array - items: + description: The reason for inclusion of clusteredResults. + enum: + - SIMILAR + - FRESHNESS + - TITLE + - CONTENT + - NONE + - THREAD_REPLY + - THREAD_ROOT + - PREFIX + - SUFFIX + - AUTHOR_PREFIX + - AUTHOR_SUFFIX + ClusterGroup: + required: + - visibleCountHint + properties: + clusteredResults: + type: array + description: A list of results that should be displayed as associated with this result. + items: + $ref: "#/components/schemas/SearchResult" + clusterType: + $ref: "#/components/schemas/ClusterTypeEnum" + visibleCountHint: + type: integer + description: The default number of results to display before truncating and showing a "see more" link + SearchResultProminenceEnum: type: string - description: Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. - queryOverridesFacetFilters: - type: boolean - description: If true, the operators in the query are taken to override any operators in facetFilters in the case of conflict. This is used to correctly set rewrittenFacetFilters and rewrittenQuery. - facetFilters: - type: array - items: - $ref: "#/components/schemas/FacetFilter" - description: A list of filters for the query. An AND is assumed between different facetFilters. For example, owner Sumeet and type Spreadsheet shows documents that are by Sumeet AND are Spreadsheets. - facetFilterSets: - type: array - items: - $ref: "#/components/schemas/FacetFilterSet" - description: A list of facet filter sets that will be OR'ed together. SearchRequestOptions where both facetFilterSets and facetFilters set are considered as bad request. Callers should set only one of these fields. - facetBucketFilter: - $ref: "#/components/schemas/FacetBucketFilter" - facetBucketSize: - type: integer - description: The maximum number of FacetBuckets to return in each FacetResult. - defaultFacets: - type: array - items: + description: | + The level of visual distinction that should be given to a result. + x-enumDescriptions: + HERO: A high-confidence result that should feature prominently on the page. + PROMOTED: May not be the best result but should be given additional visual distinction. + STANDARD: Should not be distinct from any other results. + x-speakeasy-enum-descriptions: + HERO: A high-confidence result that should feature prominently on the page. + PROMOTED: May not be the best result but should be given additional visual distinction. + STANDARD: Should not be distinct from any other results. + enum: + - HERO + - PROMOTED + - STANDARD + PinDocumentMutableProperties: + properties: + queries: + type: array + description: The query strings for which the pinned result will show. + items: + type: string + audienceFilters: + type: array + description: Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. + items: + $ref: "#/components/schemas/FacetFilter" + PinDocument: + allOf: + - $ref: "#/components/schemas/PinDocumentMutableProperties" + - type: object + required: + - documentId + properties: + id: + type: string + description: The opaque id of the pin. + documentId: + type: string + description: The document which should be a pinned result. + audienceFilters: + type: array + description: Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. + items: + $ref: "#/components/schemas/FacetFilter" + attribution: + $ref: "#/components/schemas/Person" + updatedBy: + $ref: "#/components/schemas/Person" + createTime: + type: string + format: date-time + updateTime: + type: string + format: date-time + PersonTeam: + description: Use `id` if you index teams via Glean, and use `name` and `externalLink` if you want to use your own team pages + properties: + id: + type: string + description: Unique identifier + name: + type: string + description: Team name + externalLink: + type: string + format: uri + description: Link to a team page on the internet or your company's intranet + relationship: + type: string + description: The team member's relationship to the team. This defaults to MEMBER if not set. + default: MEMBER + enum: + - MEMBER + - MANAGER + - LEAD + - POINT_OF_CONTACT + - OTHER + joinDate: + type: string + format: date-time + description: The team member's start date + StructuredLocation: + type: object + description: Detailed location with information about country, state, city etc. + properties: + deskLocation: + type: string + description: Desk number. + timezone: + type: string + description: Location's timezone, e.g. UTC, PST. + address: + type: string + description: Office address or name. + city: + type: string + description: Name of the city. + state: + type: string + description: State code. + region: + type: string + description: Region information, e.g. NORAM, APAC. + zipCode: + type: string + description: ZIP Code for the address. + country: + type: string + description: Country name. + countryCode: + type: string + description: Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA. + SocialNetwork: + required: + - name + - profileUrl + properties: + name: + type: string + description: Possible values are "twitter", "linkedin". + profileName: + type: string + description: Human-readable profile name. + profileUrl: + type: string + format: url + description: Link to profile. + PersonDistance: + required: + - name + - obfuscatedId + - distance + properties: + name: + type: string + description: The display name. + obfuscatedId: + type: string + description: An opaque identifier that can be used to request metadata for a Person. + distance: + type: number + format: float + description: Distance to person, refer to PeopleDistance pipeline on interpretation of the value. + CommunicationChannel: type: string - description: Facets for which FacetResults should be fetched and that don't apply to a particular datasource. If specified, these values will replace the standard default facets (last_updated_at, from, etc.). The requested facets will be returned alongside datasource-specific facets if searching a single datasource. - authTokens: - type: array - description: Auth tokens which may be used for non-indexed, federated results (e.g. Gmail). - items: - $ref: "#/components/schemas/AuthToken" - fetchAllDatasourceCounts: - type: boolean - description: Hints that the QE should return result counts (via the datasource facet result) for all supported datasources, rather than just those specified in the datasource[s]Filter - responseHints: - type: array - description: Array of hints containing which fields should be populated in the response. - items: + enum: + - COMMUNICATION_CHANNEL_EMAIL + - COMMUNICATION_CHANNEL_SLACK + ChannelInviteInfo: + description: Information regarding the invite status of a person for a particular channel. + properties: + channel: + description: Channel through which the invite was sent + $ref: "#/components/schemas/CommunicationChannel" + isAutoInvite: + description: Bit that tracks if this invite was automatically sent or user-sent + type: boolean + inviter: + description: The person that invited this person. + $ref: "#/components/schemas/Person" + inviteTime: + type: string + format: date-time + description: The time this person was invited in ISO format (ISO 8601). + reminderTime: + type: string + format: date-time + description: The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. + InviteInfo: + description: Information regarding the invite status of a person. + properties: + signUpTime: + type: string + format: date-time + description: The time this person signed up in ISO format (ISO 8601). + invites: + type: array + items: + $ref: "#/components/schemas/ChannelInviteInfo" + description: Latest invites received by the user for each channel + inviter: + deprecated: true + description: The person that invited this person. + $ref: "#/components/schemas/Person" + x-glean-deprecated: + id: 1d3cd23f-9085-4378-b466-9bdc2e344a71 + introduced: "2026-02-05" + message: Use ChannelInviteInfo instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" + inviteTime: + deprecated: true + type: string + format: date-time + description: The time this person was invited in ISO format (ISO 8601). + x-glean-deprecated: + id: 2dc3f572-cded-483d-af07-fc9fc7fd0ae4 + introduced: "2026-02-05" + message: Use ChannelInviteInfo instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" + reminderTime: + deprecated: true + type: string + format: date-time + description: The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. + x-glean-deprecated: + id: d02d58cf-eb90-45d0-ab90-f7a9d707ae3c + introduced: "2026-02-05" + message: Use ChannelInviteInfo instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" + ReadPermission: + description: Describes the read permission level that a user has for a specific feature + properties: + scopeType: + $ref: "#/components/schemas/ScopeType" + ReadPermissions: + description: Describes the read permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject + additionalProperties: + type: array + description: List of read permissions (for different scopes but same feature) + items: + $ref: "#/components/schemas/ReadPermission" + WritePermissions: + description: Describes the write permissions levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject + additionalProperties: + type: array + description: List of write permissions (for different scopes but same feature) + items: + $ref: "#/components/schemas/WritePermission" + GrantPermission: + description: Describes the grant permission level that a user has for a specific feature + properties: + scopeType: + $ref: "#/components/schemas/ScopeType" + GrantPermissions: + description: Describes the grant permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject + additionalProperties: + type: array + description: List of grant permissions (for different scopes but same feature) + items: + $ref: "#/components/schemas/GrantPermission" + Permissions: + description: |- + Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. + When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes. + properties: + canAdminSearch: + type: boolean + description: TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch + canAdminClientApiGlobalTokens: + type: boolean + description: TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope + canDlp: + type: boolean + description: TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features + read: + $ref: "#/components/schemas/ReadPermissions" + write: + $ref: "#/components/schemas/WritePermissions" + grant: + $ref: "#/components/schemas/GrantPermissions" + role: + type: string + description: The roleId of the canonical role a user has. The displayName is equal to the roleId. + roles: + type: array + description: The roleIds of the roles a user has. + items: + type: string + TimeInterval: + required: + - start + - end + properties: + start: + type: string + description: The RFC3339 timestamp formatted start time of this event. + end: + type: string + description: The RFC3339 timestamp formatted end time of this event. + AnonymousEvent: + description: A generic, light-weight calendar event. + type: object + properties: + time: + $ref: "#/components/schemas/TimeInterval" + eventType: + description: The nature of the event, for example "out of office". + type: string + enum: + - DEFAULT + - OUT_OF_OFFICE + Badge: + type: object + description: Displays a user's accomplishment or milestone + properties: + key: + type: string + description: An auto generated unique identifier. + displayName: + type: string + description: The badge name displayed to users + iconConfig: + $ref: "#/components/schemas/IconConfig" + pinned: + type: boolean + description: The badge should be shown on the PersonAttribution + example: + key: deployment_name_new_hire + displayName: New hire + iconConfig: + color: "#343CED" + key: person_icon + iconType: GLYPH + name: user + PersonMetadata: + properties: + type: + type: string + x-enumDescriptions: + FULL_TIME: The person is a current full-time employee of the company. + CONTRACTOR: The person is a current contractor of the company. + NON_EMPLOYEE: The person object represents a non-human actor such as a service or admin account. + FORMER_EMPLOYEE: The person is a previous employee of the company. + x-speakeasy-enum-descriptions: + FULL_TIME: The person is a current full-time employee of the company. + CONTRACTOR: The person is a current contractor of the company. + NON_EMPLOYEE: The person object represents a non-human actor such as a service or admin account. + FORMER_EMPLOYEE: The person is a previous employee of the company. + enum: + - FULL_TIME + - CONTRACTOR + - NON_EMPLOYEE + - FORMER_EMPLOYEE + example: FULL_TIME + firstName: + type: string + description: The first name of the person + lastName: + type: string + description: The last name of the person + title: + type: string + description: Job title. + businessUnit: + type: string + description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + department: + type: string + description: An organizational unit where everyone has a similar task, e.g. `Engineering`. + teams: + description: Info about the employee's team(s). + type: array + items: + $ref: "#/components/schemas/PersonTeam" + departmentCount: + type: integer + description: The number of people in this person's department. + email: + type: string + description: The user's primary email address + aliasEmails: + type: array + description: Additional email addresses of this user beyond the primary, if any. + items: + type: string + location: + type: string + description: User facing string representing the person's location. + structuredLocation: + $ref: "#/components/schemas/StructuredLocation" + externalProfileLink: + type: string + description: Link to a customer's internal profile page. This is set to '#' when no link is desired. + manager: + $ref: "#/components/schemas/Person" + managementChain: + description: The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager. + type: array + items: + $ref: "#/components/schemas/Person" + phone: + type: string + description: Phone number as a number string. + timezone: + type: string + description: The timezone of the person. E.g. "Pacific Daylight Time". + timezoneOffset: + type: integer + format: int64 + description: The offset of the person's timezone in seconds from UTC. + timezoneIANA: + type: string + description: The IANA timezone identifier, e.g. "America/Los_Angeles". + photoUrl: + type: string + format: url + description: The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + uneditedPhotoUrl: + type: string + format: url + description: The original photo URL of the person's avatar before any edits they made are applied + bannerUrl: + type: string + format: url + description: The URL of the person's banner photo. + reports: + type: array + items: + $ref: "#/components/schemas/Person" + startDate: + type: string + description: The date when the employee started. + format: date + endDate: + type: string + format: date + description: If a former employee, the last date of employment. + bio: + type: string + description: Short biography or mission statement of the employee. + pronoun: + type: string + description: She/her, He/his or other pronoun. + orgSizeCount: + type: integer + description: The total recursive size of the people reporting to this person, or 1 + directReportsCount: + type: integer + description: The total number of people who directly report to this person, or 0 + preferredName: + type: string + description: The preferred name of the person, or a nickname. + socialNetwork: + description: List of social network profiles. + type: array + items: + $ref: "#/components/schemas/SocialNetwork" + datasourceProfile: + type: array + description: List of profiles this user has in different datasources / tools that they use. + items: + $ref: "#/components/schemas/DatasourceProfile" + querySuggestions: + $ref: "#/components/schemas/QuerySuggestionList" + peopleDistance: + type: array + items: + $ref: "#/components/schemas/PersonDistance" + description: List of people and distances to those people from this person. Optionally with metadata. + inviteInfo: + $ref: "#/components/schemas/InviteInfo" + isSignedUp: + type: boolean + description: Whether the user has signed into Glean at least once. + lastExtensionUse: + type: string + format: date-time + description: The last time the user has used the Glean extension in ISO 8601 format. + permissions: + $ref: "#/components/schemas/Permissions" + customFields: + type: array + description: User customizable fields for additional people information. + items: + $ref: "#/components/schemas/CustomFieldData" + loggingId: + type: string + description: The logging id of the person used in scrubbed logs, tracking GA metrics. + startDatePercentile: + type: number + format: float + description: Percentage of the company that started strictly after this person. Between [0,100). + busyEvents: + type: array + items: + $ref: "#/components/schemas/AnonymousEvent" + description: Intervals of busy time for this person, along with the type of event they're busy with. + profileBoolSettings: + type: object + additionalProperties: + type: boolean + description: flag settings to indicate user profile settings for certain items + badges: + type: array + items: + $ref: "#/components/schemas/Badge" + description: The badges that a user has earned over their lifetime. + isOrgRoot: + type: boolean + description: Whether this person is a "root" node in their organization's hierarchy. + example: + department: Movies + email: george@example.com + location: Hollywood, CA + phone: 6505551234 + photoUrl: https://example.com/george.jpg + startDate: "2000-01-23" + title: Actor + DocumentVisibility: type: string - description: Hints for the response content. + description: The level of visibility of the document as understood by our system. x-enumDescriptions: - ALL_RESULT_COUNTS: Return result counts for each result set which has non-zero results, even when the request itself is limited to a subset. - FACET_RESULTS: Return only facet results. - QUERY_METADATA: Returns result counts for each result set which has non-zero results, as well as other information about the search such as suggested spelling corrections. - RESULTS: Return search result documents. - SPELLCHECK_METADATA: Return metadata pertaining to spellcheck results. - enum: - - ALL_RESULT_COUNTS - - FACET_RESULTS - - QUERY_METADATA - - RESULTS - - SPELLCHECK_METADATA + PRIVATE: Only one person is able to see the document. + SPECIFIC_PEOPLE_AND_GROUPS: Only specific people and/or groups can see the document. + DOMAIN_LINK: Anyone in the domain with the link can see the document. + DOMAIN_VISIBLE: Anyone in the domain can search for the document. + PUBLIC_LINK: Anyone with the link can see the document. + PUBLIC_VISIBLE: Anyone on the internet can search for the document. x-speakeasy-enum-descriptions: - ALL_RESULT_COUNTS: Return result counts for each result set which has non-zero results, even when the request itself is limited to a subset. - FACET_RESULTS: Return only facet results. - QUERY_METADATA: Returns result counts for each result set which has non-zero results, as well as other information about the search such as suggested spelling corrections. - RESULTS: Return search result documents. - SPELLCHECK_METADATA: Return metadata pertaining to spellcheck results. - timezoneOffset: - type: integer - description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. - disableSpellcheck: - type: boolean - description: Whether or not to disable spellcheck. - disableQueryAutocorrect: - type: boolean - description: Disables automatic adjustment of the input query for spelling corrections or other reasons. - returnLlmContentOverSnippets: - type: boolean - description: Enables expanded content to be returned for LLM usage. The size of content per result returned should be modified using maxSnippetSize. Server may return less or more than what is specified in maxSnippetSize. For more details, see https://developers.glean.com/guides/search/llm-content. - inclusions: - $ref: "#/components/schemas/RestrictionFilters" - description: A list of filters which restrict the search results to only the specified content. - exclusions: - $ref: "#/components/schemas/RestrictionFilters" - description: A list of filters specifying content to avoid getting search results from. Exclusions take precendence over inclusions and other query parameters, such as search operators and search facets. - example: - datasourceFilter: JIRA - datasourcesFilter: - - JIRA - queryOverridesFacetFilters: true - facetFilters: - - fieldName: fieldName - values: - - fieldValues - - fieldValues - - fieldName: fieldName - values: - - fieldValues - - fieldValues - TextRange: - required: - - startIndex - description: A subsection of a given string to which some special formatting should be applied. - properties: - startIndex: - type: integer - description: The inclusive start index of the range. - endIndex: - type: integer - description: The exclusive end index of the range. - type: - type: string - enum: - - BOLD - - CITATION - - HIGHLIGHT - - LINK - url: - type: string - description: The URL associated with the range, if applicable. For example, the linked URL for a LINK range. - document: - $ref: "#/components/schemas/Document" - description: A document corresponding to the range, if applicable. For example, the cited document for a CITATION range. - SearchRequestInputDetails: - properties: - hasCopyPaste: - type: boolean - description: Whether the associated query was at least partially copy-pasted. If subsequent requests are issued after a copy-pasted query is constructed (e.g. with facet modifications), this bit should continue to be set for those requests. - example: - hasCopyPaste: true - QuerySuggestion: - required: - - query - properties: - missingTerm: - type: string - description: A query term missing from the original query on which this suggestion is based. - query: - type: string - description: The query being suggested (e.g. enforcing the missing term from the original query). - searchProviderInfo: - $ref: "#/components/schemas/SearchProviderInfo" - description: Information about the search provider that generated this suggestion. - label: - type: string - description: A user-facing description to display for the suggestion. - datasource: - type: string - description: The datasource associated with the suggestion. - resultTab: - $ref: "#/components/schemas/ResultTab" - description: The result tab associated with the suggestion. - requestOptions: - $ref: "#/components/schemas/SearchRequestOptions" - ranges: - type: array - items: - $ref: "#/components/schemas/TextRange" - description: The bolded ranges within the query of the QuerySuggestion. - inputDetails: - $ref: "#/components/schemas/SearchRequestInputDetails" - example: - query: app:github type:pull author:mortimer - label: Mortimer's PRs - datasource: github - Person: - required: - - name - - obfuscatedId - properties: - name: - type: string - description: The display name. - obfuscatedId: - type: string - description: An opaque identifier that can be used to request metadata for a Person. - relatedDocuments: - type: array - items: - $ref: "#/components/schemas/RelatedDocuments" - description: A list of documents related to this person. - metadata: - $ref: "#/components/schemas/PersonMetadata" - example: - name: George Clooney - obfuscatedId: abc123 - Company: - required: - - name - properties: - name: - type: string - description: User-friendly display name. - profileUrl: - type: string - description: Link to internal company company profile. - websiteUrls: - type: array - description: Link to company's associated websites. - items: - type: string - logoUrl: - type: string - description: The URL of the company's logo. Public, Glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - location: - type: string - description: User facing string representing the company's location. - example: New York City - phone: - type: string - description: Phone number as a number string. - fax: - type: string - description: Fax number as a number string. - industry: - type: string - description: User facing string representing the company's industry. - example: Finances - annualRevenue: - type: number - format: double - description: Average company's annual revenue for reference. - numberOfEmployees: - type: integer - format: int64 - description: Average company's number of employees for reference. - stockSymbol: - type: string - description: Company's stock symbol if company is public. - foundedDate: - type: string - format: date - description: The date when the company was founded. - about: - type: string - description: User facing description of company. - example: Financial, software, data, and media company headquartered in Midtown Manhattan, New York City - DocumentCounts: - type: object - description: A map of {string, int} pairs representing counts of each document type associated with this customer. - additionalProperties: - type: integer - CustomDataValue: - properties: - displayLabel: - type: string - stringValue: - type: string - stringListValue: - type: array - description: list of strings for multi-value properties - items: + PRIVATE: Only one person is able to see the document. + SPECIFIC_PEOPLE_AND_GROUPS: Only specific people and/or groups can see the document. + DOMAIN_LINK: Anyone in the domain with the link can see the document. + DOMAIN_VISIBLE: Anyone in the domain can search for the document. + PUBLIC_LINK: Anyone with the link can see the document. + PUBLIC_VISIBLE: Anyone on the internet can search for the document. + enum: + - PRIVATE + - SPECIFIC_PEOPLE_AND_GROUPS + - DOMAIN_LINK + - DOMAIN_VISIBLE + - PUBLIC_LINK + - PUBLIC_VISIBLE + Reaction: + properties: + type: + type: string + count: + type: integer + description: The count of the reaction type on the document. + reactors: + type: array + items: + $ref: "#/components/schemas/Person" + reactedByViewer: + type: boolean + description: Whether the user in context reacted with this type to the document. + Share: + description: Search endpoint will only fill out numDays ago since that's all we need to display shared badge; docmetadata endpoint will fill out all the fields so that we can display shared badge tooltip + required: + - numDaysAgo + properties: + numDaysAgo: + type: integer + description: The number of days that has passed since the share happened + sharer: + $ref: "#/components/schemas/Person" + sharingDocument: + $ref: "#/components/schemas/Document" + DocumentInteractions: + properties: + numComments: + type: integer + description: The count of comments (thread replies in the case of slack). + numReactions: + type: integer + description: The count of reactions on the document. + reactions: + type: array + description: To be deprecated in favor of reacts. A (potentially non-exhaustive) list of reactions for the document. + deprecated: true + items: + type: string + x-glean-deprecated: + id: cd754845-6eec-480f-b395-c93478aff563 + introduced: "2026-02-05" + message: Use reacts instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use reacts instead" + reacts: + type: array + items: + $ref: "#/components/schemas/Reaction" + shares: + type: array + items: + $ref: "#/components/schemas/Share" + description: Describes instances of someone posting a link to this document in one of our indexed datasources. + visitorCount: + $ref: "#/components/schemas/CountInfo" + ViewerInfo: + properties: + role: + type: string + enum: + - ANSWER_MODERATOR + - OWNER + - VIEWER + description: DEPRECATED - use permissions instead. Viewer's role on the specific document. + deprecated: true + x-glean-deprecated: + - id: fbc55efe-3e6c-485c-8b60-bab574c3813b + introduced: "2026-02-05" + kind: property + message: Use permissions instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use permissions instead" + lastViewedTime: + type: string + format: date-time + IndexStatus: + properties: + lastCrawledTime: + description: When the document was last crawled + type: string + format: date-time + lastIndexedTime: + description: When the document was last indexed + type: string + format: date-time + DocumentMetadata: + properties: + datasource: + type: string + datasourceInstance: + type: string + description: The datasource instance from which the document was extracted. + objectType: + type: string + description: The type of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). + container: + type: string + description: The name of the container (higher level parent, not direct parent) of the result. Interpretation is specific to each datasource (e.g. Channels for Slack, Project for Jira). cf. parentId + containerId: + type: string + description: The Glean Document ID of the container. Uniquely identifies the container. + superContainerId: + type: string + description: The Glean Document ID of the super container. Super container represents a broader abstraction that contains many containers. For example, whereas container might refer to a folder, super container would refer to a drive. + parentId: + type: string + description: The id of the direct parent of the result. Interpretation is specific to each datasource (e.g. parent issue for Jira). cf. container + mimeType: + type: string + documentId: + type: string + description: The index-wide unique identifier. + loggingId: + type: string + description: A unique identifier used to represent the document in any logging or feedback requests in place of documentId. + documentIdHash: + type: string + description: Hash of the Glean Document ID. + createTime: + type: string + format: date-time + updateTime: + type: string + format: date-time + author: + $ref: "#/components/schemas/Person" + owner: + $ref: "#/components/schemas/Person" + mentionedPeople: + type: array + items: + $ref: "#/components/schemas/Person" + description: A list of people mentioned in the document. + visibility: + $ref: "#/components/schemas/DocumentVisibility" + components: + type: array + description: A list of components this result is associated with. Interpretation is specific to each datasource. (e.g. for Jira issues, these are [components](https://confluence.atlassian.com/jirasoftwarecloud/organizing-work-with-components-764478279.html).) + items: + type: string + status: + type: string + description: The status or disposition of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue status such as Done, In Progress or Will Not Fix). + statusCategory: + type: string + description: The status category of the result. Meant to be more general than status. Interpretation is specific to each datasource. + pins: + type: array + description: A list of stars associated with this result. "Pin" is an older name. + items: + $ref: "#/components/schemas/PinDocument" + priority: + type: string + description: The document priority. Interpretation is datasource specific. + assignedTo: + $ref: "#/components/schemas/Person" + updatedBy: + $ref: "#/components/schemas/Person" + labels: + type: array + description: A list of tags for the document. Interpretation is datasource specific. + items: + type: string + collections: + type: array + description: A list of collections that the document belongs to. + items: + $ref: "#/components/schemas/Collection" + datasourceId: + type: string + description: The user-visible datasource specific id (e.g. Salesforce case number for example, GitHub PR number). + interactions: + $ref: "#/components/schemas/DocumentInteractions" + verification: + $ref: "#/components/schemas/Verification" + viewerInfo: + $ref: "#/components/schemas/ViewerInfo" + permissions: + $ref: "#/components/schemas/ObjectPermissions" + visitCount: + $ref: "#/components/schemas/CountInfo" + shortcuts: + type: array + description: A list of shortcuts of which destination URL is for the document. + items: + $ref: "#/components/schemas/Shortcut" + path: + type: string + description: For file datasources like onedrive/github etc this has the path to the file + customData: + $ref: "#/components/schemas/CustomData" + documentCategory: + type: string + description: The document's document_category(.proto). + contactPerson: + $ref: "#/components/schemas/Person" + thumbnail: + $ref: "#/components/schemas/Thumbnail" + description: A thumbnail image representing this document. + indexStatus: + $ref: "#/components/schemas/IndexStatus" + ancestors: + type: array + description: A list of documents that are ancestors of this document in the hierarchy of the document's datasource, for example parent folders or containers. Ancestors can be of different types and some may not be indexed. Higher level ancestors appear earlier in the list. + items: + $ref: "#/components/schemas/Document" + example: + container: container + parentId: JIRA_EN-1337 + createTime: "2000-01-23T04:56:07.000Z" + datasource: datasource + author: + name: name + documentId: documentId + updateTime: "2000-01-23T04:56:07.000Z" + mimeType: mimeType + objectType: Feature Request + components: + - Backend + - Networking + status: + - Done + customData: + someCustomField: someCustomValue + DocumentSection: + type: object + properties: + title: + type: string + description: The title of the document section (e.g. the section header). + url: + type: string + description: The permalink of the document section. + StructuredTextItem: + properties: + link: + type: string + example: https://en.wikipedia.org/wiki/Diffuse_sky_radiation + document: + deprecated: true + description: Deprecated. To be gradually migrated to structuredResult. + $ref: "#/components/schemas/Document" + text: + type: string + example: Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue. + structuredResult: + $ref: "#/components/schemas/StructuredResult" + AnnouncementMutableProperties: + properties: + startTime: + type: string + format: date-time + description: The date and time at which the announcement becomes active. + endTime: + type: string + format: date-time + description: The date and time at which the announcement expires. + title: + type: string + description: The headline of the announcement. + body: + $ref: "#/components/schemas/StructuredText" + emoji: + type: string + description: An emoji used to indicate the nature of the announcement. + thumbnail: + $ref: "#/components/schemas/Thumbnail" + banner: + $ref: "#/components/schemas/Thumbnail" + description: Optional variant of thumbnail cropped for header background. + audienceFilters: + type: array + description: Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. + items: + $ref: "#/components/schemas/FacetFilter" + sourceDocumentId: + type: string + description: The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). + hideAttribution: + type: boolean + description: Whether or not to hide an author attribution. + channel: + type: string + enum: + - MAIN + - SOCIAL_FEED + description: This determines whether this is a Social Feed post or a regular announcement. + postType: + type: string + enum: + - TEXT + - LINK + description: This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. + isPrioritized: + type: boolean + description: Used by the Social Feed to pin posts to the front of the feed. + viewUrl: + type: string + description: URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". + CreateAnnouncementRequest: + allOf: + - $ref: "#/components/schemas/AnnouncementMutableProperties" + - type: object + required: + - title + - startTime + - endTime + DraftProperties: + properties: + draftId: + type: integer + description: The opaque id of the associated draft. + example: + draftId: 342 + Announcement: + allOf: + - $ref: "#/components/schemas/AnnouncementMutableProperties" + - $ref: "#/components/schemas/DraftProperties" + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/UgcTrackingSignals" + - type: object + properties: + id: + type: integer + description: The opaque id of the announcement. + author: + $ref: "#/components/schemas/Person" + createTimestamp: + type: integer + description: Server Unix timestamp of the creation time (in seconds since epoch UTC). + lastUpdateTimestamp: + type: integer + description: Server Unix timestamp of the last update time (in seconds since epoch UTC). + updatedBy: + $ref: "#/components/schemas/Person" + viewerInfo: + type: object + properties: + isDismissed: + type: boolean + description: Whether the viewer has dismissed the announcement. + isRead: + type: boolean + description: Whether the viewer has read the announcement. + sourceDocument: + $ref: "#/components/schemas/Document" + description: The source document if the announcement is created from one. + isPublished: + type: boolean + description: Whether or not the announcement is published. + DeleteAnnouncementRequest: + required: + - id + properties: + id: + type: integer + description: The opaque id of the announcement to be deleted. + UpdateAnnouncementRequest: + allOf: + - $ref: "#/components/schemas/AnnouncementMutableProperties" + - type: object + required: + - id + - title + - startTime + - endTime + properties: + id: + type: integer + description: The opaque id of the announcement. + AddedCollections: + properties: + addedCollections: + type: array + items: + type: integer + description: IDs of Collections to which a document is added. + AnswerCreationData: + allOf: + - $ref: "#/components/schemas/AnswerMutableProperties" + - $ref: "#/components/schemas/AddedCollections" + - type: object + properties: + combinedAnswerText: + $ref: "#/components/schemas/StructuredTextMutableProperties" + CreateAnswerRequest: + required: + - data + properties: + data: + $ref: "#/components/schemas/AnswerCreationData" + DeleteAnswerRequest: + allOf: + - $ref: "#/components/schemas/AnswerId" + - $ref: "#/components/schemas/AnswerDocId" + - type: object + required: + - id + RemovedCollections: + properties: + removedCollections: + type: array + items: + type: integer + description: IDs of Collections from which a document is removed. + EditAnswerRequest: + allOf: + - $ref: "#/components/schemas/AnswerId" + - $ref: "#/components/schemas/AnswerDocId" + - $ref: "#/components/schemas/AnswerMutableProperties" + - $ref: "#/components/schemas/AddedCollections" + - $ref: "#/components/schemas/RemovedCollections" + - type: object + required: + - id + properties: + combinedAnswerText: + $ref: "#/components/schemas/StructuredTextMutableProperties" + GetAnswerRequest: + allOf: + - $ref: "#/components/schemas/AnswerId" + - $ref: "#/components/schemas/AnswerDocId" + AnswerResult: + required: + - answer + properties: + answer: + $ref: "#/components/schemas/Answer" + trackingToken: + type: string + description: Use `answer.trackingToken` instead. + deprecated: true + x-glean-deprecated: + id: 62de643b-f182-4d4d-a2fc-5e2cbfee7320 + introduced: "2026-05-07" + message: Use `answer.trackingToken` instead. + removal: "2027-01-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-05-07, removal scheduled for 2027-01-15: Use `answer.trackingToken` instead." + GetAnswerError: + properties: + errorType: + type: string + enum: + - NO_PERMISSION + - INVALID_ID + answerAuthor: + $ref: "#/components/schemas/Person" + GetAnswerResponse: + properties: + answerResult: + $ref: "#/components/schemas/AnswerResult" + error: + $ref: "#/components/schemas/GetAnswerError" + ListAnswersRequest: + properties: + boardId: + type: integer + description: The Answer Board Id to list answers on. + ListAnswersResponse: + required: + - answers + - answerResults + properties: + answerResults: + type: array + items: + $ref: "#/components/schemas/AnswerResult" + description: List of answers with tracking tokens. + AuthStatus: type: string - numberValue: - type: number - booleanValue: - type: boolean - CustomData: - type: object - description: Custom fields specific to individual datasources - additionalProperties: - $ref: "#/components/schemas/CustomDataValue" - CustomerMetadata: - properties: - datasourceId: - type: string - description: The user visible id of the salesforce customer account. - customData: - $ref: "#/components/schemas/CustomData" - Customer: - required: - - id - - company - properties: - id: - type: string - description: Unique identifier. - domains: - type: array - description: Link to company's associated website domains. - items: + 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: + required: + - unauthorizedDatasourceInstances + properties: + unauthorizedDatasourceInstances: + type: array + description: | + Datasource instances that require per-user OAuth authorization. Empty when all datasources are authorized. + items: + $ref: "#/components/schemas/UnauthorizedDatasourceInstance" + CreateAuthTokenResponse: + required: + - token + - expirationTime + properties: + token: + type: string + description: An authentication token that can be passed to any endpoint via Bearer Authentication + expirationTime: + description: Unix timestamp for when this token expires (in seconds since epoch UTC). + type: integer + format: int64 + ToolSets: + type: object + description: The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values + properties: + enableWebSearch: + type: boolean + description: "Whether the agent is allowed to use web search (default: true)." + enableCompanyTools: + type: boolean + description: "Whether the agent is allowed to search internal company resources (default: true)." + AgentConfig: + description: Describes the agent that executes the request. + properties: + agent: + type: string + description: Name of the agent. + x-enumDescriptions: + DEFAULT: Integrates with your company's knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values + GPT: Communicates directly with the LLM. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values + UNIVERSAL: Uses both company and web knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values + FAST: Uses an agent powered by the agentic engine that responds faster but may have lower quality results. Requires the agentic engine to be enabled in the deployment. + ADVANCED: Uses an agent powered by the agentic engine that thinks for longer and potentially makes more LLM calls to return higher quality results. Requires the agentic engine to be enabled in the deployment. + AUTO: Uses an agent powered by the agentic engine that routes between reasoning efforts based on the question and context. + x-speakeasy-enum-descriptions: + DEFAULT: Integrates with your company's knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values + GPT: Communicates directly with the LLM. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values + UNIVERSAL: Uses both company and web knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values + FAST: Uses an agent powered by the agentic engine that responds faster but may have lower quality results. Requires the agentic engine to be enabled in the deployment. + ADVANCED: Uses an agent powered by the agentic engine that thinks for longer and potentially makes more LLM calls to return higher quality results. Requires the agentic engine to be enabled in the deployment. + AUTO: Uses an agent powered by the agentic engine that routes between reasoning efforts based on the question and context. + enum: + - DEFAULT + - GPT + - UNIVERSAL + - FAST + - ADVANCED + - AUTO + toolSets: + $ref: "#/components/schemas/ToolSets" + mode: + type: string + description: Top level modes to run GleanChat in. + x-enumDescriptions: + DEFAULT: Used if no mode supplied. + QUICK: Deprecated. + x-speakeasy-enum-descriptions: + DEFAULT: Used if no mode supplied. + QUICK: Deprecated. + enum: + - DEFAULT + - QUICK + useImageGeneration: + type: boolean + description: Whether the agent should create an image. + ChatFileStatus: type: string - company: - $ref: "#/components/schemas/Company" - documentCounts: - $ref: "#/components/schemas/DocumentCounts" - poc: - type: array - description: A list of POC for company. - items: - $ref: "#/components/schemas/Person" - metadata: - $ref: "#/components/schemas/CustomerMetadata" - mergedCustomers: - type: array - description: A list of Customers. - items: - $ref: "#/components/schemas/Customer" - startDate: - type: string - format: date - description: The date when the interaction with customer started. - contractAnnualRevenue: - type: number - format: double - description: Average contract annual revenue with that customer. - notes: - type: string - description: User facing (potentially generated) notes about company. - example: CIO is interested in trying out the product. - RelatedObject: - required: - - id - properties: - id: - type: string - description: The ID of the related object - metadata: - type: object - description: Some metadata of the object which can be displayed, while not having the actual object. - properties: - name: - type: string - description: Placeholder name of the object, not the relationship. - RelatedObjectEdge: - properties: - objects: - type: array - items: - $ref: "#/components/schemas/RelatedObject" - RelatedObjects: - properties: - relatedObjects: - type: object - description: A list of objects related to a source object. - additionalProperties: - $ref: "#/components/schemas/RelatedObjectEdge" - ScopeType: - type: string - description: Describes the scope for a ReadPermission, WritePermission, or GrantPermission object - enum: - - GLOBAL - - OWN - WritePermission: - description: Describes the write permissions levels that a user has for a specific feature - properties: - scopeType: - $ref: "#/components/schemas/ScopeType" - create: - type: boolean - description: True if user has create permission for this feature and scope - update: - type: boolean - description: True if user has update permission for this feature and scope - delete: - type: boolean - description: True if user has delete permission for this feature and scope - ObjectPermissions: - properties: - write: - $ref: "#/components/schemas/WritePermission" - PermissionedObject: - properties: - permissions: - $ref: "#/components/schemas/ObjectPermissions" - description: The permissions the current viewer has with respect to a particular object. - PersonToTeamRelationship: - required: - - person - type: object - description: Metadata about the relationship of a person to a team. - properties: - person: - $ref: "#/components/schemas/Person" - relationship: - type: string - description: The team member's relationship to the team. This defaults to MEMBER if not set. - default: MEMBER - enum: - - MEMBER - - MANAGER - - LEAD - - POINT_OF_CONTACT - - OTHER - customRelationshipStr: - type: string - description: Displayed name for the relationship if relationship is set to `OTHER`. - joinDate: - type: string - format: date-time - description: The team member's start date - TeamEmail: - properties: - email: - type: string - format: email - description: An email address - type: - type: string - default: OTHER - description: An enum of `PRIMARY`, `SECONDARY`, `ONCALL`, `OTHER` - type: object - required: - - email - - type - description: Information about a team's email - CustomFieldValueStr: - properties: - strText: - type: string - description: Text field for string value. - CustomFieldValueHyperlink: - properties: - urlAnchor: - type: string - description: Anchor text for hyperlink. - urlLink: - type: string - description: Link for this URL. - CustomFieldValuePerson: - properties: - person: - $ref: "#/components/schemas/Person" - CustomFieldValue: - oneOf: - - $ref: "#/components/schemas/CustomFieldValueStr" - - $ref: "#/components/schemas/CustomFieldValueHyperlink" - - $ref: "#/components/schemas/CustomFieldValuePerson" - CustomFieldData: - required: - - label - - values - - displayable - properties: - label: - type: string - description: A user-facing label for this field. - values: - type: array - items: - $ref: "#/components/schemas/CustomFieldValue" - displayable: - type: boolean - description: Determines whether the client should display this custom field - default: true - DatasourceProfile: - required: - - datasource - - handle - properties: - datasource: - type: string - example: github - description: The datasource the profile is of. - handle: - type: string - description: The display name of the entity in the given datasource. - url: - type: string - description: URL to view the entity's profile. - nativeAppUrl: - type: string - description: A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...). - isUserGenerated: - type: boolean - description: For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source) - Team: - allOf: - - $ref: "#/components/schemas/RelatedObjects" - - $ref: "#/components/schemas/PermissionedObject" - - type: object - required: - - id - - name - properties: - id: - type: string - description: Unique identifier - name: - type: string - description: Team name - description: - type: string - description: A description of the team - businessUnit: - type: string - description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. - department: - type: string - description: An organizational unit where everyone has a similar task, e.g. `Engineering`. - photoUrl: - type: string - format: url - description: A link to the team's photo. - bannerUrl: - type: string - format: url - description: A link to the team's banner photo. - externalLink: - type: string - format: uri - description: Link to a team page on the internet or your company's intranet - members: - type: array - description: The members on this team - items: - $ref: "#/components/schemas/PersonToTeamRelationship" - memberCount: - type: integer - description: Number of members on this team (recursive; includes all individuals that belong to this team, and all individuals that belong to a subteam within this team) - emails: - type: array - description: The emails for this team - items: - $ref: "#/components/schemas/TeamEmail" - customFields: - type: array - description: Customizable fields for additional team information. - items: - $ref: "#/components/schemas/CustomFieldData" - datasourceProfiles: - type: array - description: The datasource profiles of the team - items: - $ref: "#/components/schemas/DatasourceProfile" - datasource: - type: string - description: the data source of the team, e.g. GDRIVE - createdFrom: - type: string - description: For teams created from docs, the doc title. Otherwise empty. - lastUpdatedAt: - type: string - format: date-time - description: when this team was last updated. - status: - type: string - description: whether this team is fully processed or there are still unprocessed operations that'll affect it - default: PROCESSED - enum: + description: Current status of the file. + x-include-enum-class-prefix: true + enum: + - PROCESSING - PROCESSED - - QUEUED_FOR_CREATION - - QUEUED_FOR_DELETION - canBeDeleted: - type: boolean - description: can this team be deleted. Some manually ingested teams like GCS_CSV or PUSH_API cannot - default: true - loggingId: - type: string - description: The logging id of the team used in scrubbed logs, client analytics, and metrics. - CustomEntityMetadata: - properties: - customData: - $ref: "#/components/schemas/CustomData" - GroupType: - type: string - description: The type of user group - enum: - - DEPARTMENT - - ALL - - TEAM - - JOB_TITLE - - ROLE_TYPE - - LOCATION - - REGION - - EXTERNAL_GROUP - Group: - required: - - type - - id - properties: - type: - $ref: "#/components/schemas/GroupType" - id: - type: string - description: A unique identifier for the group. May be the same as name. - name: - type: string - description: Name of the group. - datasourceInstance: - type: string - description: Datasource instance if the group belongs to one e.g. external groups. - provisioningId: - type: string - description: identifier for greenlist provisioning, aka sciokey - UserRole: - type: string - description: A user's role with respect to a specific document. - enum: - - OWNER - - VIEWER - - ANSWER_MODERATOR - - EDITOR - - VERIFIER - UserRoleSpecification: - required: - - role - properties: - sourceDocumentSpec: - $ref: "#/components/schemas/DocumentSpec" - description: The document spec of the object this role originates from. The object this role is included with will usually have the same information as this document spec, but if the role is inherited, then the document spec refers to the parent document that the role came from. - person: - $ref: "#/components/schemas/Person" - group: - $ref: "#/components/schemas/Group" - role: - $ref: "#/components/schemas/UserRole" - CustomEntity: - allOf: - - $ref: "#/components/schemas/PermissionedObject" - - type: object - properties: - id: - type: string - description: Unique identifier. - title: - type: string - description: Title or name of the custom entity. - datasource: - type: string - description: The datasource the custom entity is from. - objectType: - type: string - description: The type of the entity. Interpretation is specific to each datasource - metadata: - $ref: "#/components/schemas/CustomEntityMetadata" - roles: - type: array - description: A list of user roles for the custom entity explicitly granted by the owner. - items: - $ref: "#/components/schemas/UserRoleSpecification" - AnswerId: - properties: - id: - type: integer - description: The opaque ID of the Answer. - example: 3 - AnswerDocId: - properties: - docId: - type: string - description: Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. - example: ANSWERS_answer_3 - AnswerMutableProperties: - properties: - question: - type: string - example: Why is the sky blue? - questionVariations: - type: array - description: Additional ways of phrasing this question. - items: - type: string - bodyText: - type: string - description: The plain text answer to the question. - example: From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light. - boardId: - type: integer - description: The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. - deprecated: true - x-glean-deprecated: - id: 3729bc64-8859-4159-b93c-ce2d5f0e7304 - introduced: "2026-02-05" - message: Answer Boards no longer supported - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Answer Boards no longer supported" - audienceFilters: - type: array - description: Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. - items: - $ref: "#/components/schemas/FacetFilter" - addedRoles: - type: array - description: A list of user roles for the answer added by the owner. - items: - $ref: "#/components/schemas/UserRoleSpecification" - removedRoles: - type: array - description: A list of user roles for the answer removed by the owner. - items: - $ref: "#/components/schemas/UserRoleSpecification" - roles: - type: array - description: A list of roles for this answer explicitly granted by an owner, editor, or admin. - items: - $ref: "#/components/schemas/UserRoleSpecification" - sourceDocumentSpec: - $ref: "#/components/schemas/DocumentSpec" - sourceType: - type: string - enum: - - DOCUMENT - - ASSISTANT - UgcTrackingSignals: - type: object - properties: - trackingToken: - type: string - description: An opaque token that represents this particular UGC. To be used for `/feedback` reporting. - StructuredText: - allOf: - - $ref: "#/components/schemas/StructuredTextMutableProperties" - - type: object - properties: - structuredList: - type: array - items: - $ref: "#/components/schemas/StructuredTextItem" - description: An array of objects each of which contains either a string or a link which optionally corresponds to a document. - AnswerLike: - properties: - user: - $ref: "#/components/schemas/Person" - createTime: - type: string - format: date-time - description: The time the user liked the answer in ISO format (ISO 8601). - AnswerLikes: - required: - - likedBy - - likedByUser - - numLikes - properties: - likedBy: - type: array - items: - $ref: "#/components/schemas/AnswerLike" - likedByUser: - type: boolean - description: Whether the user in context liked the answer. - numLikes: - type: integer - description: The total number of likes for the answer. - Reminder: - required: - - assignee - - remindAt - properties: - assignee: - $ref: "#/components/schemas/Person" - requestor: - $ref: "#/components/schemas/Person" - remindAt: - type: integer - description: Unix timestamp for when the reminder should trigger (in seconds since epoch UTC). - createdAt: - type: integer - description: Unix timestamp for when the reminder was first created (in seconds since epoch UTC). - reason: - type: string - description: An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). - TimePoint: - properties: - epochSeconds: - type: integer - description: Epoch seconds. Has precedence over daysFromNow. - daysFromNow: - type: integer - description: Number of days in the past, relative to the current date. - Period: - properties: - minDaysFromNow: - type: integer - description: DEPRECATED - The number of days from now in the past to define upper boundary of time period. - deprecated: true - maxDaysFromNow: - type: integer - description: DEPRECATED - The number of days from now in the past to define lower boundary of time period. - deprecated: true - start: - $ref: "#/components/schemas/TimePoint" - end: - $ref: "#/components/schemas/TimePoint" - CountInfo: - required: - - count - properties: - count: - type: integer - description: The counter value - period: - $ref: "#/components/schemas/Period" - org: - type: string - description: The unit of organization over which we did the count aggregation, e.g. org (department) or company - VerificationMetadata: - required: - - documentId - properties: - lastVerifier: - $ref: "#/components/schemas/Person" - lastVerificationTs: - type: integer - description: The unix timestamp of the verification (in seconds since epoch UTC). - expirationTs: - type: integer - description: The unix timestamp of the verification expiration if applicable (in seconds since epoch UTC). - document: - $ref: "#/components/schemas/Document" - reminders: - type: array - items: - $ref: "#/components/schemas/Reminder" - description: Info about all outstanding verification reminders for the document if exists. - lastReminder: - $ref: "#/components/schemas/Reminder" - visitorCount: - type: array - items: - $ref: "#/components/schemas/CountInfo" - description: Number of visitors to the document during included time periods. - candidateVerifiers: - type: array - items: - $ref: "#/components/schemas/Person" - description: List of potential verifiers for the document e.g. old verifiers and/or users with view/edit permissions. - Verification: - required: - - state - properties: - state: - type: string - enum: - - UNVERIFIED - - VERIFIED - - DEPRECATED - description: The verification state for the document. - metadata: - $ref: "#/components/schemas/VerificationMetadata" - CollectionBaseMutableProperties: - required: - - name - properties: - name: - type: string - description: The unique name of the Collection. - description: - type: string - description: A brief summary of the Collection's contents. - addedRoles: - type: array - description: A list of added user roles for the Collection. - items: - $ref: "#/components/schemas/UserRoleSpecification" - removedRoles: - type: array - description: A list of removed user roles for the Collection. - items: - $ref: "#/components/schemas/UserRoleSpecification" - audienceFilters: - type: array - items: - $ref: "#/components/schemas/FacetFilter" - description: Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. - Thumbnail: - properties: - photoId: - type: string - description: Photo id if the thumbnail is from splash. - url: - type: string - description: Thumbnail URL. This can be user provided image and/or from downloaded images hosted by Glean. - CollectionMutableProperties: - allOf: - - $ref: "#/components/schemas/CollectionBaseMutableProperties" - - type: object - required: - - name - properties: - icon: - type: string - description: The emoji icon of this Collection. - adminLocked: - type: boolean - description: Indicates whether edits are allowed for everyone or only admins. - parentId: - type: integer - description: The parent of this Collection, or 0 if it's a top-level Collection. - thumbnail: - $ref: "#/components/schemas/Thumbnail" - allowedDatasource: - type: string - description: The datasource type this Collection can hold. - CollectionItemMutableProperties: - properties: - name: - type: string - description: The optional name of the Collection item. - description: - type: string - description: A helpful description of why this CollectionItem is in the Collection that it's in. - icon: - type: string - description: The emoji icon for this CollectionItem. Only used for Text type items. - UserGeneratedContentId: - properties: - id: - type: integer - description: The opaque id of the user generated content. - ShortcutMutableProperties: - properties: - inputAlias: - type: string - description: Link text following go/ prefix as entered by the user. - destinationUrl: - type: string - description: Destination URL for the shortcut. - destinationDocumentId: - type: string - description: Glean Document ID for the URL, if known. - description: - type: string - description: A short, plain text blurb to help people understand the intent of the shortcut. - unlisted: - type: boolean - description: Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. - urlTemplate: - type: string - description: For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. - addedRoles: - type: array - description: A list of user roles added for the Shortcut. - items: - $ref: "#/components/schemas/UserRoleSpecification" - removedRoles: - type: array - description: A list of user roles removed for the Shortcut. - items: - $ref: "#/components/schemas/UserRoleSpecification" - ShortcutMetadata: - properties: - createdBy: - $ref: "#/components/schemas/Person" - createTime: - type: string - format: date-time - description: The time the shortcut was created in ISO format (ISO 8601). - updatedBy: - $ref: "#/components/schemas/Person" - updateTime: - type: string - format: date-time - description: The time the shortcut was updated in ISO format (ISO 8601). - destinationDocument: - $ref: "#/components/schemas/Document" - description: Document that corresponds to the destination URL, if applicable. - intermediateUrl: - type: string - description: The URL from which the user is then redirected to the destination URL. Full replacement for https://go/. - viewPrefix: - type: string - description: The part of the shortcut preceding the input alias when used for showing shortcuts to users. Should end with "/". e.g. "go/" for native shortcuts. - isExternal: - type: boolean - description: Indicates whether a shortcut is native or external. - editUrl: - type: string - description: The URL using which the user can access the edit page of the shortcut. - Shortcut: - allOf: - - $ref: "#/components/schemas/UserGeneratedContentId" - - $ref: "#/components/schemas/ShortcutMutableProperties" - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/ShortcutMetadata" - - type: object - required: - - inputAlias - properties: - alias: - type: string - description: canonical link text following go/ prefix where hyphen/underscore is removed. - title: - type: string - description: Title for the Go Link - roles: - type: array - description: A list of user roles for the Go Link. - items: - $ref: "#/components/schemas/UserRoleSpecification" - Collection: - allOf: - - $ref: "#/components/schemas/CollectionMutableProperties" - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/UgcTrackingSignals" - - type: object - required: - - id - - description - properties: - id: - type: integer - description: The unique ID of the Collection. - createTime: - type: string - format: date-time - updateTime: - type: string - format: date-time - creator: - $ref: "#/components/schemas/Person" - updatedBy: - $ref: "#/components/schemas/Person" - itemCount: - type: integer - description: The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. - childCount: - type: integer - description: The number of children Collections. Separated from the actual children so we can grab the count without children. - items: - type: array - items: - $ref: "#/components/schemas/CollectionItem" - description: The items in this Collection. - pinMetadata: - $ref: "#/components/schemas/CollectionPinnedMetadata" - description: Metadata having what categories this Collection is pinned to and the eligible categories to pin to - shortcuts: - type: array - items: - type: string - description: The names of the shortcuts (Go Links) that point to this Collection. - children: - type: array - items: - $ref: "#/components/schemas/Collection" - description: The children Collections of this Collection. - roles: - type: array - description: A list of user roles for the Collection. - items: - $ref: "#/components/schemas/UserRoleSpecification" - CollectionItem: - allOf: - - $ref: "#/components/schemas/CollectionItemMutableProperties" - - type: object - required: - - collectionId - - itemType - properties: - collectionId: - type: integer - description: The Collection ID of the Collection that this CollectionItem belongs in. - documentId: - type: string - description: If this CollectionItem is indexed, the Glean Document ID of that document. - url: - type: string - description: The URL of this CollectionItem. - itemId: - type: string - description: Unique identifier for the item within the Collection it belongs to. - createdBy: - $ref: "#/components/schemas/Person" - description: The person who added this Collection item. - createdAt: - type: string - format: date-time - description: Unix timestamp for when the item was first added (in seconds since epoch UTC). - document: - $ref: "#/components/schemas/Document" - description: The Document this CollectionItem corresponds to (omitted if item is a non-indexed URL). - shortcut: - $ref: "#/components/schemas/Shortcut" - description: The Shortcut this CollectionItem corresponds to (only included if item URL is for a Go Link). - collection: - $ref: "#/components/schemas/Collection" - description: The Collection this CollectionItem corresponds to (only included if item type is COLLECTION). - itemType: - type: string - enum: - - DOCUMENT - - TEXT - - URL - - COLLECTION - CollectionPinnableCategories: - type: string - description: Categories a Collection can be pinned to. - enum: - - COMPANY_RESOURCE - - DEPARTMENT_RESOURCE - - TEAM_RESOURCE - CollectionPinnableTargets: - type: string - description: What targets can a Collection be pinned to. - enum: - - RESOURCE_CARD - - TEAM_PROFILE_PAGE - CollectionPinTarget: - required: - - category - properties: - category: - $ref: "#/components/schemas/CollectionPinnableCategories" - value: - type: string - description: Optional. If category supports values, then the additional value for the category e.g. department name for DEPARTMENT_RESOURCE, team name/id for TEAM_RESOURCE and so on. - target: - $ref: "#/components/schemas/CollectionPinnableTargets" - CollectionPinMetadata: - required: - - id - - target - properties: - id: - type: integer - description: The ID of the Collection. - target: - $ref: "#/components/schemas/CollectionPinTarget" - CollectionPinnedMetadata: - properties: - existingPins: - type: array - items: - $ref: "#/components/schemas/CollectionPinTarget" - description: List of targets this Collection is pinned to. - eligiblePins: - type: array - items: - $ref: "#/components/schemas/CollectionPinMetadata" - description: List of targets this Collection can be pinned to, excluding the targets this Collection is already pinned to. We also include Collection ID already is pinned to each eligible target, which will be 0 if the target has no pinned Collection. - Answer: - allOf: - - $ref: "#/components/schemas/AnswerId" - - $ref: "#/components/schemas/AnswerDocId" - - $ref: "#/components/schemas/AnswerMutableProperties" - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/UgcTrackingSignals" - - type: object - required: - - id - properties: - combinedAnswerText: - $ref: "#/components/schemas/StructuredText" - likes: - $ref: "#/components/schemas/AnswerLikes" - author: - $ref: "#/components/schemas/Person" - createTime: - type: string - format: date-time - description: The time the answer was created in ISO format (ISO 8601). - updateTime: - type: string - format: date-time - description: The time the answer was last updated in ISO format (ISO 8601). - updatedBy: - $ref: "#/components/schemas/Person" - verification: - $ref: "#/components/schemas/Verification" - collections: - type: array - description: The collections to which the answer belongs. - items: - $ref: "#/components/schemas/Collection" - documentCategory: - type: string - description: The document's document_category(.proto). - sourceDocument: - $ref: "#/components/schemas/Document" - FollowupAction: - description: A follow-up action that can be invoked by the user after a response. The action parameters are not included and need to be predicted/filled separately. - properties: - actionRunId: - type: string - description: Unique identifier for this actionRun recommendation event. - actionInstanceId: - type: string - description: The ID of the action instance that will be invoked. - actionId: - type: string - description: The ID of the associated action. - parameters: - type: object - description: Map of assistant predicted parameters and their corresponding values. - additionalProperties: - type: string - recommendationText: - type: string - description: Text to be displayed to the user when recommending the action instance. - actionLabel: - type: string - description: The label to be used when displaying a button to execute this action instance. - userConfirmationRequired: - type: boolean - description: Whether user confirmation is needed before executing this action instance. - GeneratedQna: - properties: - question: - type: string - description: Search query rephrased into a question. - answer: - type: string - description: Answer generated for the given query or the generated question. - followUpPrompts: - type: array - items: - type: string - description: List of all follow-up prompts generated for the given query or the generated question. - followupActions: - description: List of follow-up actions generated for the given query or the generated question. - type: array - items: - $ref: "#/components/schemas/FollowupAction" - ranges: - type: array - items: - $ref: "#/components/schemas/TextRange" - description: Answer subsections to mark with special formatting (citations, bolding etc) - status: - type: string - enum: - - COMPUTING - - DISABLED - - FAILED - - NO_ANSWER - - SKIPPED - - STREAMING - - SUCCEEDED - - TIMEOUT - description: Status of backend generating the answer - cursor: - type: string - description: An opaque cursor representing the search request - trackingToken: - type: string - description: An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. - SearchResult: - required: - - url - allOf: - - $ref: "#/components/schemas/Result" - - type: object - properties: - document: - $ref: "#/components/schemas/Document" - title: - type: string - url: - type: string - nativeAppUrl: - type: string - description: A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...). - snippets: - type: array - items: - $ref: "#/components/schemas/SearchResultSnippet" - description: Text content from the result document which contains search query terms, if available. - fullText: - type: string - description: The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack). - fullTextList: - type: array - description: The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack). - items: - type: string - relatedResults: - type: array - items: - $ref: "#/components/schemas/RelatedDocuments" - description: A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP. - clusteredResults: - type: array - description: A list of results that should be displayed as associated with this result. - items: - $ref: "#/components/schemas/SearchResult" - allClusteredResults: - type: array - description: A list of results that should be displayed as associated with this result. - items: - $ref: "#/components/schemas/ClusterGroup" - attachmentCount: - type: integer - description: The total number of attachments. - attachments: - type: array - description: A (potentially partial) list of results representing documents attached to the main result document. - items: - $ref: "#/components/schemas/SearchResult" - backlinkResults: - type: array - description: A list of results that should be displayed as backlinks of this result in reverse chronological order. - items: - $ref: "#/components/schemas/SearchResult" - clusterType: - $ref: "#/components/schemas/ClusterTypeEnum" - mustIncludeSuggestions: - $ref: "#/components/schemas/QuerySuggestionList" - querySuggestion: - $ref: "#/components/schemas/QuerySuggestion" - prominence: - $ref: "#/components/schemas/SearchResultProminenceEnum" - attachmentContext: - type: string - description: Additional context for the relationship between the result and the document it's attached to. - pins: - type: array - description: A list of pins associated with this search result. - items: - $ref: "#/components/schemas/PinDocument" - example: - snippets: - - snippet: snippet - mimeType: mimeType - metadata: - container: container - createTime: "2000-01-23T04:56:07.000Z" - datasource: datasource - author: - name: name - documentId: documentId - updateTime: "2000-01-23T04:56:07.000Z" - mimeType: mimeType - objectType: objectType - title: title - url: https://example.com/foo/bar - nativeAppUrl: slack://foo/bar - mustIncludeSuggestions: - - missingTerm: container - query: container - ExtractedQnA: - properties: - heading: - type: string - description: Heading text that was matched to produce this result. - question: - type: string - description: Question text that was matched to produce this result. - questionResult: - $ref: "#/components/schemas/SearchResult" - CalendarAttendee: - required: - - person - properties: - isOrganizer: - type: boolean - description: Whether or not this attendee is an organizer. - isInGroup: - type: boolean - description: Whether or not this attendee is in a group. Needed temporarily at least to support both flat attendees and tree for compatibility. - person: - $ref: "#/components/schemas/Person" - groupAttendees: - type: array - description: If this attendee is a group, represents the list of individual attendees in the group. - items: - $ref: "#/components/schemas/CalendarAttendee" - responseStatus: - type: string - enum: - - ACCEPTED - - DECLINED - - NO_RESPONSE - - TENTATIVE - CalendarAttendees: - properties: - people: - type: array - items: - $ref: "#/components/schemas/CalendarAttendee" - description: Full details of some of the attendees of this event - isLimit: - type: boolean - description: Whether the total count of the people returned is at the retrieval limit. - total: - type: integer - description: Total number of attendees in this event. - numAccepted: - type: integer - description: Total number of attendees who have accepted this event. - numDeclined: - type: integer - description: Total number of attendees who have declined this event. - numNoResponse: - type: integer - description: Total number of attendees who have not responded to this event. - numTentative: - type: integer - description: Total number of attendees who have responded tentatively (i.e. responded maybe) to this event. - Meeting: - properties: - id: - type: string - title: - type: string - description: - type: string - url: - type: string - startTime: - type: string - format: date-time - endTime: - type: string - format: date-time - attendees: - $ref: "#/components/schemas/CalendarAttendees" - description: The attendee list, including their response status - isCancelled: - type: boolean - description: Whether the meeting has been cancelled - location: - type: string - description: The location/venue of the meeting - responseStatus: - type: string - description: The current user's response status (accepted, declined, tentativelyAccepted, none) - conferenceUri: - type: string - description: The meeting join link (Teams, Zoom, etc.) - conferenceProvider: - type: string - description: The conference provider (e.g., "Microsoft Teams", "Zoom") - AppResult: - required: - - datasource - properties: - datasource: - type: string - description: The app or other repository type this represents - docType: - type: string - description: The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). - mimeType: - type: string - description: Mimetype is used to differentiate between sub applications from a datasource (e.g. Sheets, Docs from Gdrive) - iconUrl: - type: string - description: If there is available icon URL. - CodeLine: - properties: - lineNumber: - type: integer - content: - type: string - ranges: - type: array - items: - $ref: "#/components/schemas/TextRange" - description: Index ranges depicting matched sections of the line - Code: - properties: - repoName: - type: string - fileName: - type: string - fileUrl: - type: string - lines: - type: array - items: - $ref: "#/components/schemas/CodeLine" - isLastMatch: - type: boolean - description: Last file match for a repo - example: - repoName: scio - fileName: README.md - matches: - - lineNumber: 1 - content: Welcome to the beginning - ranges: [] - - lineNumber: 2 - content: Second line of the file - ranges: [] - - lineNumber: 3 - content: hello world hello world - ranges: - - startindex: 0 - endIndex: 5 - - startIndex: 12 - endIndex: 17 - QuerySuggestionList: - properties: - suggestions: - type: array - items: - $ref: "#/components/schemas/QuerySuggestion" - person: - $ref: "#/components/schemas/Person" - IconConfig: - description: Defines how to render an icon - properties: - generatedBackgroundColorKey: - type: string - backgroundColor: - type: string - color: - type: string - key: - type: string - iconType: - enum: - - COLLECTION - - CUSTOM - - DATASOURCE - - DATASOURCE_INSTANCE - - FAVICON - - FILE_TYPE - - GENERATED_BACKGROUND - - GLYPH - - MIME_TYPE - - NO_ICON - - PERSON - - REACTIONS - - URL - masked: - type: boolean - description: Whether the icon should be masked based on current theme. - name: - type: string - description: The name of the icon if applicable, e.g. the glyph name for `IconType.GLYPH` icons. - url: - type: string - description: The URL to an image to be displayed if applicable, e.g. the URL for `iconType.URL` icons. - example: - color: "#343CED" - key: person_icon - iconType: GLYPH - name: user - ChatMetadata: - description: Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. - properties: - id: - type: string - description: The opaque id of the Chat. - createTime: - type: integer - description: Server Unix timestamp of the creation time (in seconds since epoch UTC). - createdBy: - $ref: "#/components/schemas/Person" - description: The user who created this Chat. - updateTime: - type: integer - description: Server Unix timestamp of the update time (in seconds since epoch UTC). - name: - type: string - description: The name of the Chat. - applicationId: - type: string - description: The ID of the AI App that this Chat is associated to. - applicationName: - type: string - description: The display name of the AI App that this Chat is associated to. - icon: - $ref: "#/components/schemas/IconConfig" - RelatedDocuments: - properties: - relation: - type: string - description: How this document relates to the including entity. - enum: - - ATTACHMENT - - CANONICAL - - CASE - - contact - - CONTACT - - CONVERSATION_MESSAGES - - EXPERT - - FROM - - HIGHLIGHT - - opportunity - - OPPORTUNITY - - RECENT - - SOURCE - - TICKET - - TRANSCRIPT - - WITH - x-enum-varnames: - - ATTACHMENT - - CANONICAL - - CASE - - CONTACT_LOWERCASE - - CONTACT - - CONVERSATION_MESSAGES - - EXPERT - - FROM - - HIGHLIGHT - - OPPORTUNITY_LOWERCASE - - OPPORTUNITY - - RECENT - - SOURCE - - TICKET - - TRANSCRIPT - - WITH - x-enumDescriptions: - CANONICAL: Canonical documents for the entity, such as overview docs, architecture docs elastic. - x-speakeasy-enum-descriptions: - CANONICAL: Canonical documents for the entity, such as overview docs, architecture docs elastic. - associatedEntityId: - type: string - description: Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers) - querySuggestion: - $ref: "#/components/schemas/QuerySuggestion" - documents: - type: array - items: - $ref: "#/components/schemas/Document" - description: A truncated list of documents with this relation. TO BE DEPRECATED. - deprecated: true - x-glean-deprecated: - id: 68de0429-b0cc-4b40-8061-f848788079a2 - introduced: "2026-02-05" - message: Field is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" - results: - type: array - items: - $ref: "#/components/schemas/SearchResult" - description: A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken. - RelatedQuestion: - properties: - question: - type: string - description: The text of the related question - answer: - type: string - description: The answer for the related question - ranges: - type: array - items: - $ref: "#/components/schemas/TextRange" - description: Subsections of the answer string to which some special formatting should be applied (eg. bold) - EntityType: - type: string - description: The type of entity. - x-include-enum-class-prefix: true - enum: - - PERSON - - PROJECT - - CUSTOMER - Disambiguation: - type: object - description: A disambiguation between multiple entities with the same name - properties: - name: - type: string - description: Name of the ambiguous entity - id: - type: string - description: The unique id of the entity in the knowledge graph - type: - $ref: "#/components/schemas/EntityType" - SearchResultSnippet: - properties: - mimeType: - type: string - description: The mime type of the snippets, currently either text/plain or text/html. - text: - type: string - description: A matching snippet from the document with no highlights. - snippetTextOrdering: - type: integer - description: Used for sorting based off the snippet's location within all_snippetable_text - ranges: - type: array - items: - $ref: "#/components/schemas/TextRange" - description: The bolded ranges within text. - url: - type: string - description: A URL, generated based on availability, that links to the position of the snippet text or to the nearest header above the snippet text. - snippet: - type: string - deprecated: true - description: A matching snippet from the document. Query term matches are marked by the unicode characters uE006 and uE007. Use 'text' field instead. - x-glean-deprecated: - id: e55ddf30-7c47-43a5-b775-d78f8b29411a - introduced: "2026-02-05" - message: Use 'text' field instead - removal: "2026-10-15" - x-includeEmpty: true - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use 'text' field instead" - example: - snippet: snippet - mimeType: mimeType - StructuredResult: - description: A single object that can support any object in the work graph. Only a single object will be populated. - properties: - document: - $ref: "#/components/schemas/Document" - person: - $ref: "#/components/schemas/Person" - customer: - $ref: "#/components/schemas/Customer" - team: - $ref: "#/components/schemas/Team" - customEntity: - $ref: "#/components/schemas/CustomEntity" - answer: - $ref: "#/components/schemas/Answer" - generatedQna: - $ref: "#/components/schemas/GeneratedQna" - extractedQnA: - $ref: "#/components/schemas/ExtractedQnA" - meeting: - $ref: "#/components/schemas/Meeting" - app: - $ref: "#/components/schemas/AppResult" - collection: - $ref: "#/components/schemas/Collection" - code: - $ref: "#/components/schemas/Code" - shortcut: - $ref: "#/components/schemas/Shortcut" - querySuggestions: - $ref: "#/components/schemas/QuerySuggestionList" - chat: - $ref: "#/components/schemas/ChatMetadata" - relatedDocuments: - type: array - items: - $ref: "#/components/schemas/RelatedDocuments" - description: A list of documents related to this structured result. - relatedQuestion: - $ref: "#/components/schemas/RelatedQuestion" - disambiguation: - $ref: "#/components/schemas/Disambiguation" - snippets: - description: Any snippets associated to the populated object. - type: array - items: - $ref: "#/components/schemas/SearchResultSnippet" - trackingToken: - type: string - description: An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. - prominence: - type: string - description: The level of visual distinction that should be given to a result. - x-enumDescriptions: - HERO: A high-confidence result that should feature prominently on the page. - PROMOTED: May not be the best result but should be given additional visual distinction. - STANDARD: Should not be distinct from any other results. - enum: - - HERO - - PROMOTED - - STANDARD - x-speakeasy-enum-descriptions: - HERO: A high-confidence result that should feature prominently on the page. - PROMOTED: May not be the best result but should be given additional visual distinction. - STANDARD: Should not be distinct from any other results. - source: - type: string - description: Source context for this result. Possible values depend on the result type. - enum: - - EXPERT_DETECTION - - ENTITY_NLQ - - CALENDAR_EVENT - - AGENT - Result: - properties: - structuredResults: - type: array - description: An array of entities in the work graph retrieved via a data request. - items: - $ref: "#/components/schemas/StructuredResult" - trackingToken: - type: string - description: An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. - ClusterTypeEnum: - type: string - description: The reason for inclusion of clusteredResults. - enum: - - SIMILAR - - FRESHNESS - - TITLE - - CONTENT - - NONE - - THREAD_REPLY - - THREAD_ROOT - - PREFIX - - SUFFIX - - AUTHOR_PREFIX - - AUTHOR_SUFFIX - ClusterGroup: - required: - - visibleCountHint - properties: - clusteredResults: - type: array - description: A list of results that should be displayed as associated with this result. - items: - $ref: "#/components/schemas/SearchResult" - clusterType: - $ref: "#/components/schemas/ClusterTypeEnum" - visibleCountHint: - type: integer - description: The default number of results to display before truncating and showing a "see more" link - SearchResultProminenceEnum: - type: string - description: | - The level of visual distinction that should be given to a result. - x-enumDescriptions: - HERO: A high-confidence result that should feature prominently on the page. - PROMOTED: May not be the best result but should be given additional visual distinction. - STANDARD: Should not be distinct from any other results. - enum: - - HERO - - PROMOTED - - STANDARD - x-speakeasy-enum-descriptions: - HERO: A high-confidence result that should feature prominently on the page. - PROMOTED: May not be the best result but should be given additional visual distinction. - STANDARD: Should not be distinct from any other results. - PinDocumentMutableProperties: - properties: - queries: - type: array - description: The query strings for which the pinned result will show. - items: - type: string - audienceFilters: - type: array - description: Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. - items: - $ref: "#/components/schemas/FacetFilter" - PinDocument: - allOf: - - $ref: "#/components/schemas/PinDocumentMutableProperties" - - type: object - required: - - documentId - properties: - id: - type: string - description: The opaque id of the pin. - documentId: - type: string - description: The document which should be a pinned result. - audienceFilters: - type: array - description: Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. - items: - $ref: "#/components/schemas/FacetFilter" - attribution: - $ref: "#/components/schemas/Person" - updatedBy: - $ref: "#/components/schemas/Person" - createTime: - type: string - format: date-time - updateTime: - type: string - format: date-time - PersonTeam: - description: Use `id` if you index teams via Glean, and use `name` and `externalLink` if you want to use your own team pages - properties: - id: - type: string - description: Unique identifier - name: - type: string - description: Team name - externalLink: - type: string - format: uri - description: Link to a team page on the internet or your company's intranet - relationship: - type: string - description: The team member's relationship to the team. This defaults to MEMBER if not set. - default: MEMBER - enum: - - MEMBER - - MANAGER - - LEAD - - POINT_OF_CONTACT - - OTHER - joinDate: - type: string - format: date-time - description: The team member's start date - StructuredLocation: - type: object - description: Detailed location with information about country, state, city etc. - properties: - deskLocation: - type: string - description: Desk number. - timezone: - type: string - description: Location's timezone, e.g. UTC, PST. - address: - type: string - description: Office address or name. - city: - type: string - description: Name of the city. - state: - type: string - description: State code. - region: - type: string - description: Region information, e.g. NORAM, APAC. - zipCode: - type: string - description: ZIP Code for the address. - country: - type: string - description: Country name. - countryCode: - type: string - description: Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA. - SocialNetwork: - required: - - name - - profileUrl - properties: - name: - type: string - description: Possible values are "twitter", "linkedin". - profileName: - type: string - description: Human-readable profile name. - profileUrl: - type: string - format: url - description: Link to profile. - PersonDistance: - required: - - name - - obfuscatedId - - distance - properties: - name: - type: string - description: The display name. - obfuscatedId: - type: string - description: An opaque identifier that can be used to request metadata for a Person. - distance: - type: number - format: float - description: Distance to person, refer to PeopleDistance pipeline on interpretation of the value. - CommunicationChannel: - type: string - enum: - - COMMUNICATION_CHANNEL_EMAIL - - COMMUNICATION_CHANNEL_SLACK - ChannelInviteInfo: - description: Information regarding the invite status of a person for a particular channel. - properties: - channel: - description: Channel through which the invite was sent - $ref: "#/components/schemas/CommunicationChannel" - isAutoInvite: - description: Bit that tracks if this invite was automatically sent or user-sent - type: boolean - inviter: - description: The person that invited this person. - $ref: "#/components/schemas/Person" - inviteTime: - type: string - format: date-time - description: The time this person was invited in ISO format (ISO 8601). - reminderTime: - type: string - format: date-time - description: The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. - InviteInfo: - description: Information regarding the invite status of a person. - properties: - signUpTime: - type: string - format: date-time - description: The time this person signed up in ISO format (ISO 8601). - invites: - type: array - items: - $ref: "#/components/schemas/ChannelInviteInfo" - description: Latest invites received by the user for each channel - inviter: - deprecated: true - description: The person that invited this person. - $ref: "#/components/schemas/Person" - x-glean-deprecated: - id: 1d3cd23f-9085-4378-b466-9bdc2e344a71 - introduced: "2026-02-05" - message: Use ChannelInviteInfo instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" - inviteTime: - deprecated: true - type: string - format: date-time - description: The time this person was invited in ISO format (ISO 8601). - x-glean-deprecated: - id: 2dc3f572-cded-483d-af07-fc9fc7fd0ae4 - introduced: "2026-02-05" - message: Use ChannelInviteInfo instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" - reminderTime: - deprecated: true - type: string - format: date-time - description: The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. - x-glean-deprecated: - id: d02d58cf-eb90-45d0-ab90-f7a9d707ae3c - introduced: "2026-02-05" - message: Use ChannelInviteInfo instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" - ReadPermission: - description: Describes the read permission level that a user has for a specific feature - properties: - scopeType: - $ref: "#/components/schemas/ScopeType" - ReadPermissions: - description: Describes the read permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject - additionalProperties: - type: array - description: List of read permissions (for different scopes but same feature) - items: - $ref: "#/components/schemas/ReadPermission" - WritePermissions: - description: Describes the write permissions levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject - additionalProperties: - type: array - description: List of write permissions (for different scopes but same feature) - items: - $ref: "#/components/schemas/WritePermission" - GrantPermission: - description: Describes the grant permission level that a user has for a specific feature - properties: - scopeType: - $ref: "#/components/schemas/ScopeType" - GrantPermissions: - description: Describes the grant permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject - additionalProperties: - type: array - description: List of grant permissions (for different scopes but same feature) - items: - $ref: "#/components/schemas/GrantPermission" - Permissions: - description: |- - Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. - When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes. - properties: - canAdminSearch: - type: boolean - description: TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch - canAdminClientApiGlobalTokens: - type: boolean - description: TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope - canDlp: - type: boolean - description: TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features - read: - $ref: "#/components/schemas/ReadPermissions" - write: - $ref: "#/components/schemas/WritePermissions" - grant: - $ref: "#/components/schemas/GrantPermissions" - role: - type: string - description: The roleId of the canonical role a user has. The displayName is equal to the roleId. - roles: - type: array - description: The roleIds of the roles a user has. - items: - type: string - TimeInterval: - required: - - start - - end - properties: - start: - type: string - description: The RFC3339 timestamp formatted start time of this event. - end: - type: string - description: The RFC3339 timestamp formatted end time of this event. - AnonymousEvent: - description: A generic, light-weight calendar event. - type: object - properties: - time: - $ref: "#/components/schemas/TimeInterval" - eventType: - description: The nature of the event, for example "out of office". - type: string - enum: - - DEFAULT - - OUT_OF_OFFICE - Badge: - type: object - description: Displays a user's accomplishment or milestone - properties: - key: - type: string - description: An auto generated unique identifier. - displayName: - type: string - description: The badge name displayed to users - iconConfig: - $ref: "#/components/schemas/IconConfig" - pinned: - type: boolean - description: The badge should be shown on the PersonAttribution - example: - key: deployment_name_new_hire - displayName: New hire - iconConfig: - color: "#343CED" - key: person_icon - iconType: GLYPH - name: user - PersonMetadata: - properties: - type: - type: string - x-enumDescriptions: - FULL_TIME: The person is a current full-time employee of the company. - CONTRACTOR: The person is a current contractor of the company. - NON_EMPLOYEE: The person object represents a non-human actor such as a service or admin account. - FORMER_EMPLOYEE: The person is a previous employee of the company. - enum: - - FULL_TIME - - CONTRACTOR - - NON_EMPLOYEE - - FORMER_EMPLOYEE - example: FULL_TIME - x-speakeasy-enum-descriptions: - FULL_TIME: The person is a current full-time employee of the company. - CONTRACTOR: The person is a current contractor of the company. - NON_EMPLOYEE: The person object represents a non-human actor such as a service or admin account. - FORMER_EMPLOYEE: The person is a previous employee of the company. - firstName: - type: string - description: The first name of the person - lastName: - type: string - description: The last name of the person - title: - type: string - description: Job title. - businessUnit: - type: string - description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. - department: - type: string - description: An organizational unit where everyone has a similar task, e.g. `Engineering`. - teams: - description: Info about the employee's team(s). - type: array - items: - $ref: "#/components/schemas/PersonTeam" - departmentCount: - type: integer - description: The number of people in this person's department. - email: - type: string - description: The user's primary email address - aliasEmails: - type: array - description: Additional email addresses of this user beyond the primary, if any. - items: - type: string - location: - type: string - description: User facing string representing the person's location. - structuredLocation: - $ref: "#/components/schemas/StructuredLocation" - externalProfileLink: - type: string - description: Link to a customer's internal profile page. This is set to '#' when no link is desired. - manager: - $ref: "#/components/schemas/Person" - managementChain: - description: The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager. - type: array - items: - $ref: "#/components/schemas/Person" - phone: - type: string - description: Phone number as a number string. - timezone: - type: string - description: The timezone of the person. E.g. "Pacific Daylight Time". - timezoneOffset: - type: integer - format: int64 - description: The offset of the person's timezone in seconds from UTC. - timezoneIANA: - type: string - description: The IANA timezone identifier, e.g. "America/Los_Angeles". - photoUrl: - type: string - format: url - description: The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - uneditedPhotoUrl: - type: string - format: url - description: The original photo URL of the person's avatar before any edits they made are applied - bannerUrl: - type: string - format: url - description: The URL of the person's banner photo. - reports: - type: array - items: - $ref: "#/components/schemas/Person" - startDate: - type: string - description: The date when the employee started. - format: date - endDate: - type: string - format: date - description: If a former employee, the last date of employment. - bio: - type: string - description: Short biography or mission statement of the employee. - pronoun: - type: string - description: She/her, He/his or other pronoun. - orgSizeCount: - type: integer - description: The total recursive size of the people reporting to this person, or 1 - directReportsCount: - type: integer - description: The total number of people who directly report to this person, or 0 - preferredName: - type: string - description: The preferred name of the person, or a nickname. - socialNetwork: - description: List of social network profiles. - type: array - items: - $ref: "#/components/schemas/SocialNetwork" - datasourceProfile: - type: array - description: List of profiles this user has in different datasources / tools that they use. - items: - $ref: "#/components/schemas/DatasourceProfile" - querySuggestions: - $ref: "#/components/schemas/QuerySuggestionList" - peopleDistance: - type: array - items: - $ref: "#/components/schemas/PersonDistance" - description: List of people and distances to those people from this person. Optionally with metadata. - inviteInfo: - $ref: "#/components/schemas/InviteInfo" - isSignedUp: - type: boolean - description: Whether the user has signed into Glean at least once. - lastExtensionUse: - type: string - format: date-time - description: The last time the user has used the Glean extension in ISO 8601 format. - permissions: - $ref: "#/components/schemas/Permissions" - customFields: - type: array - description: User customizable fields for additional people information. - items: - $ref: "#/components/schemas/CustomFieldData" - loggingId: - type: string - description: The logging id of the person used in scrubbed logs, tracking GA metrics. - startDatePercentile: - type: number - format: float - description: Percentage of the company that started strictly after this person. Between [0,100). - busyEvents: - type: array - items: - $ref: "#/components/schemas/AnonymousEvent" - description: Intervals of busy time for this person, along with the type of event they're busy with. - profileBoolSettings: - type: object - additionalProperties: - type: boolean - description: flag settings to indicate user profile settings for certain items - badges: - type: array - items: - $ref: "#/components/schemas/Badge" - description: The badges that a user has earned over their lifetime. - isOrgRoot: - type: boolean - description: Whether this person is a "root" node in their organization's hierarchy. - example: - department: Movies - email: george@example.com - location: Hollywood, CA - phone: 6505551234 - photoUrl: https://example.com/george.jpg - startDate: "2000-01-23" - title: Actor - DocumentVisibility: - type: string - description: The level of visibility of the document as understood by our system. - x-enumDescriptions: - PRIVATE: Only one person is able to see the document. - SPECIFIC_PEOPLE_AND_GROUPS: Only specific people and/or groups can see the document. - DOMAIN_LINK: Anyone in the domain with the link can see the document. - DOMAIN_VISIBLE: Anyone in the domain can search for the document. - PUBLIC_LINK: Anyone with the link can see the document. - PUBLIC_VISIBLE: Anyone on the internet can search for the document. - enum: - - PRIVATE - - SPECIFIC_PEOPLE_AND_GROUPS - - DOMAIN_LINK - - DOMAIN_VISIBLE - - PUBLIC_LINK - - PUBLIC_VISIBLE - x-speakeasy-enum-descriptions: - PRIVATE: Only one person is able to see the document. - SPECIFIC_PEOPLE_AND_GROUPS: Only specific people and/or groups can see the document. - DOMAIN_LINK: Anyone in the domain with the link can see the document. - DOMAIN_VISIBLE: Anyone in the domain can search for the document. - PUBLIC_LINK: Anyone with the link can see the document. - PUBLIC_VISIBLE: Anyone on the internet can search for the document. - Reaction: - properties: - type: - type: string - count: - type: integer - description: The count of the reaction type on the document. - reactors: - type: array - items: - $ref: "#/components/schemas/Person" - reactedByViewer: - type: boolean - description: Whether the user in context reacted with this type to the document. - Share: - description: Search endpoint will only fill out numDays ago since that's all we need to display shared badge; docmetadata endpoint will fill out all the fields so that we can display shared badge tooltip - required: - - numDaysAgo - properties: - numDaysAgo: - type: integer - description: The number of days that has passed since the share happened - sharer: - $ref: "#/components/schemas/Person" - sharingDocument: - $ref: "#/components/schemas/Document" - DocumentInteractions: - properties: - numComments: - type: integer - description: The count of comments (thread replies in the case of slack). - numReactions: - type: integer - description: The count of reactions on the document. - reactions: - type: array - description: To be deprecated in favor of reacts. A (potentially non-exhaustive) list of reactions for the document. - deprecated: true - items: - type: string - x-glean-deprecated: - id: cd754845-6eec-480f-b395-c93478aff563 - introduced: "2026-02-05" - message: Use reacts instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use reacts instead" - reacts: - type: array - items: - $ref: "#/components/schemas/Reaction" - shares: - type: array - items: - $ref: "#/components/schemas/Share" - description: Describes instances of someone posting a link to this document in one of our indexed datasources. - visitorCount: - $ref: "#/components/schemas/CountInfo" - ViewerInfo: - properties: - role: - type: string - enum: - - ANSWER_MODERATOR - - OWNER - - VIEWER - description: DEPRECATED - use permissions instead. Viewer's role on the specific document. - deprecated: true - x-glean-deprecated: - - id: fbc55efe-3e6c-485c-8b60-bab574c3813b - introduced: "2026-02-05" - kind: property - message: Use permissions instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use permissions instead" - lastViewedTime: - type: string - format: date-time - IndexStatus: - properties: - lastCrawledTime: - description: When the document was last crawled - type: string - format: date-time - lastIndexedTime: - description: When the document was last indexed - type: string - format: date-time - DocumentMetadata: - properties: - datasource: - type: string - datasourceInstance: - type: string - description: The datasource instance from which the document was extracted. - objectType: - type: string - description: The type of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). - container: - type: string - description: The name of the container (higher level parent, not direct parent) of the result. Interpretation is specific to each datasource (e.g. Channels for Slack, Project for Jira). cf. parentId - containerId: - type: string - description: The Glean Document ID of the container. Uniquely identifies the container. - superContainerId: - type: string - description: The Glean Document ID of the super container. Super container represents a broader abstraction that contains many containers. For example, whereas container might refer to a folder, super container would refer to a drive. - parentId: - type: string - description: The id of the direct parent of the result. Interpretation is specific to each datasource (e.g. parent issue for Jira). cf. container - mimeType: - type: string - documentId: - type: string - description: The index-wide unique identifier. - loggingId: - type: string - description: A unique identifier used to represent the document in any logging or feedback requests in place of documentId. - documentIdHash: - type: string - description: Hash of the Glean Document ID. - createTime: - type: string - format: date-time - updateTime: - type: string - format: date-time - author: - $ref: "#/components/schemas/Person" - owner: - $ref: "#/components/schemas/Person" - mentionedPeople: - type: array - items: - $ref: "#/components/schemas/Person" - description: A list of people mentioned in the document. - visibility: - $ref: "#/components/schemas/DocumentVisibility" - components: - type: array - description: A list of components this result is associated with. Interpretation is specific to each datasource. (e.g. for Jira issues, these are [components](https://confluence.atlassian.com/jirasoftwarecloud/organizing-work-with-components-764478279.html).) - items: + - PARTIALLY_PROCESSED + - FAILED + - DELETED + ChatFileFailureReason: type: string - status: - type: string - description: The status or disposition of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue status such as Done, In Progress or Will Not Fix). - statusCategory: - type: string - description: The status category of the result. Meant to be more general than status. Interpretation is specific to each datasource. - pins: - type: array - description: A list of stars associated with this result. "Pin" is an older name. - items: - $ref: "#/components/schemas/PinDocument" - priority: - type: string - description: The document priority. Interpretation is datasource specific. - assignedTo: - $ref: "#/components/schemas/Person" - updatedBy: - $ref: "#/components/schemas/Person" - labels: - type: array - description: A list of tags for the document. Interpretation is datasource specific. - items: - type: string - collections: - type: array - description: A list of collections that the document belongs to. - items: - $ref: "#/components/schemas/Collection" - datasourceId: - type: string - description: The user-visible datasource specific id (e.g. Salesforce case number for example, GitHub PR number). - interactions: - $ref: "#/components/schemas/DocumentInteractions" - verification: - $ref: "#/components/schemas/Verification" - viewerInfo: - $ref: "#/components/schemas/ViewerInfo" - permissions: - $ref: "#/components/schemas/ObjectPermissions" - visitCount: - $ref: "#/components/schemas/CountInfo" - shortcuts: - type: array - description: A list of shortcuts of which destination URL is for the document. - items: - $ref: "#/components/schemas/Shortcut" - path: - type: string - description: For file datasources like onedrive/github etc this has the path to the file - customData: - $ref: "#/components/schemas/CustomData" - documentCategory: - type: string - description: The document's document_category(.proto). - contactPerson: - $ref: "#/components/schemas/Person" - thumbnail: - $ref: "#/components/schemas/Thumbnail" - description: A thumbnail image representing this document. - indexStatus: - $ref: "#/components/schemas/IndexStatus" - ancestors: - type: array - description: A list of documents that are ancestors of this document in the hierarchy of the document's datasource, for example parent folders or containers. Ancestors can be of different types and some may not be indexed. Higher level ancestors appear earlier in the list. - items: - $ref: "#/components/schemas/Document" - example: - container: container - parentId: JIRA_EN-1337 - createTime: "2000-01-23T04:56:07.000Z" - datasource: datasource - author: - name: name - documentId: documentId - updateTime: "2000-01-23T04:56:07.000Z" - mimeType: mimeType - objectType: Feature Request - components: - - Backend - - Networking - status: - - Done - customData: - someCustomField: someCustomValue - DocumentSection: - type: object - properties: - title: - type: string - description: The title of the document section (e.g. the section header). - url: - type: string - description: The permalink of the document section. - StructuredTextItem: - properties: - link: - type: string - example: https://en.wikipedia.org/wiki/Diffuse_sky_radiation - document: - deprecated: true - description: Deprecated. To be gradually migrated to structuredResult. - $ref: "#/components/schemas/Document" - text: - type: string - example: Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue. - structuredResult: - $ref: "#/components/schemas/StructuredResult" - AnnouncementMutableProperties: - properties: - startTime: - type: string - format: date-time - description: The date and time at which the announcement becomes active. - endTime: - type: string - format: date-time - description: The date and time at which the announcement expires. - title: - type: string - description: The headline of the announcement. - body: - $ref: "#/components/schemas/StructuredText" - emoji: - type: string - description: An emoji used to indicate the nature of the announcement. - thumbnail: - $ref: "#/components/schemas/Thumbnail" - banner: - $ref: "#/components/schemas/Thumbnail" - description: Optional variant of thumbnail cropped for header background. - audienceFilters: - type: array - description: Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. - items: - $ref: "#/components/schemas/FacetFilter" - sourceDocumentId: - type: string - description: The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). - hideAttribution: - type: boolean - description: Whether or not to hide an author attribution. - channel: - type: string - enum: - - MAIN - - SOCIAL_FEED - description: This determines whether this is a Social Feed post or a regular announcement. - postType: - type: string - enum: - - TEXT - - LINK - description: This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. - isPrioritized: - type: boolean - description: Used by the Social Feed to pin posts to the front of the feed. - viewUrl: - type: string - description: URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". - CreateAnnouncementRequest: - allOf: - - $ref: "#/components/schemas/AnnouncementMutableProperties" - - type: object - required: - - title - - startTime - - endTime - DraftProperties: - properties: - draftId: - type: integer - description: The opaque id of the associated draft. - example: - draftId: 342 - Announcement: - allOf: - - $ref: "#/components/schemas/AnnouncementMutableProperties" - - $ref: "#/components/schemas/DraftProperties" - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/UgcTrackingSignals" - - type: object - properties: - id: - type: integer - description: The opaque id of the announcement. - author: - $ref: "#/components/schemas/Person" - createTimestamp: - type: integer - description: Server Unix timestamp of the creation time (in seconds since epoch UTC). - lastUpdateTimestamp: - type: integer - description: Server Unix timestamp of the last update time (in seconds since epoch UTC). - updatedBy: - $ref: "#/components/schemas/Person" - viewerInfo: - type: object - properties: - isDismissed: - type: boolean - description: Whether the viewer has dismissed the announcement. - isRead: - type: boolean - description: Whether the viewer has read the announcement. - sourceDocument: - $ref: "#/components/schemas/Document" - description: The source document if the announcement is created from one. - isPublished: - type: boolean - description: Whether or not the announcement is published. - DeleteAnnouncementRequest: - required: - - id - properties: - id: - type: integer - description: The opaque id of the announcement to be deleted. - UpdateAnnouncementRequest: - allOf: - - $ref: "#/components/schemas/AnnouncementMutableProperties" - - type: object - required: - - id - - title - - startTime - - endTime - properties: - id: - type: integer - description: The opaque id of the announcement. - AddedCollections: - properties: - addedCollections: - type: array - items: - type: integer - description: IDs of Collections to which a document is added. - AnswerCreationData: - allOf: - - $ref: "#/components/schemas/AnswerMutableProperties" - - $ref: "#/components/schemas/AddedCollections" - - type: object - properties: - combinedAnswerText: - $ref: "#/components/schemas/StructuredTextMutableProperties" - CreateAnswerRequest: - required: - - data - properties: - data: - $ref: "#/components/schemas/AnswerCreationData" - DeleteAnswerRequest: - allOf: - - $ref: "#/components/schemas/AnswerId" - - $ref: "#/components/schemas/AnswerDocId" - - type: object - required: - - id - RemovedCollections: - properties: - removedCollections: - type: array - items: - type: integer - description: IDs of Collections from which a document is removed. - EditAnswerRequest: - allOf: - - $ref: "#/components/schemas/AnswerId" - - $ref: "#/components/schemas/AnswerDocId" - - $ref: "#/components/schemas/AnswerMutableProperties" - - $ref: "#/components/schemas/AddedCollections" - - $ref: "#/components/schemas/RemovedCollections" - - type: object - required: - - id - properties: - combinedAnswerText: - $ref: "#/components/schemas/StructuredTextMutableProperties" - GetAnswerRequest: - allOf: - - $ref: "#/components/schemas/AnswerId" - - $ref: "#/components/schemas/AnswerDocId" - AnswerResult: - required: - - answer - properties: - answer: - $ref: "#/components/schemas/Answer" - trackingToken: - type: string - description: Use `answer.trackingToken` instead. - deprecated: true - x-glean-deprecated: - id: 62de643b-f182-4d4d-a2fc-5e2cbfee7320 - introduced: "2026-05-07" - message: Use `answer.trackingToken` instead. - removal: "2027-01-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-05-07, removal scheduled for 2027-01-15: Use `answer.trackingToken` instead." - GetAnswerError: - properties: - errorType: - type: string - enum: - - NO_PERMISSION - - INVALID_ID - answerAuthor: - $ref: "#/components/schemas/Person" - GetAnswerResponse: - properties: - answerResult: - $ref: "#/components/schemas/AnswerResult" - error: - $ref: "#/components/schemas/GetAnswerError" - ListAnswersRequest: - properties: - boardId: - type: integer - description: The Answer Board Id to list answers on. - ListAnswersResponse: - required: - - answers - - answerResults - properties: - answerResults: - type: array - 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 + description: Reason for failed status. + x-include-enum-class-prefix: true + enum: + - PARSE_FAILED + - AV_SCAN_FAILED + - FILE_TOO_SMALL + - FILE_TOO_LARGE + - FILE_EXTENSION_UNSUPPORTED + - FILE_METADATA_VALIDATION_FAIL + - FILE_PROCESSING_TIMED_OUT + - OAUTH_NEEDED + - URL_FETCH_FAILED + - EMPTY_CONTENT + - AUTH_REQUIRED + ChatFileMetadata: + type: object + description: Metadata of a file uploaded by a user for Chat. + properties: + status: + $ref: "#/components/schemas/ChatFileStatus" + uploadTime: + type: integer + format: int64 + description: Upload time, in epoch seconds. + processedSize: + type: integer + format: int64 + description: Size of the processed file in bytes. + failureReason: + $ref: "#/components/schemas/ChatFileFailureReason" + mimeType: + description: MIME type of the file. + type: string + ChatFile: + type: object + description: Structure for file uploaded by a user for Chat. + properties: + id: + type: string + description: Unique identifier of the file. + example: FILE_1234 + url: + type: string + description: Url of the file. + example: www.google.com + name: + type: string + description: Name of the uploaded file. + example: sample.pdf + metadata: + $ref: "#/components/schemas/ChatFileMetadata" + ReferenceRange: + description: Each text range from the response can correspond to an array of snippets from the citation source. + properties: + textRange: + $ref: "#/components/schemas/TextRange" + snippets: + type: array + items: + $ref: "#/components/schemas/SearchResultSnippet" + ChatMessageCitation: + description: Information about the source for a ChatMessage. + properties: + trackingToken: + type: string + description: An opaque token that represents this particular result in this particular ChatMessage. To be used for /feedback reporting. + sourceDocument: + $ref: "#/components/schemas/Document" + sourceFile: + $ref: "#/components/schemas/ChatFile" + sourcePerson: + $ref: "#/components/schemas/Person" + sourceCustomEntity: + $ref: "#/components/schemas/CustomEntity" + referenceRanges: + description: Each reference range and its corresponding snippets + type: array + items: + $ref: "#/components/schemas/ReferenceRange" 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: - required: - - unauthorizedDatasourceInstances - properties: - unauthorizedDatasourceInstances: - type: array - description: | - Datasource instances that require per-user OAuth authorization. Empty when all datasources are authorized. - items: - $ref: "#/components/schemas/UnauthorizedDatasourceInstance" - CreateAuthTokenResponse: - required: - - token - - expirationTime - properties: - token: - type: string - description: An authentication token that can be passed to any endpoint via Bearer Authentication - expirationTime: - description: Unix timestamp for when this token expires (in seconds since epoch UTC). - type: integer - format: int64 - ToolSets: - type: object - description: The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values - properties: - enableWebSearch: - type: boolean - description: "Whether the agent is allowed to use web search (default: true)." - enableCompanyTools: - type: boolean - description: "Whether the agent is allowed to search internal company resources (default: true)." - AgentConfig: - description: Describes the agent that executes the request. - properties: - agent: - type: string - description: Name of the agent. - x-enumDescriptions: - DEFAULT: Integrates with your company's knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values - GPT: Communicates directly with the LLM. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values - UNIVERSAL: Uses both company and web knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values - FAST: Uses an agent powered by the agentic engine that responds faster but may have lower quality results. Requires the agentic engine to be enabled in the deployment. - ADVANCED: Uses an agent powered by the agentic engine that thinks for longer and potentially makes more LLM calls to return higher quality results. Requires the agentic engine to be enabled in the deployment. - AUTO: Uses an agent powered by the agentic engine that routes between reasoning efforts based on the question and context. - enum: - - DEFAULT - - GPT - - UNIVERSAL - - FAST - - ADVANCED - - AUTO - x-speakeasy-enum-descriptions: - DEFAULT: Integrates with your company's knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values - GPT: Communicates directly with the LLM. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values - UNIVERSAL: Uses both company and web knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values - FAST: Uses an agent powered by the agentic engine that responds faster but may have lower quality results. Requires the agentic engine to be enabled in the deployment. - ADVANCED: Uses an agent powered by the agentic engine that thinks for longer and potentially makes more LLM calls to return higher quality results. Requires the agentic engine to be enabled in the deployment. - AUTO: Uses an agent powered by the agentic engine that routes between reasoning efforts based on the question and context. - toolSets: - $ref: "#/components/schemas/ToolSets" - mode: - type: string - description: Top level modes to run GleanChat in. - x-enumDescriptions: - DEFAULT: Used if no mode supplied. - QUICK: Deprecated. - enum: - - DEFAULT - - QUICK - x-speakeasy-enum-descriptions: - DEFAULT: Used if no mode supplied. - QUICK: Deprecated. - useImageGeneration: - type: boolean - description: Whether the agent should create an image. - ChatFileStatus: - type: string - description: Current status of the file. - x-include-enum-class-prefix: true - enum: - - PROCESSING - - PROCESSED - - PARTIALLY_PROCESSED - - FAILED - - DELETED - ChatFileFailureReason: - type: string - description: Reason for failed status. - x-include-enum-class-prefix: true - enum: - - PARSE_FAILED - - AV_SCAN_FAILED - - FILE_TOO_SMALL - - FILE_TOO_LARGE - - FILE_EXTENSION_UNSUPPORTED - - FILE_METADATA_VALIDATION_FAIL - - FILE_PROCESSING_TIMED_OUT - - OAUTH_NEEDED - - URL_FETCH_FAILED - - EMPTY_CONTENT - - AUTH_REQUIRED - ChatFileMetadata: - type: object - description: Metadata of a file uploaded by a user for Chat. - properties: - status: - $ref: "#/components/schemas/ChatFileStatus" - uploadTime: - type: integer - format: int64 - description: Upload time, in epoch seconds. - processedSize: - type: integer - format: int64 - description: Size of the processed file in bytes. - failureReason: - $ref: "#/components/schemas/ChatFileFailureReason" - mimeType: - description: MIME type of the file. - type: string - ChatFile: - type: object - description: Structure for file uploaded by a user for Chat. - properties: - id: - type: string - description: Unique identifier of the file. - example: FILE_1234 - url: - type: string - description: Url of the file. - example: www.google.com - name: - type: string - description: Name of the uploaded file. - example: sample.pdf - metadata: - $ref: "#/components/schemas/ChatFileMetadata" - ReferenceRange: - description: Each text range from the response can correspond to an array of snippets from the citation source. - properties: - textRange: - $ref: "#/components/schemas/TextRange" - snippets: - type: array - items: - $ref: "#/components/schemas/SearchResultSnippet" - ChatMessageCitation: - description: Information about the source for a ChatMessage. - properties: - trackingToken: - type: string - description: An opaque token that represents this particular result in this particular ChatMessage. To be used for /feedback reporting. - sourceDocument: - $ref: "#/components/schemas/Document" - sourceFile: - $ref: "#/components/schemas/ChatFile" - sourcePerson: - $ref: "#/components/schemas/Person" - sourceCustomEntity: - $ref: "#/components/schemas/CustomEntity" - referenceRanges: - description: Each reference range and its corresponding snippets - type: array - items: - $ref: "#/components/schemas/ReferenceRange" - displayName: - description: Human understandable name of the tool. Max 50 characters. - type: string - logoUrl: - type: string - description: URL used to fetch the logo. - objectName: - type: string - description: Name of the generated object. This will be used to indicate to the end user what the generated object contains. - example: - - HR ticket - - Email - - Chat message - PersonObject: - required: - - name - - obfuscatedId - properties: - name: - type: string - description: The display name. - obfuscatedId: - type: string - description: An opaque identifier that can be used to request metadata for a Person. - AuthConfig: - description: Config for tool's authentication method. - type: object - properties: - isOnPrem: - type: boolean - description: Whether or not this tool is hosted on-premise. - usesCentralAuth: - type: boolean - description: Whether or not this uses central auth. - type: - type: string - enum: - - NONE - - OAUTH_USER - - OAUTH_ADMIN - - API_KEY - - BASIC_AUTH - - DWD - description: | - The type of authentication being used. - Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. - 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. - 'OAUTH_USER' uses individual user tokens for external API calls. - 'DWD' refers to domain wide delegation. - grantType: - type: string - enum: - - AUTH_CODE - - CLIENT_CREDENTIALS - description: The type of grant type being used. - status: - type: string - description: Auth status of the tool. - enum: - - AWAITING_AUTH - - AUTHORIZED - - AUTH_DISABLED - client_url: - type: string - format: url - description: The URL where users will be directed to start the OAuth flow. - scopes: - type: array - items: - type: string - description: A list of strings denoting the different scopes or access levels required by the tool. - audiences: - type: array - items: + description: Human understandable name of the tool. Max 50 characters. type: string - description: A list of strings denoting the different audience which can access the tool. - authorization_url: - type: string - format: url - description: The OAuth provider's endpoint, where access tokens are requested. - resource: - type: string - format: url - description: The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present. - token_endpoint_auth_method: - type: string - enum: - - client_secret_post - - client_secret_basic - - none - description: The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2). - lastAuthorizedAt: - type: string - format: date-time - description: The time the tool was last authorized in ISO format (ISO 8601). - ToolMetadata: - description: The manifest for a tool that can be used to augment Glean Assistant. - required: - - type - - name - - displayName - - displayDescription - properties: - type: - description: The type of tool. - type: string - enum: - - RETRIEVAL - - ACTION - name: - description: Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. - type: string - displayName: - $ref: "#/components/schemas/displayName" - toolId: - type: string - description: An opaque id which is unique identifier for the tool. - displayDescription: - description: Description of the tool meant for a human. - type: string logoUrl: - $ref: "#/components/schemas/logoUrl" - objectName: - $ref: "#/components/schemas/objectName" - knowledgeType: - type: string - description: Indicates the kind of knowledge a tool would access or modify. - enum: - - NEUTRAL_KNOWLEDGE - - COMPANY_KNOWLEDGE - - WORLD_KNOWLEDGE - createdBy: - $ref: "#/components/schemas/PersonObject" - lastUpdatedBy: - $ref: "#/components/schemas/PersonObject" - createdAt: - type: string - format: date-time - description: The time the tool was created in ISO format (ISO 8601) - lastUpdatedAt: - type: string - format: date-time - description: The time the tool was last updated in ISO format (ISO 8601) - writeActionType: - type: string - description: Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. - enum: - - REDIRECT - - EXECUTION - - MCP - authType: - type: string - enum: - - NONE - - OAUTH_USER - - OAUTH_ADMIN - - API_KEY - - BASIC_AUTH - - DWD - description: | - The type of authentication being used. - Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. - 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. - 'OAUTH_USER' uses individual user tokens for external API calls. - 'DWD' refers to domain wide delegation. - auth: - deprecated: true - $ref: "#/components/schemas/AuthConfig" - permissions: - deprecated: true - $ref: "#/components/schemas/ObjectPermissions" - usageInstructions: - description: Usage instructions for the LLM to use this action. - type: string - isSetupFinished: - type: boolean - description: Whether this action has been fully configured and validated. - PossibleValue: - type: object - description: Possible value of a specific parameter - properties: - value: - type: string - description: Possible value - label: - type: string - description: User-friendly label associated with the value - WriteActionParameter: - type: object - properties: - type: - type: string - description: The type of the value (e.g., integer, string, boolean, etc.) - enum: - - UNKNOWN - - INTEGER - - STRING - - BOOLEAN - displayName: - type: string - description: Human readable display name for the key. - value: - type: string - description: The value of the field. - isRequired: - type: boolean - description: Is the parameter a required field. - description: - type: string - description: Description of the parameter. - possibleValues: - type: array - items: - $ref: "#/components/schemas/PossibleValue" - description: Possible values that the parameter can take. - ToolInfo: - type: object - properties: - metadata: - $ref: "#/components/schemas/ToolMetadata" - parameters: - type: object - description: Parameters supported by the tool. - additionalProperties: - $ref: "#/components/schemas/WriteActionParameter" - ChatMessageFragment: - description: Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file. - allOf: - - $ref: "#/components/schemas/Result" - - type: object - properties: - text: - type: string - querySuggestion: - description: The search queries issued while responding. - $ref: "#/components/schemas/QuerySuggestion" - file: - description: Files referenced in the message fragment. This is used to construct rich-text messages with file references. - $ref: "#/components/schemas/ChatFile" - action: - description: Basic information about an action. This can be used to construct rich-text messages with action references. - $ref: "#/components/schemas/ToolInfo" - citation: - description: Inline citation. - $ref: "#/components/schemas/ChatMessageCitation" - ChatMessage: - description: A message that is rendered as one coherent unit with one given sender. - properties: - agentConfig: - $ref: "#/components/schemas/AgentConfig" - description: Describes the agent config that generated this message. Populated on responses and not required on requests. - author: - default: USER - enum: - - USER - - GLEAN_AI - citations: - type: array - items: - $ref: "#/components/schemas/ChatMessageCitation" - description: "Deprecated: Use inline citations via ChatMessageFragment.citation instead. For detailed reference information, use ChatMessageCitation.referenceRanges. This field is still populated for backward compatibility." - deprecated: true - x-glean-deprecated: - id: 6446f85e-c90e-4c00-9717-796f9db3dc61 - introduced: "2026-02-06" - message: Use inline citations via ChatMessageFragment.citation and ChatMessageCitation.referenceRanges instead. This field is still populated for backward compatibility. - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-06, removal scheduled for 2026-10-15: Use inline citations via ChatMessageFragment.citation and ChatMessageCitation.referenceRanges instead. This field is still populated for backward compatibility." - uploadedFileIds: - type: array - items: - type: string - description: IDs of files uploaded in the message that are referenced to generate the answer. - fragments: - type: array - description: A list of rich data used to represent the response or formulate a request. These are linearly stitched together to support richer data formats beyond simple text. - items: - $ref: "#/components/schemas/ChatMessageFragment" - ts: - type: string - description: Response timestamp of the message. - messageId: - type: string - description: A unique server-side generated ID used to identify a message, automatically populated for any USER authored messages. - messageTrackingToken: - type: string - description: Opaque tracking token generated server-side. - messageType: - type: string - default: CONTENT - description: Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified. - x-enumDescriptions: - UPDATE: An intermediate state message for progress updates. - CONTENT: A user query or response message. - CONTEXT: A message providing context in addition to the user query. - CONTROL: Control signal for message streaming. - CONTROL_START: Control signal indicating the start of a message stream. - CONTROL_FINISH: Control signal indicating the end of a message stream. - CONTROL_CANCEL: Control signal indicating the message stream was cancelled. - CONTROL_RETRY: Indicates the message streaming needed to be retried. - CONTROL_UNKNOWN: Fallback control signal for unrecognized control types. - DEBUG: A debug message. Strictly used internally. - DEBUG_EXTERNAL: A debug message to be used while debugging Action creation. - ERROR: A message that describes an error while processing the request. - HEADING: A heading message used to distinguish different sections of the holistic response. - WARNING: A warning message to be shown to the user. - SERVER_TOOL: A message used to for server-side tool auth/use, for request and response. - enum: - - UPDATE - - CONTENT - - CONTEXT - - CONTROL - - CONTROL_START - - CONTROL_FINISH - - CONTROL_CANCEL - - CONTROL_RETRY - - CONTROL_UNKNOWN - - DEBUG - - DEBUG_EXTERNAL - - ERROR - - HEADING - - WARNING - - SERVER_TOOL - x-speakeasy-enum-descriptions: - UPDATE: An intermediate state message for progress updates. - CONTENT: A user query or response message. - CONTEXT: A message providing context in addition to the user query. - CONTROL: Control signal for message streaming. - CONTROL_START: Control signal indicating the start of a message stream. - CONTROL_FINISH: Control signal indicating the end of a message stream. - CONTROL_CANCEL: Control signal indicating the message stream was cancelled. - CONTROL_RETRY: Indicates the message streaming needed to be retried. - CONTROL_UNKNOWN: Fallback control signal for unrecognized control types. - DEBUG: A debug message. Strictly used internally. - DEBUG_EXTERNAL: A debug message to be used while debugging Action creation. - ERROR: A message that describes an error while processing the request. - HEADING: A heading message used to distinguish different sections of the holistic response. - WARNING: A warning message to be shown to the user. - SERVER_TOOL: A message used to for server-side tool auth/use, for request and response. - hasMoreFragments: - deprecated: true - type: boolean - description: Signals there are additional response fragments incoming. - ChatRequestBase: - required: - - messages - description: The minimal set of fields that form a chat request. - properties: - messages: - type: array - description: A list of chat messages, from most recent to least recent. At least one message must specify a USER author. - items: - $ref: "#/components/schemas/ChatMessage" - sessionInfo: - description: Optional object for tracking the session used by the client and for debugging purposes. - $ref: "#/components/schemas/SessionInfo" - saveChat: - type: boolean - description: Save the current interaction as a Chat for the user to access and potentially continue later. - chatId: - type: string - description: The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. - agentConfig: - $ref: "#/components/schemas/AgentConfig" - description: Describes the agent that will execute the request. - ChatRestrictionFilters: - allOf: - - $ref: "#/components/schemas/RestrictionFilters" - - type: object - properties: - documentSpecs: - type: array - items: - $ref: "#/components/schemas/DocumentSpec" - datasourceInstances: - type: array - items: - type: string - ChatRequest: - allOf: - - $ref: "#/components/schemas/ChatRequestBase" - - type: object - properties: - inclusions: - $ref: "#/components/schemas/ChatRestrictionFilters" - description: A list of filters which only allows chat to access certain content. - exclusions: - $ref: "#/components/schemas/ChatRestrictionFilters" - description: A list of filters which disallows chat from accessing certain content. If content is in both inclusions and exclusions, it'll be excluded. - timeoutMillis: - type: integer - description: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. - example: 30000 - applicationId: - type: string - description: The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used. - agentId: - type: string - description: The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. - 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. - ChatResponse: - description: A single response from the /chat backend. - properties: - messages: - type: array - items: - $ref: "#/components/schemas/ChatMessage" - chatId: - type: string - description: The id of the associated Chat the messages belong to, if one exists. - chat: - $ref: "#/components/schemas/ChatMetadata" - followUpPrompts: - type: array - items: type: string - description: Follow-up prompts for the user to potentially use - backendTimeMillis: - type: integer - format: int64 - description: Time in milliseconds the backend took to respond to the request. - example: 1100 - chatSessionTrackingToken: - type: string - description: A token that is used to track the session. - DeleteChatsRequest: - required: - - ids - properties: - ids: - type: array - items: - type: string - description: A non-empty list of ids of the Chats to be deleted. - GetChatRequest: - required: - - id - properties: - id: - type: string - description: The id of the Chat to be retrieved. - Chat: - description: A historical representation of a series of chat messages a user had with Glean Assistant. - allOf: - - $ref: "#/components/schemas/ChatMetadata" - - $ref: "#/components/schemas/PermissionedObject" - properties: - messages: - type: array - items: - $ref: "#/components/schemas/ChatMessage" - description: The chat messages within a Chat. - roles: - type: array - items: - $ref: "#/components/schemas/UserRoleSpecification" - description: A list of roles for this Chat. - ChatResult: - properties: - chat: - $ref: "#/components/schemas/Chat" - trackingToken: - type: string - description: An opaque token that represents this particular Chat. To be used for `/feedback` reporting. - GetChatResponse: - properties: - chatResult: - $ref: "#/components/schemas/ChatResult" - ChatMetadataResult: - properties: - chat: - $ref: "#/components/schemas/ChatMetadata" - trackingToken: - type: string - description: An opaque token that represents this particular Chat. To be used for `/feedback` reporting. - ListChatsResponse: - properties: - chatResults: - type: array - items: - $ref: "#/components/schemas/ChatMetadataResult" - x-includeEmpty: true - cursor: - type: string - description: An opaque cursor for fetching the next page of results. If empty, there are no more results. - GetChatApplicationRequest: - required: - - id - properties: - id: - type: string - description: The id of the Chat application to be retrieved. - ChatApplicationDetails: {} - GetChatApplicationResponse: - properties: - application: - $ref: "#/components/schemas/ChatApplicationDetails" - UploadChatFilesRequest: - required: - - files - properties: - files: - type: array - items: + description: URL used to fetch the logo. + objectName: type: string - format: binary - description: Raw files to be uploaded for chat in binary format. - UploadChatFilesResponse: - properties: - files: - type: array - items: - $ref: "#/components/schemas/ChatFile" - description: Files uploaded for chat. - GetChatFilesRequest: - required: - - fileIds - properties: - fileIds: - type: array - items: + description: Name of the generated object. This will be used to indicate to the end user what the generated object contains. + example: + - HR ticket + - Email + - Chat message + PersonObject: + required: + - name + - obfuscatedId + properties: + name: + type: string + description: The display name. + obfuscatedId: + type: string + description: An opaque identifier that can be used to request metadata for a Person. + AuthConfig: + description: Config for tool's authentication method. + type: object + properties: + isOnPrem: + type: boolean + description: Whether or not this tool is hosted on-premise. + usesCentralAuth: + type: boolean + description: Whether or not this uses central auth. + type: + type: string + enum: + - NONE + - OAUTH_USER + - OAUTH_ADMIN + - API_KEY + - BASIC_AUTH + - DWD + description: | + The type of authentication being used. + Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. + 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. + 'OAUTH_USER' uses individual user tokens for external API calls. + 'DWD' refers to domain wide delegation. + grantType: + type: string + enum: + - AUTH_CODE + - CLIENT_CREDENTIALS + description: The type of grant type being used. + status: + type: string + description: Auth status of the tool. + enum: + - AWAITING_AUTH + - AUTHORIZED + - AUTH_DISABLED + client_url: + type: string + format: url + description: The URL where users will be directed to start the OAuth flow. + scopes: + type: array + items: + type: string + description: A list of strings denoting the different scopes or access levels required by the tool. + audiences: + type: array + items: + type: string + description: A list of strings denoting the different audience which can access the tool. + authorization_url: + type: string + format: url + description: The OAuth provider's endpoint, where access tokens are requested. + resource: + type: string + format: url + description: The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present. + token_endpoint_auth_method: + type: string + enum: + - client_secret_post + - client_secret_basic + - none + description: The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2). + lastAuthorizedAt: + type: string + format: date-time + description: The time the tool was last authorized in ISO format (ISO 8601). + ToolMetadata: + description: The manifest for a tool that can be used to augment Glean Assistant. + required: + - type + - name + - displayName + - displayDescription + properties: + type: + description: The type of tool. + type: string + enum: + - RETRIEVAL + - ACTION + name: + description: Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. + type: string + displayName: + $ref: "#/components/schemas/displayName" + toolId: + type: string + description: An opaque id which is unique identifier for the tool. + displayDescription: + description: Description of the tool meant for a human. + type: string + logoUrl: + $ref: "#/components/schemas/logoUrl" + objectName: + $ref: "#/components/schemas/objectName" + knowledgeType: + type: string + description: Indicates the kind of knowledge a tool would access or modify. + enum: + - NEUTRAL_KNOWLEDGE + - COMPANY_KNOWLEDGE + - WORLD_KNOWLEDGE + createdBy: + $ref: "#/components/schemas/PersonObject" + lastUpdatedBy: + $ref: "#/components/schemas/PersonObject" + createdAt: + type: string + format: date-time + description: The time the tool was created in ISO format (ISO 8601) + lastUpdatedAt: + type: string + format: date-time + description: The time the tool was last updated in ISO format (ISO 8601) + writeActionType: + type: string + description: Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. + enum: + - REDIRECT + - EXECUTION + - MCP + authType: + type: string + enum: + - NONE + - OAUTH_USER + - OAUTH_ADMIN + - API_KEY + - BASIC_AUTH + - DWD + description: | + The type of authentication being used. + Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. + 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. + 'OAUTH_USER' uses individual user tokens for external API calls. + 'DWD' refers to domain wide delegation. + auth: + deprecated: true + $ref: "#/components/schemas/AuthConfig" + permissions: + deprecated: true + $ref: "#/components/schemas/ObjectPermissions" + usageInstructions: + description: Usage instructions for the LLM to use this action. + type: string + isSetupFinished: + type: boolean + description: Whether this action has been fully configured and validated. + PossibleValue: + type: object + description: Possible value of a specific parameter + properties: + value: + type: string + description: Possible value + label: + type: string + description: User-friendly label associated with the value + WriteActionParameter: + type: object + properties: + type: + type: string + description: The type of the value (e.g., integer, string, boolean, etc.) + enum: + - UNKNOWN + - INTEGER + - STRING + - BOOLEAN + displayName: + type: string + description: Human readable display name for the key. + value: + type: string + description: The value of the field. + isRequired: + type: boolean + description: Is the parameter a required field. + description: + type: string + description: Description of the parameter. + possibleValues: + type: array + items: + $ref: "#/components/schemas/PossibleValue" + description: Possible values that the parameter can take. + ToolInfo: + type: object + properties: + metadata: + $ref: "#/components/schemas/ToolMetadata" + parameters: + type: object + description: Parameters supported by the tool. + additionalProperties: + $ref: "#/components/schemas/WriteActionParameter" + ChatMessageFragment: + description: Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file. + allOf: + - $ref: "#/components/schemas/Result" + - type: object + properties: + text: + type: string + querySuggestion: + description: The search queries issued while responding. + $ref: "#/components/schemas/QuerySuggestion" + file: + description: Files referenced in the message fragment. This is used to construct rich-text messages with file references. + $ref: "#/components/schemas/ChatFile" + action: + description: Basic information about an action. This can be used to construct rich-text messages with action references. + $ref: "#/components/schemas/ToolInfo" + citation: + description: Inline citation. + $ref: "#/components/schemas/ChatMessageCitation" + ChatMessage: + description: A message that is rendered as one coherent unit with one given sender. + properties: + agentConfig: + $ref: "#/components/schemas/AgentConfig" + description: Describes the agent config that generated this message. Populated on responses and not required on requests. + author: + default: USER + enum: + - USER + - GLEAN_AI + citations: + type: array + items: + $ref: "#/components/schemas/ChatMessageCitation" + description: "Deprecated: Use inline citations via ChatMessageFragment.citation instead. For detailed reference information, use ChatMessageCitation.referenceRanges. This field is still populated for backward compatibility." + deprecated: true + x-glean-deprecated: + id: 6446f85e-c90e-4c00-9717-796f9db3dc61 + introduced: "2026-02-06" + message: Use inline citations via ChatMessageFragment.citation and ChatMessageCitation.referenceRanges instead. This field is still populated for backward compatibility. + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-06, removal scheduled for 2026-10-15: Use inline citations via ChatMessageFragment.citation and ChatMessageCitation.referenceRanges instead. This field is still populated for backward compatibility." + uploadedFileIds: + type: array + items: + type: string + description: IDs of files uploaded in the message that are referenced to generate the answer. + fragments: + type: array + description: A list of rich data used to represent the response or formulate a request. These are linearly stitched together to support richer data formats beyond simple text. + items: + $ref: "#/components/schemas/ChatMessageFragment" + ts: + type: string + description: Response timestamp of the message. + messageId: + type: string + description: A unique server-side generated ID used to identify a message, automatically populated for any USER authored messages. + messageTrackingToken: + type: string + description: Opaque tracking token generated server-side. + messageType: + type: string + default: CONTENT + description: Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified. + x-enumDescriptions: + UPDATE: An intermediate state message for progress updates. + CONTENT: A user query or response message. + CONTEXT: A message providing context in addition to the user query. + CONTROL: Control signal for message streaming. + CONTROL_START: Control signal indicating the start of a message stream. + CONTROL_FINISH: Control signal indicating the end of a message stream. + CONTROL_CANCEL: Control signal indicating the message stream was cancelled. + CONTROL_RETRY: Indicates the message streaming needed to be retried. + CONTROL_UNKNOWN: Fallback control signal for unrecognized control types. + DEBUG: A debug message. Strictly used internally. + DEBUG_EXTERNAL: A debug message to be used while debugging Action creation. + ERROR: A message that describes an error while processing the request. + HEADING: A heading message used to distinguish different sections of the holistic response. + WARNING: A warning message to be shown to the user. + SERVER_TOOL: A message used to for server-side tool auth/use, for request and response. + x-speakeasy-enum-descriptions: + UPDATE: An intermediate state message for progress updates. + CONTENT: A user query or response message. + CONTEXT: A message providing context in addition to the user query. + CONTROL: Control signal for message streaming. + CONTROL_START: Control signal indicating the start of a message stream. + CONTROL_FINISH: Control signal indicating the end of a message stream. + CONTROL_CANCEL: Control signal indicating the message stream was cancelled. + CONTROL_RETRY: Indicates the message streaming needed to be retried. + CONTROL_UNKNOWN: Fallback control signal for unrecognized control types. + DEBUG: A debug message. Strictly used internally. + DEBUG_EXTERNAL: A debug message to be used while debugging Action creation. + ERROR: A message that describes an error while processing the request. + HEADING: A heading message used to distinguish different sections of the holistic response. + WARNING: A warning message to be shown to the user. + SERVER_TOOL: A message used to for server-side tool auth/use, for request and response. + enum: + - UPDATE + - CONTENT + - CONTEXT + - CONTROL + - CONTROL_START + - CONTROL_FINISH + - CONTROL_CANCEL + - CONTROL_RETRY + - CONTROL_UNKNOWN + - DEBUG + - DEBUG_EXTERNAL + - ERROR + - HEADING + - WARNING + - SERVER_TOOL + hasMoreFragments: + deprecated: true + type: boolean + description: Signals there are additional response fragments incoming. + ChatRequestBase: + required: + - messages + description: The minimal set of fields that form a chat request. + properties: + messages: + type: array + description: A list of chat messages, from most recent to least recent. At least one message must specify a USER author. + items: + $ref: "#/components/schemas/ChatMessage" + sessionInfo: + description: Optional object for tracking the session used by the client and for debugging purposes. + $ref: "#/components/schemas/SessionInfo" + saveChat: + type: boolean + description: Save the current interaction as a Chat for the user to access and potentially continue later. + chatId: + type: string + description: The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. + agentConfig: + $ref: "#/components/schemas/AgentConfig" + description: Describes the agent that will execute the request. + ChatRestrictionFilters: + allOf: + - $ref: "#/components/schemas/RestrictionFilters" + - type: object + properties: + documentSpecs: + type: array + items: + $ref: "#/components/schemas/DocumentSpec" + datasourceInstances: + type: array + items: + type: string + ChatRequest: + allOf: + - $ref: "#/components/schemas/ChatRequestBase" + - type: object + properties: + inclusions: + $ref: "#/components/schemas/ChatRestrictionFilters" + description: A list of filters which only allows chat to access certain content. + exclusions: + $ref: "#/components/schemas/ChatRestrictionFilters" + description: A list of filters which disallows chat from accessing certain content. If content is in both inclusions and exclusions, it'll be excluded. + timeoutMillis: + type: integer + description: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. + example: 30000 + applicationId: + type: string + description: The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used. + agentId: + type: string + description: The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. + 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. + ChatResponse: + description: A single response from the /chat backend. + properties: + messages: + type: array + items: + $ref: "#/components/schemas/ChatMessage" + chatId: + type: string + description: The id of the associated Chat the messages belong to, if one exists. + chat: + $ref: "#/components/schemas/ChatMetadata" + followUpPrompts: + type: array + items: + type: string + description: Follow-up prompts for the user to potentially use + backendTimeMillis: + type: integer + format: int64 + description: Time in milliseconds the backend took to respond to the request. + example: 1100 + chatSessionTrackingToken: + type: string + description: A token that is used to track the session. + DeleteChatsRequest: + required: + - ids + properties: + ids: + type: array + items: + type: string + description: A non-empty list of ids of the Chats to be deleted. + GetChatRequest: + required: + - id + properties: + id: + type: string + description: The id of the Chat to be retrieved. + Chat: + description: A historical representation of a series of chat messages a user had with Glean Assistant. + allOf: + - $ref: "#/components/schemas/ChatMetadata" + - $ref: "#/components/schemas/PermissionedObject" + properties: + messages: + type: array + items: + $ref: "#/components/schemas/ChatMessage" + description: The chat messages within a Chat. + roles: + type: array + items: + $ref: "#/components/schemas/UserRoleSpecification" + description: A list of roles for this Chat. + ChatResult: + properties: + chat: + $ref: "#/components/schemas/Chat" + trackingToken: + type: string + description: An opaque token that represents this particular Chat. To be used for `/feedback` reporting. + GetChatResponse: + properties: + chatResult: + $ref: "#/components/schemas/ChatResult" + ChatMetadataResult: + properties: + chat: + $ref: "#/components/schemas/ChatMetadata" + trackingToken: + type: string + description: An opaque token that represents this particular Chat. To be used for `/feedback` reporting. + ListChatsResponse: + properties: + chatResults: + type: array + items: + $ref: "#/components/schemas/ChatMetadataResult" + x-includeEmpty: true + cursor: + type: string + description: An opaque cursor for fetching the next page of results. If empty, there are no more results. + GetChatApplicationRequest: + required: + - id + properties: + id: + type: string + description: The id of the Chat application to be retrieved. + ChatApplicationDetails: {} + GetChatApplicationResponse: + properties: + application: + $ref: "#/components/schemas/ChatApplicationDetails" + UploadChatFilesRequest: + required: + - files + properties: + files: + type: array + items: + type: string + format: binary + description: Raw files to be uploaded for chat in binary format. + UploadChatFilesResponse: + properties: + files: + type: array + items: + $ref: "#/components/schemas/ChatFile" + description: Files uploaded for chat. + GetChatFilesRequest: + required: + - fileIds + properties: + fileIds: + type: array + items: + type: string + description: IDs of files to fetch. + GetChatFilesResponse: + properties: + files: + description: A map of file IDs to ChatFile structs. + type: object + additionalProperties: + $ref: "#/components/schemas/ChatFile" + DeleteChatFilesRequest: + required: + - fileIds + properties: + fileIds: + type: array + items: + type: string + description: IDs of files to delete. + WorkflowDraftableProperties: + properties: + name: + type: string + description: The name of the workflow. + WorkflowMutableProperties: + type: object + allOf: + - $ref: "#/components/schemas/WorkflowDraftableProperties" + - type: object + CreateWorkflowRequest: + allOf: + - $ref: "#/components/schemas/WorkflowMutableProperties" + - type: object + properties: + transient: + type: boolean + description: Used to create a transient workflow. + parentWorkflowId: + type: string + description: id of the parent workflow for transient workflows + WorkflowMetadata: + allOf: + - type: object + properties: + author: + $ref: "#/components/schemas/Person" + createTimestamp: + type: integer + description: Server Unix timestamp of the creation time. + lastUpdateTimestamp: + type: integer + description: Server Unix timestamp of the last update time. + lastDraftSavedAt: + type: integer + description: Server Unix timestamp of the last time the draft was saved. + lastDraftSavedBy: + description: The person who last saved the draft. + $ref: "#/components/schemas/Person" + lastDraftGitAuthorId: + type: string + description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. + lastUpdatedBy: + $ref: "#/components/schemas/Person" + AttributionProperties: {} + Workflow: + allOf: + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/WorkflowMutableProperties" + - $ref: "#/components/schemas/WorkflowMetadata" + - $ref: "#/components/schemas/AttributionProperties" + - type: object + properties: + id: + type: string + description: The ID of the workflow. + verified: + type: boolean + readOnly: true + description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. + showOrganizationAsAuthor: + type: boolean + readOnly: true + description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. + WorkflowResult: + type: object + required: + - workflow + properties: + workflow: + $ref: "#/components/schemas/Workflow" + CreateWorkflowResponse: + allOf: + - $ref: "#/components/schemas/WorkflowResult" + Agent: + title: Agent + type: object + required: + - agent_id + - name + - capabilities + properties: + agent_id: + type: string + title: Agent Id + description: The ID of the agent. + example: mho4lwzylcozgoc2 + name: + type: string + title: Agent Name + description: The name of the agent + example: HR Policy Agent + description: + type: string + title: Description + description: The description of the agent. + example: This agent answers questions about the current company HR policies. + metadata: + type: object + title: Metadata + description: The agent metadata. Currently not implemented. + capabilities: + type: object + title: Agent Capabilities + description: |- + Describes features that the agent supports. example: { + "ap.io.messages": true, + "ap.io.streaming": true + } + properties: + ap.io.messages: + type: boolean + title: Messages + description: Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent. + ap.io.streaming: + type: boolean + title: Streaming + description: Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming. + additionalProperties: true + ErrorResponse: + description: Error response returned for failed requests + type: object + properties: + message: + description: Client-facing error message describing what went wrong + type: string + EditWorkflowRequest: + allOf: + - $ref: "#/components/schemas/WorkflowMutableProperties" + - type: object + properties: + id: + type: string + description: The workflow ID we want to update. + ActionSummary: + type: object + description: Represents a minimal summary of an action. + required: + - tool_id + - display_name + properties: + tool_id: + type: string + description: The unique identifier of the action. + display_name: + type: string + description: The display name of the action. + type: + type: string + description: The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data. + auth_type: + type: string + description: The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE. + write_action_type: + type: string + description: For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call). + is_setup_finished: + type: boolean + description: Whether this action has been fully configured and validated. + x-includeEmpty: true + data_source: + type: string + description: | + Indicates the kind of knowledge a tool would access or modify. + Company knowledge: + - Glean search, and any native tools that derive from it (e.g., expert search, code search) + - Native federated tools to company data sources (e.g., outlook search) + World knowledge: + - Platform action like bravewebsearch, geminiwebsearch, etc + Neutral knowledge: + - Native tools that don't access or modify content via APIs (e.g., file analyst, think) + - Platform read or write tools (creator has to determine their knowledge implications) + AgentSchemas: + properties: + agent_id: + type: string + title: Agent Id + description: The ID of the agent. + example: mho4lwzylcozgoc2 + name: + type: string + title: Agent Name + description: The name of the agent. + example: HR Policy Agent + input_schema: + type: object + title: Input Schema + description: The schema for the agent input. In JSON Schema format. + output_schema: + type: object + title: Output Schema + description: The schema for the agent output. In JSON Schema format. + tools: + type: array + title: Tools + description: List of tools that the agent can invoke. Only included when include_tools query parameter is set to true. + items: + $ref: "#/components/schemas/ActionSummary" + type: object + required: + - agent_id + - input_schema + - output_schema + title: AgentSchemas + description: Defines the structure and properties of an agent. + SearchAgentsRequest: + type: object + properties: + name: + type: string + description: Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter. + example: HR Policy Agent + SearchAgentsResponse: + type: object + title: Response Search Agents + properties: + agents: + type: array + items: + $ref: "#/components/schemas/Agent" + ContentType: type: string - description: IDs of files to fetch. - GetChatFilesResponse: - properties: - files: - description: A map of file IDs to ChatFile structs. - type: object - additionalProperties: - $ref: "#/components/schemas/ChatFile" - DeleteChatFilesRequest: - required: - - fileIds - properties: - fileIds: - type: array - items: + enum: + - text + Message: + type: object + properties: + role: + type: string + title: Role + description: The role of the message. + example: USER + content: + title: Content + description: The content of the message. + type: array + items: + type: object + properties: + text: + type: string + type: + $ref: "#/components/schemas/ContentType" + required: + - text + - type + title: MessageTextBlock + AgentRunCreate: + description: "Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`\"\"`) for optional fields without values. Omitting required form fields will result in a 500 error." + type: object + required: + - agent_id + properties: + agent_id: + type: string + title: Agent Id + description: The ID of the agent to run. + input: + type: object + title: Input + description: The input to the agent. Required when the agent uses an input form trigger. + additionalProperties: true + messages: + type: array + items: + $ref: "#/components/schemas/Message" + title: Messages + description: The messages to pass an input to the agent. + metadata: + type: object + title: Metadata + description: The metadata to pass to the agent. + additionalProperties: true + AgentExecutionStatus: + description: The status of the run. One of 'error', 'success'. type: string - description: IDs of files to delete. - Agent: - title: Agent - type: object - required: - - agent_id - - name - - capabilities - properties: - agent_id: - type: string - title: Agent Id - description: The ID of the agent. - example: mho4lwzylcozgoc2 - name: - type: string - title: Agent Name - description: The name of the agent - example: HR Policy Agent - description: - type: string - title: Description - description: The description of the agent. - example: This agent answers questions about the current company HR policies. - metadata: - type: object - title: Metadata - description: The agent metadata. Currently not implemented. - capabilities: - type: object - title: Agent Capabilities - description: |- - Describes features that the agent supports. example: { - "ap.io.messages": true, - "ap.io.streaming": true - } - properties: - ap.io.messages: - type: boolean - title: Messages - description: Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent. - ap.io.streaming: - type: boolean - title: Streaming - description: Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming. - additionalProperties: true - ErrorResponse: - type: object - description: Error response returned for failed requests - properties: - message: - type: string - description: Client-facing error message describing what went wrong - WorkflowDraftableProperties: - properties: - name: - type: string - description: The name of the workflow. - WorkflowMutableProperties: - type: object - allOf: - - $ref: "#/components/schemas/WorkflowDraftableProperties" - - type: object - EditWorkflowRequest: - allOf: - - $ref: "#/components/schemas/WorkflowMutableProperties" - - type: object - properties: - id: - type: string - description: The workflow ID we want to update. - ActionSummary: - type: object - description: Represents a minimal summary of an action. - required: - - tool_id - - display_name - properties: - tool_id: - type: string - description: The unique identifier of the action. - display_name: - type: string - description: The display name of the action. - type: - type: string - description: The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data. - auth_type: - type: string - description: The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE. - write_action_type: - type: string - description: For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call). - is_setup_finished: - type: boolean - description: Whether this action has been fully configured and validated. - x-includeEmpty: true - data_source: - type: string - description: | - Indicates the kind of knowledge a tool would access or modify. - Company knowledge: - - Glean search, and any native tools that derive from it (e.g., expert search, code search) - - Native federated tools to company data sources (e.g., outlook search) - World knowledge: - - Platform action like bravewebsearch, geminiwebsearch, etc - Neutral knowledge: - - Native tools that don't access or modify content via APIs (e.g., file analyst, think) - - Platform read or write tools (creator has to determine their knowledge implications) - AgentSchemas: - properties: - agent_id: - type: string - title: Agent Id - description: The ID of the agent. - example: mho4lwzylcozgoc2 - name: - type: string - title: Agent Name - description: The name of the agent. - example: HR Policy Agent - input_schema: - type: object - title: Input Schema - description: The schema for the agent input. In JSON Schema format. - output_schema: - type: object - title: Output Schema - description: The schema for the agent output. In JSON Schema format. - tools: - type: array - title: Tools - description: List of tools that the agent can invoke. Only included when include_tools query parameter is set to true. - items: - $ref: "#/components/schemas/ActionSummary" - type: object - required: - - agent_id - - input_schema - - output_schema - title: AgentSchemas - description: Defines the structure and properties of an agent. - SearchAgentsRequest: - type: object - properties: - name: - type: string - description: Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter. - example: HR Policy Agent - SearchAgentsResponse: - type: object - title: Response Search Agents - properties: - agents: - type: array - items: - $ref: "#/components/schemas/Agent" - ContentType: - type: string - enum: - - text - Message: - type: object - properties: - role: - type: string - title: Role - description: The role of the message. - example: USER - content: - title: Content - description: The content of the message. - type: array - items: - type: object - properties: - text: - type: string - type: - $ref: "#/components/schemas/ContentType" - required: - - text - - type - title: MessageTextBlock - AgentRunCreate: - description: "Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`\"\"`) for optional fields without values. Omitting required form fields will result in a 500 error." - type: object - required: - - agent_id - properties: - agent_id: - type: string - title: Agent Id - description: The ID of the agent to run. - input: - type: object - title: Input - description: The input to the agent. Required when the agent uses an input form trigger. - additionalProperties: true - messages: - type: array - items: - $ref: "#/components/schemas/Message" - title: Messages - description: The messages to pass an input to the agent. - metadata: - type: object - title: Metadata - description: The metadata to pass to the agent. - additionalProperties: true - AgentExecutionStatus: - description: The status of the run. One of 'error', 'success'. - type: string - enum: - - error - - success - title: AgentExecutionStatus - AgentRun: - allOf: - - $ref: "#/components/schemas/AgentRunCreate" - - type: object - properties: - status: - $ref: "#/components/schemas/AgentExecutionStatus" - AgentRunWaitResponse: - type: object - properties: - run: - $ref: "#/components/schemas/AgentRun" - title: Run - description: The run information. - messages: - type: array - items: - $ref: "#/components/schemas/Message" - title: Messages - description: The messages returned by the run. - CollectionItemDescriptor: - allOf: - - $ref: "#/components/schemas/CollectionItemMutableProperties" - properties: - url: - type: string - description: The URL of the item being added. - documentId: - type: string - description: The Glean Document ID of the item being added if it's an indexed document. - newNextItemId: - type: string - description: The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection - itemType: - type: string - enum: - - DOCUMENT - - TEXT - - URL - AddCollectionItemsRequest: - required: - - collectionId - properties: - collectionId: - type: number - description: The ID of the Collection to add items to. - addedCollectionItemDescriptors: - type: array - items: - $ref: "#/components/schemas/CollectionItemDescriptor" - description: The CollectionItemDescriptors of the items being added. - AddCollectionItemsError: - properties: - errorType: - type: string - enum: - - EXISTING_ITEM - - CORRUPT_ITEM - AddCollectionItemsResponse: - properties: - collection: - $ref: "#/components/schemas/Collection" - description: The modified Collection. Only CollectionItemMutableProperties are set for each item. - error: - $ref: "#/components/schemas/AddCollectionItemsError" - CreateCollectionRequest: - allOf: - - $ref: "#/components/schemas/CollectionMutableProperties" - - type: object - properties: - newNextItemId: - type: string - description: The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection. Only used if parentId is specified. - CollectionError: - required: - - errorCode - properties: - errorCode: - type: string - enum: - - NAME_EXISTS - - NOT_FOUND - - COLLECTION_PINNED - - CONCURRENT_HIERARCHY_EDIT - - HEIGHT_VIOLATION - - WIDTH_VIOLATION - - NO_PERMISSIONS - - CORRUPT_ITEM - CreateCollectionResponse: - allOf: - - type: object - anyOf: - - required: - - collection - - required: + enum: - error - properties: - collection: - $ref: "#/components/schemas/Collection" - error: - $ref: "#/components/schemas/CollectionError" - DeleteCollectionRequest: - required: - - ids - properties: - ids: - type: array - items: - type: integer - description: The IDs of the Collections to delete. - allowedDatasource: - type: string - description: The datasource allowed in the Collection to be deleted. - DeleteCollectionItemRequest: - required: - - collectionId - - itemId - properties: - collectionId: - type: number - description: The ID of the Collection to remove an item in. - itemId: - type: string - description: The item ID of the CollectionItem to remove from this Collection. - documentId: - type: string - description: The (optional) Glean Document ID of the CollectionItem to remove from this Collection if this is an indexed document. - DeleteCollectionItemResponse: - properties: - collection: - $ref: "#/components/schemas/Collection" - description: The modified Collection. Only CollectionItemMutableProperties are set for each item. - EditCollectionRequest: - allOf: - - $ref: "#/components/schemas/CollectionMutableProperties" - - type: object - required: - - id - properties: - id: - type: integer - description: The ID of the Collection to modify. - EditCollectionResponse: - allOf: - - $ref: "#/components/schemas/Collection" - - $ref: "#/components/schemas/CollectionError" - - type: object - properties: - collection: - $ref: "#/components/schemas/Collection" - error: - $ref: "#/components/schemas/CollectionError" - EditCollectionItemRequest: - required: - - collectionId - - itemId - allOf: - - $ref: "#/components/schemas/CollectionItemMutableProperties" - - type: object - properties: - collectionId: - type: integer - description: The ID of the Collection to edit CollectionItems in. - itemId: - type: string - description: The ID of the CollectionItem to edit. - EditCollectionItemResponse: - properties: - collection: - $ref: "#/components/schemas/Collection" - description: The modified Collection. Only CollectionItemMutableProperties are set for each item. - GetCollectionRequest: - required: - - id - properties: - id: - type: integer - description: The ID of the Collection to be retrieved. - withItems: - type: boolean - description: Whether or not to include the Collection Items in this Collection. Only request if absolutely required, as this is expensive. - withHierarchy: - type: boolean - description: Whether or not to include the top level Collection in this Collection's hierarchy. - allowedDatasource: - type: string - description: The datasource allowed in the Collection returned. - GetCollectionResponse: - properties: - collection: - $ref: "#/components/schemas/Collection" - rootCollection: - $ref: "#/components/schemas/Collection" - error: - $ref: "#/components/schemas/CollectionError" - trackingToken: - type: string - description: Use `collection.trackingToken` instead. - deprecated: true - x-glean-deprecated: - id: 2d6ca3a7-4763-4137-9ebd-740568fe8300 - introduced: "2026-05-07" - message: Use `collection.trackingToken` instead. - removal: "2027-01-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-05-07, removal scheduled for 2027-01-15: Use `collection.trackingToken` instead." - ListCollectionsRequest: - properties: - includeAudience: - type: boolean - description: Whether to include the audience filters with the listed Collections. - includeRoles: - type: boolean - description: Whether to include the editor roles with the listed Collections. - allowedDatasource: - type: string - description: |- - The datasource type this Collection can hold. - ANSWERS - for Collections representing answer boards - ListCollectionsResponse: - required: - - collections - properties: - collections: - type: array - items: - $ref: "#/components/schemas/Collection" - description: List of all Collections, no Collection items are fetched. - GetDocPermissionsRequest: - type: object - properties: - documentId: - type: string - description: The Glean Document ID to retrieve permissions for. - GetDocPermissionsResponse: - type: object - properties: - allowedUserEmails: - type: array - items: - type: string - description: A list of emails of users who have access to the document. If the document is visible to all Glean users, a list with only a single value of 'VISIBLE_TO_ALL'. - GetDocumentsRequest: - required: - - documentSpecs - properties: - documentSpecs: - type: array - items: - $ref: "#/components/schemas/DocumentSpec" - description: The specification for the documents to be retrieved. - includeFields: - description: List of Document fields to return (that aren't returned by default) - type: array - items: + - success + title: AgentExecutionStatus + AgentRun: + allOf: + - $ref: "#/components/schemas/AgentRunCreate" + - type: object + properties: + status: + $ref: "#/components/schemas/AgentExecutionStatus" + AgentRunWaitResponse: + type: object + properties: + run: + $ref: "#/components/schemas/AgentRun" + title: Run + description: The run information. + messages: + type: array + items: + $ref: "#/components/schemas/Message" + title: Messages + description: The messages returned by the run. + CollectionItemDescriptor: + allOf: + - $ref: "#/components/schemas/CollectionItemMutableProperties" + properties: + url: + type: string + description: The URL of the item being added. + documentId: + type: string + description: The Glean Document ID of the item being added if it's an indexed document. + newNextItemId: + type: string + description: The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection + itemType: + type: string + enum: + - DOCUMENT + - TEXT + - URL + AddCollectionItemsRequest: + required: + - collectionId + properties: + collectionId: + type: number + description: The ID of the Collection to add items to. + addedCollectionItemDescriptors: + type: array + items: + $ref: "#/components/schemas/CollectionItemDescriptor" + description: The CollectionItemDescriptors of the items being added. + AddCollectionItemsError: + properties: + errorType: + type: string + enum: + - EXISTING_ITEM + - CORRUPT_ITEM + AddCollectionItemsResponse: + properties: + collection: + $ref: "#/components/schemas/Collection" + description: The modified Collection. Only CollectionItemMutableProperties are set for each item. + error: + $ref: "#/components/schemas/AddCollectionItemsError" + CreateCollectionRequest: + allOf: + - $ref: "#/components/schemas/CollectionMutableProperties" + - type: object + properties: + newNextItemId: + type: string + description: The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection. Only used if parentId is specified. + CollectionError: + required: + - errorCode + properties: + errorCode: + type: string + enum: + - NAME_EXISTS + - NOT_FOUND + - COLLECTION_PINNED + - CONCURRENT_HIERARCHY_EDIT + - HEIGHT_VIOLATION + - WIDTH_VIOLATION + - NO_PERMISSIONS + - CORRUPT_ITEM + CreateCollectionResponse: + allOf: + - type: object + anyOf: + - required: + - collection + - required: + - error + properties: + collection: + $ref: "#/components/schemas/Collection" + error: + $ref: "#/components/schemas/CollectionError" + DeleteCollectionRequest: + required: + - ids + properties: + ids: + type: array + items: + type: integer + description: The IDs of the Collections to delete. + allowedDatasource: + type: string + description: The datasource allowed in the Collection to be deleted. + DeleteCollectionItemRequest: + required: + - collectionId + - itemId + properties: + collectionId: + type: number + description: The ID of the Collection to remove an item in. + itemId: + type: string + description: The item ID of the CollectionItem to remove from this Collection. + documentId: + type: string + description: The (optional) Glean Document ID of the CollectionItem to remove from this Collection if this is an indexed document. + DeleteCollectionItemResponse: + properties: + collection: + $ref: "#/components/schemas/Collection" + description: The modified Collection. Only CollectionItemMutableProperties are set for each item. + EditCollectionRequest: + allOf: + - $ref: "#/components/schemas/CollectionMutableProperties" + - type: object + required: + - id + properties: + id: + type: integer + description: The ID of the Collection to modify. + EditCollectionResponse: + allOf: + - $ref: "#/components/schemas/Collection" + - $ref: "#/components/schemas/CollectionError" + - type: object + properties: + collection: + $ref: "#/components/schemas/Collection" + error: + $ref: "#/components/schemas/CollectionError" + EditCollectionItemRequest: + required: + - collectionId + - itemId + allOf: + - $ref: "#/components/schemas/CollectionItemMutableProperties" + - type: object + properties: + collectionId: + type: integer + description: The ID of the Collection to edit CollectionItems in. + itemId: + type: string + description: The ID of the CollectionItem to edit. + EditCollectionItemResponse: + properties: + collection: + $ref: "#/components/schemas/Collection" + description: The modified Collection. Only CollectionItemMutableProperties are set for each item. + GetCollectionRequest: + required: + - id + properties: + id: + type: integer + description: The ID of the Collection to be retrieved. + withItems: + type: boolean + description: Whether or not to include the Collection Items in this Collection. Only request if absolutely required, as this is expensive. + withHierarchy: + type: boolean + description: Whether or not to include the top level Collection in this Collection's hierarchy. + allowedDatasource: + type: string + description: The datasource allowed in the Collection returned. + GetCollectionResponse: + properties: + collection: + $ref: "#/components/schemas/Collection" + rootCollection: + $ref: "#/components/schemas/Collection" + error: + $ref: "#/components/schemas/CollectionError" + trackingToken: + type: string + description: Use `collection.trackingToken` instead. + deprecated: true + x-glean-deprecated: + id: 2d6ca3a7-4763-4137-9ebd-740568fe8300 + introduced: "2026-05-07" + message: Use `collection.trackingToken` instead. + removal: "2027-01-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-05-07, removal scheduled for 2027-01-15: Use `collection.trackingToken` instead." + ListCollectionsRequest: + properties: + includeAudience: + type: boolean + description: Whether to include the audience filters with the listed Collections. + includeRoles: + type: boolean + description: Whether to include the editor roles with the listed Collections. + allowedDatasource: + type: string + description: |- + The datasource type this Collection can hold. + ANSWERS - for Collections representing answer boards + ListCollectionsResponse: + required: + - collections + properties: + collections: + type: array + items: + $ref: "#/components/schemas/Collection" + description: List of all Collections, no Collection items are fetched. + GetDocPermissionsRequest: + type: object + properties: + documentId: + type: string + description: The Glean Document ID to retrieve permissions for. + GetDocPermissionsResponse: + type: object + properties: + allowedUserEmails: + type: array + items: + type: string + description: A list of emails of users who have access to the document. If the document is visible to all Glean users, a list with only a single value of 'VISIBLE_TO_ALL'. + GetDocumentsRequest: + required: + - documentSpecs + properties: + documentSpecs: + type: array + items: + $ref: "#/components/schemas/DocumentSpec" + description: The specification for the documents to be retrieved. + includeFields: + description: List of Document fields to return (that aren't returned by default) + type: array + items: + type: string + enum: + - LAST_VIEWED_AT + - VISITORS_COUNT + - RECENT_SHARES + - DOCUMENT_CONTENT + - CUSTOM_METADATA + DocumentOrError: + x-omit-error-on-success: true + oneOf: + - $ref: "#/components/schemas/Document" + - type: object + required: + - error + properties: + error: + type: string + description: The text for error, reason. + x-is-error-field: true + GetDocumentsResponse: + properties: + documents: + type: object + additionalProperties: + $ref: "#/components/schemas/DocumentOrError" + description: The document details or the error if document is not found. + GetDocumentsByFacetsRequest: + required: + - filterSets + properties: + datasourcesFilter: + type: array + items: + type: string + description: Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. + filterSets: + type: array + items: + $ref: "#/components/schemas/FacetFilterSet" + description: A list of facet filter sets that will be OR'ed together. An AND is assumed between different filters in each set. + cursor: + type: string + description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + GetDocumentsByFacetsResponse: + properties: + documents: + type: array + items: + $ref: "#/components/schemas/Document" + description: The document details, ordered by score. + hasMoreResults: + type: boolean + description: Whether more results are available. Use cursor to retrieve them. + cursor: + type: string + description: Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. + InsightsOverviewRequest: + properties: + departments: + type: array + items: + type: string + description: Departments for which Insights are requested. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. + dayRange: + $ref: "#/components/schemas/Period" + description: Time period for which Insights are requested. + InsightsAssistantRequest: + properties: + departments: + type: array + items: + type: string + description: Departments for which Insights are requested. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. + dayRange: + $ref: "#/components/schemas/Period" + description: Time period for which Insights are requested. + AgentsInsightsV2Request: + properties: + agentIds: + type: array + items: + type: string + description: IDs of the Agents for which Insights should be returned. An empty array signifies all. + departments: + type: array + items: + type: string + description: Departments for which Insights are requested. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. + dayRange: + $ref: "#/components/schemas/Period" + description: Time period for which Insights are requested. + McpInsightsRequest: + properties: + departments: + type: array + items: + type: string + description: Departments for which Insights are requested. + managerIds: + type: array + items: + type: string + description: Manager user IDs whose teams should be filtered for. Empty array means no filtering. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. + dayRange: + $ref: "#/components/schemas/Period" + description: Time period for which Insights are requested. + McpBreakdownInsightsRequest: + properties: + departments: + type: array + items: + type: string + description: Departments for which Insights are requested. + managerIds: + type: array + items: + type: string + description: Manager user IDs whose teams should be filtered for. Empty array means no filtering. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. + dayRange: + $ref: "#/components/schemas/Period" + description: Time period for which Insights are requested. + breakdownType: + type: string + enum: + - USERS + - HOST_APPLICATIONS + - TOOLS + - SERVERS + description: Type of breakdown to return. + hostApplications: + type: array + items: + type: string + description: Host applications to filter by. Empty array means all host applications. + tools: + type: array + items: + type: string + description: MCP tools to filter by. Empty array means all tools. + servers: + type: array + items: + type: string + description: MCP servers to filter by. Empty array means all servers. + InsightsRequest: + properties: + overviewRequest: + $ref: "#/components/schemas/InsightsOverviewRequest" + x-visibility: Public + description: If specified, will return data for the Overview section of the Insights Dashboard. + assistantRequest: + $ref: "#/components/schemas/InsightsAssistantRequest" + x-visibility: Public + description: If specified, will return data for the Assistant section of the Insights Dashboard. + agentsRequest: + $ref: "#/components/schemas/AgentsInsightsV2Request" + x-visibility: Public + description: If specified, will return data for the Agents section of the Insights Dashboard. + mcpRequest: + $ref: "#/components/schemas/McpInsightsRequest" + description: If specified, will return data for the MCP section of the Insights Dashboard. + mcpBreakdownRequest: + $ref: "#/components/schemas/McpBreakdownInsightsRequest" + disablePerUserInsights: + type: boolean + description: If true, suppresses the generation of per-user Insights in the response. Default is false. + UserActivityInsight: + required: + - user + - activity + properties: + user: + $ref: "#/components/schemas/Person" + activity: + type: string + enum: + - ALL + - SEARCH + description: Activity e.g. search, home page visit or all. + lastActivityTimestamp: + type: integer + description: Unix timestamp of the last activity (in seconds since epoch UTC). + activityCount: + $ref: "#/components/schemas/CountInfo" + activeDayCount: + $ref: "#/components/schemas/CountInfo" + GleanAssistInsightsResponse: + properties: + lastLogTimestamp: + type: integer + description: Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + activityInsights: + type: array + items: + $ref: "#/components/schemas/UserActivityInsight" + description: Insights for all active users with respect to set of actions. + totalActiveUsers: + type: integer + description: Total number of active users in the requested period. + datasourceInstances: + type: array + items: + type: string + description: List of datasource instances for which glean assist is enabled. + departments: + type: array + items: + type: string + description: List of departments applicable for users tab. + CurrentActiveUsers: + properties: + monthlyActiveUsers: + type: integer + description: Number of current Monthly Active Users. + weeklyActiveUsers: + type: integer + description: Number of current Weekly Active Users. + InsightsSearchSummary: + allOf: + - $ref: "#/components/schemas/CurrentActiveUsers" + - type: object + properties: + numSearches: + type: integer + description: Total number of searches by users over the specified time period. + numSearchUsers: + type: integer + description: Total number of distinct users who searched over the specified time period. + InsightsChatSummary: + allOf: + - $ref: "#/components/schemas/CurrentActiveUsers" + - type: object + properties: + numChats: + type: integer + description: Total number of chats by users over the specified time period. + numChatUsers: + type: integer + description: Total number of distinct users who used Chat over the specified time period. + InsightsDepartmentsSummary: + allOf: + - $ref: "#/components/schemas/CurrentActiveUsers" + - type: object + properties: + departments: + type: array + items: + type: string + description: Department name(s). + employeeCount: + type: integer + description: Number of current employees in the specified departments, according to the Org Chart. + totalSignups: + type: integer + description: Number of current signed up employees in the specified departments, according to the Org Chart. + searchSummary: + $ref: "#/components/schemas/InsightsSearchSummary" + chatSummary: + $ref: "#/components/schemas/InsightsChatSummary" + searchActiveUsers: + $ref: "#/components/schemas/CurrentActiveUsers" + description: Search-specific active user counts for the specified departments. + assistantActiveUsers: + $ref: "#/components/schemas/CurrentActiveUsers" + description: Assistant-specific active user counts for the specified departments. + agentsActiveUsers: + $ref: "#/components/schemas/CurrentActiveUsers" + description: Agents-specific active user counts for the specified departments. + mcpActiveUsers: + $ref: "#/components/schemas/CurrentActiveUsers" + description: MCP active user counts for the specified departments. + extensionSummary: + $ref: "#/components/schemas/CurrentActiveUsers" + ugcSummary: + $ref: "#/components/schemas/CurrentActiveUsers" + LabeledCountInfo: + required: + - label + properties: + label: + type: string + description: Label for the included count information. + countInfo: + type: array + items: + $ref: "#/components/schemas/CountInfo" + description: List of data points for counts for a given date period. + PerUserInsight: + properties: + person: + $ref: "#/components/schemas/Person" + numSearches: + type: integer + description: Total number of searches by this user over the specified time period. + numChats: + type: integer + description: Total number of chats by this user over the specified time period. + numActiveSessions: + type: integer + description: Total number of active sessions by this user in a Glean client over the specified time period. + numGleanbotUsefulResponses: + type: integer + description: Total number of Gleanbot responses marked useful by this user over the specified time period. + numDaysActive: + type: integer + description: Total number of days this user was an Active User over the specified time period. + numSummarizations: + type: integer + description: Total number of summarized items by this user over the specified time period. + numAiAnswers: + type: integer + description: Total number of AI Answers interacted with by this user over the specified time period. + numAgentRuns: + type: integer + description: Total number of agent runs for this user over the specified time period. + numMcpCalls: + type: integer + description: Total number of MCP calls for this user over the specified time period. + InsightsOverviewResponse: + allOf: + - $ref: "#/components/schemas/InsightsDepartmentsSummary" + - type: object + properties: + lastUpdatedTs: + type: integer + description: Unix timestamp of the last update for the insights data in the response. + searchSessionSatisfaction: + type: number + format: float + description: Search session satisfaction rate, over the specified time period in the specified departments. + deprecated: true + x-glean-deprecated: + id: 2652ea73-3e33-4409-ba8c-bda7b60a2c24 + introduced: "2026-05-13" + message: This property is no longer supported. Please contact Support for alternatives. + removal: "2027-01-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-05-13, removal scheduled for 2027-01-15: This property is no longer supported. Please contact Support for alternatives." + monthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + weeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + dailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchMonthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchWeeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantMonthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantWeeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentsMonthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentsWeeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentsDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + mcpMonthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + mcpWeeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + mcpDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchesTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantInteractionsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentRunsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + mcpCallsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchDatasourceCounts: + type: object + additionalProperties: + type: integer + description: Counts of search result clicks, by datasource, over the specified time period in the specified departments. + chatDatasourceCounts: + type: object + additionalProperties: + type: integer + description: Counts of cited documents in chat, by datasource, over the specified time period in the specified departments. + perUserInsights: + type: array + items: + $ref: "#/components/schemas/PerUserInsight" + description: Per-user insights, over the specified time period in the specified departments. All current users in the organization who have signed into Glean at least once are included. + PerUserAssistantInsight: + properties: + person: + $ref: "#/components/schemas/Person" + numChatMessages: + type: integer + description: Total number of chat messages sent by this user over the specified time period. + numSummarizations: + type: integer + description: Total number of summarized items by this user over the specified time period. + numAiAnswers: + type: integer + description: Total number of AI Answers interacted with by this user over the specified time period. + numGleanbotInteractions: + type: integer + description: Total number of Gleanbot responses marked useful by this user over the specified time period. + numDaysActive: + type: integer + description: Total number of days this user was active on the Assistant over the specified time period. + AssistantInsightsResponse: + allOf: + - $ref: "#/components/schemas/CurrentActiveUsers" + - type: object + properties: + lastUpdatedTs: + type: integer + description: Unix timestamp of the last update for the insights data in the response. + monthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + weeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + dailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + totalSignups: + type: integer + description: Number of current signed up employees in the specified departments, according to the Org Chart. + chatMessagesTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + summarizationsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + aiAnswersTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + gleanbotInteractionsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + perUserInsights: + type: array + items: + $ref: "#/components/schemas/PerUserAssistantInsight" + upvotesTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + downvotesTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + PerAgentInsight: + properties: + agentId: + type: string + description: Agent ID + agentName: + type: string + description: Agent name + icon: + $ref: "#/components/schemas/IconConfig" + description: Agent icon configuration + isDeleted: + type: boolean + description: Indicates whether the agent has been deleted + userCount: + type: integer + description: Total number of users for this agent over the specified time period. + runCount: + type: integer + description: Total number of runs for this agent over the specified time period. + upvoteCount: + type: integer + description: Total number of upvotes for this agent over the specified time period. + downvoteCount: + type: integer + description: Total number of downvotes for this agent over the specified time period. + owner: + $ref: "#/components/schemas/Person" + description: | + The creator/owner of the agent. Absent if agent is deleted or owner is unknown. + AgentUseCaseInsight: + properties: + useCase: + type: string + description: Use case name + runCount: + type: integer + description: Total number of runs for this use case over the specified time period. + trend: + type: number + format: float + description: Percentage change in runs compared to the previous equivalent time period. + topDepartments: + type: string + description: Comma-separated list of the top departments using this use case. + topAgentId: + type: string + description: ID of the most-used agent for this use case. + topAgentName: + type: string + description: Name of the most-used agent for this use case. + topAgentIcon: + $ref: "#/components/schemas/IconConfig" + description: Icon of the most-used agent for this use case. + topAgentIsDeleted: + type: boolean + description: Indicates whether the top agent has been deleted. + AgentsUsageByDepartmentInsight: + properties: + department: + type: string + description: Name of the department + agentAdoptionRate: + type: number + format: float + description: Percentage of employees in the department who have used agents at least once over the specified time period. + userCount: + type: integer + description: Total number of users in this department who have used any agent over the specified time period. + runCount: + type: integer + description: Total number of runs in this department over the specified time period. + agentId: + type: string + description: ID of the agent to be shown in the agent column in this department over the specified time period. + agentName: + type: string + description: Name of the agent to be shown in the agent column in this department over the specified time period. + icon: + $ref: "#/components/schemas/IconConfig" + description: Agent icon configuration + isDeleted: + type: boolean + description: Indicates whether the agent has been deleted + AgentUsersInsight: + properties: + person: + $ref: "#/components/schemas/Person" + departmentName: + type: string + description: Department name + agentsUsedCount: + type: integer + description: Total number of agents used by this user over the specified time period. + averageRunsPerDayCount: + type: number + format: float + description: Average number of runs per day for this user over the specified time period. + agentsCreatedCount: + type: integer + description: Total number of agents created by this user over the specified time period. + runCount: + type: integer + description: Total number of agent runs for this user over the specified time period. + AgentsTimeSavedInsight: + properties: + agentId: + type: string + description: Agent ID + agentName: + type: string + description: Agent name + icon: + $ref: "#/components/schemas/IconConfig" + description: Agent icon configuration + isDeleted: + type: boolean + description: Indicates whether the agent has been deleted + runCount: + type: integer + description: Total number of runs for this agent over the specified time period. + minsPerRun: + type: number + format: float + description: Average minutes saved per run for this agent over the specified time period. + feedbackUserCount: + type: integer + description: Total number of users who provided feedback on time saved for this agent over the specified time period. + AgentsInsightsV2Response: + allOf: + - $ref: "#/components/schemas/CurrentActiveUsers" + - type: object + properties: + monthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + weeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + dailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + sharedAgentsCount: + type: integer + description: Total number of shared agents. + topAgentsInsights: + type: array + items: + $ref: "#/components/schemas/PerAgentInsight" + topUseCasesInsights: + type: array + items: + $ref: "#/components/schemas/AgentUseCaseInsight" + agentsUsageByDepartmentInsights: + type: array + items: + $ref: "#/components/schemas/AgentsUsageByDepartmentInsight" + agentUsersInsights: + type: array + items: + $ref: "#/components/schemas/AgentUsersInsight" + agentsTimeSavedInsights: + type: array + items: + $ref: "#/components/schemas/AgentsTimeSavedInsight" + description: Insights for agents time saved over the specified time period. + dailyAgentRunsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + successfulRunsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + failedRunsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + pausedRunsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + upvotesTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + downvotesTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + McpInsightsResponse: + allOf: + - $ref: "#/components/schemas/CurrentActiveUsers" + - type: object + properties: + dailyActiveUsers: + type: integer + description: Number of current Daily Active Users. + monthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + weeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + dailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + overallDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + topHostApplicationsActiveUserTimeseries: + type: array + items: + $ref: "#/components/schemas/LabeledCountInfo" + McpUserBreakdown: + properties: + person: + $ref: "#/components/schemas/Person" + totalCalls: + type: integer + description: Total number of MCP calls made by this user in the specified time period. + hostApplications: + type: array + items: + type: string + description: Host applications used by this user in the specified time period. + tools: + type: array + items: + type: string + description: MCP tools used by this user in the specified time period. + servers: + type: array + items: + type: string + description: MCP servers used by this user in the specified time period. + McpHostApplicationBreakdown: + properties: + hostApplication: + type: string + description: Host application name. + totalCalls: + type: integer + description: Total number of MCP calls made from this host application in the specified time period. + activeUsers: + type: integer + description: Total number of active users from this host application in the specified time period. + McpToolBreakdown: + properties: + tool: + type: string + description: MCP tool name. + totalCalls: + type: integer + description: Total number of MCP calls for this tool in the specified time period. + activeUsers: + type: integer + description: Total number of active users for this tool in the specified time period. + hostApplications: + type: array + items: + type: string + description: Host applications using this tool in the specified time period. + McpServerBreakdown: + properties: + server: + type: string + description: MCP server name. + totalCalls: + type: integer + description: Total number of MCP calls for this server in the specified time period. + activeUsers: + type: integer + description: Total number of active users for this server in the specified time period. + hostApplications: + type: array + items: + type: string + description: Host applications using this server in the specified time period. + McpBreakdownInsightsResponse: + properties: + usersBreakdown: + type: array + items: + $ref: "#/components/schemas/McpUserBreakdown" + hostApplicationsBreakdown: + type: array + items: + $ref: "#/components/schemas/McpHostApplicationBreakdown" + toolsBreakdown: + type: array + items: + $ref: "#/components/schemas/McpToolBreakdown" + serversBreakdown: + type: array + items: + $ref: "#/components/schemas/McpServerBreakdown" + InsightsResponse: + properties: + gleanAssist: + deprecated: true + $ref: "#/components/schemas/GleanAssistInsightsResponse" + x-glean-deprecated: + id: 15850758-4d95-4d98-8d57-39c50663a796 + introduced: "2026-02-05" + message: Field is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" + overviewResponse: + $ref: "#/components/schemas/InsightsOverviewResponse" + assistantResponse: + $ref: "#/components/schemas/AssistantInsightsResponse" + agentsResponse: + $ref: "#/components/schemas/AgentsInsightsV2Response" + mcpResponse: + $ref: "#/components/schemas/McpInsightsResponse" + mcpBreakdownResponse: + $ref: "#/components/schemas/McpBreakdownInsightsResponse" + MessagesRequest: + required: + - id + - idType + - datasource + properties: + idType: + type: string + enum: + - CHANNEL_NAME + - THREAD_ID + - CONVERSATION_ID + description: Type of the id in the incoming request. + id: + type: string + description: ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID. + workspaceId: + type: string + description: Id for the for the workspace in case of multiple workspaces. + direction: + type: string + enum: + - OLDER + - NEWER + description: The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. + timestampMillis: + type: integer + format: int64 + description: Timestamp in millis of the reference message. Only applicable when using a message_id. + includeRootMessage: + type: boolean + description: Whether to include root message in response. + datasource: + type: string + enum: + - SLACK + - SLACKENTGRID + - MICROSOFTTEAMS + - GCHAT + - FACEBOOKWORKPLACE + description: The type of the data source. + datasourceInstanceDisplayName: + type: string + description: The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. + InvalidOperatorValueError: + properties: + key: + description: The operator key that has an invalid value. + type: string + value: + description: The invalid operator value. + type: string + ErrorMessage: + properties: + source: + description: The datasource this message relates to. + type: string + errorMessage: + type: string + ErrorInfo: + properties: + badGmailToken: + type: boolean + description: Indicates the gmail results could not be fetched due to bad token. + badOutlookToken: + type: boolean + description: Indicates the outlook results could not be fetched due to bad token. + invalidOperators: + type: array + description: Indicates results could not be fetched due to invalid operators in the query. + items: + $ref: "#/components/schemas/InvalidOperatorValueError" + errorMessages: + type: array + items: + $ref: "#/components/schemas/ErrorMessage" + federatedSearchRateLimitError: + type: boolean + description: Indicates the federated search results could not be fetched due to rate limiting. + x-speakeasy-name-override: GleanDataError + ResultsResponse: + properties: + trackingToken: + type: string + description: A token that should be passed for additional requests related to this request (such as more results requests). + sessionInfo: + $ref: "#/components/schemas/SessionInfo" + results: + type: array + items: + $ref: "#/components/schemas/SearchResult" + structuredResults: + type: array + items: + $ref: "#/components/schemas/StructuredResult" + generatedQnaResult: + $ref: "#/components/schemas/GeneratedQna" + errorInfo: + $ref: "#/components/schemas/ErrorInfo" + requestID: + type: string + description: A platform-generated request ID to correlate backend logs. + backendTimeMillis: + type: integer + format: int64 + description: Time in milliseconds the backend took to respond to the request. + example: 1100 + BackendExperimentsContext: + properties: + experimentIds: + type: array + items: + type: integer + format: int64 + description: List of experiment ids for the corresponding request. + SearchWarning: + required: + - warningType + properties: + warningType: + type: string + enum: + - LONG_QUERY + - QUOTED_PUNCTUATION + - PUNCTUATION_ONLY + - COPYPASTED_QUOTES + - INVALID_OPERATOR + - MAYBE_INVALID_FACET_QUERY + - TOO_MANY_DATASOURCE_GROUPS + description: The type of the warning. + lastUsedTerm: + type: string + description: The last term we considered in the user's long query. + quotesIgnoredQuery: + type: string + description: The query after ignoring/removing quotes. + ignoredTerms: + type: array + items: + type: string + description: A list of query terms that were ignored when generating search results, if any. For example, terms containing invalid filters such as "updated:invalid_date" will be ignored. + SearchResponseMetadata: + properties: + rewrittenQuery: + type: string + description: A cleaned up or updated version of the query to be displayed in the query box. Useful for mapping visual facets to search operators. + searchedQuery: + type: string + description: The actual query used to perform search and return results. + searchedQueryWithoutNegation: + type: string + description: The query used to perform search and return results, with negated terms and facets removed. + x-includeEmpty: true + searchedQueryRanges: + type: array + items: + $ref: "#/components/schemas/TextRange" + description: The bolded ranges within the searched query. + originalQuery: + type: string + description: The query text sent by the client in the request. + querySuggestion: + $ref: "#/components/schemas/QuerySuggestion" + description: An alternative query to the one provided that may give better results, e.g. a spelling suggestion. + additionalQuerySuggestions: + $ref: "#/components/schemas/QuerySuggestionList" + description: Other alternative queries that may provide better or more specific results than the original query. + negatedTerms: + type: array + items: + type: string + description: A list of terms that were negated when processing the query. + modifiedQueryWasUsed: + type: boolean + description: A different query was performed than the one requested. + originalQueryHadNoResults: + type: boolean + description: No results were found for the original query. The usage of this bit in conjunction with modifiedQueryWasUsed will dictate whether the full page replacement is 0-result or few-result based. + searchWarning: + $ref: "#/components/schemas/SearchWarning" + triggeredExpertDetection: + type: boolean + description: Whether the query triggered expert detection results in the People tab. + isNoQuotesSuggestion: + type: boolean + description: Whether the query was modified to remove quotes + FacetValue: + properties: + stringValue: + type: string + example: engineering + description: The value that should be set in the FacetFilter when applying this filter to a search request. + integerValue: + type: integer + example: 5 + displayLabel: + type: string + example: engineering + description: An optional user-friendly label to display in place of the facet value. + iconConfig: + $ref: "#/components/schemas/IconConfig" + FacetBucket: + properties: + count: + type: integer + description: Estimated number of results in this facet. + example: 1 + datasource: + type: string + example: jira + description: The datasource the value belongs to. This will be used by the all tab to show types across all datasources. + percentage: + type: integer + description: Estimated percentage of results in this facet. + example: 5 + value: + $ref: "#/components/schemas/FacetValue" + FacetResult: + properties: + sourceName: + type: string + description: The source of this facet (e.g. container_name, type, last_updated_at). + example: container_name + operatorName: + type: string + description: How to display this facet. Currently supportes 'SelectSingle' and 'SelectMultiple'. + example: SelectMultiple + buckets: + type: array + description: A list of unique buckets that exist within this result set. + items: + $ref: "#/components/schemas/FacetBucket" + hasMoreBuckets: + type: boolean + description: Returns true if more buckets exist than those returned. Additional buckets can be retrieve by requesting again with a higher facetBucketSize. + example: false + groupName: + type: string + description: For most facets this will be the empty string, meaning the facet is high-level and applies to all documents for the datasource. When non-empty, this is used to group facets together (i.e. group facets for each doctype for a certain datasource) + example: Service Cloud + ResultsDescription: + properties: + text: + type: string + description: Textual description of the results. Can be shown at the top of SERP, e.g. 'People who write about this topic' for experts in people tab. + iconConfig: + $ref: "#/components/schemas/IconConfig" + description: The config for the icon that's displayed with this description + SearchResponse: + allOf: + - $ref: "#/components/schemas/ResultsResponse" + - $ref: "#/components/schemas/BackendExperimentsContext" + - type: object + properties: + metadata: + $ref: "#/components/schemas/SearchResponseMetadata" + facetResults: + type: array + items: + $ref: "#/components/schemas/FacetResult" + resultTabs: + type: array + items: + $ref: "#/components/schemas/ResultTab" + description: All result tabs available for the current query. Populated if QUERY_METADATA is specified in the request. + resultTabIds: + type: array + items: + type: string + description: The unique IDs of the result tabs to which this response belongs. + resultsDescription: + $ref: "#/components/schemas/ResultsDescription" + rewrittenFacetFilters: + type: array + items: + $ref: "#/components/schemas/FacetFilter" + description: The actual applied facet filters based on the operators and facetFilters in the query. Useful for mapping typed operators to visual facets. + cursor: + type: string + description: Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. + hasMoreResults: + type: boolean + description: Whether more results are available. Use cursor to retrieve them. + example: + trackingToken: trackingToken + suggestedSpellCorrectedQuery: suggestedSpellCorrectedQuery + hasMoreResults: true + errorInfo: + errorMessages: + - source: gmail + errorMessage: invalid token + - source: slack + errorMessage: expired token + requestID: 5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100 + results: + - snippets: + - snippet: snippet + mimeType: mimeType + metadata: + container: container + createTime: "2000-01-23T04:56:07.000Z" + datasource: datasource + author: + name: name + documentId: documentId + updateTime: "2000-01-23T04:56:07.000Z" + mimeType: mimeType + objectType: objectType + title: title + url: https://www.example.com/ + - snippets: + - snippet: snippet + mimeType: mimeType + metadata: + container: container + createTime: "2000-01-23T04:56:07.000Z" + datasource: datasource + author: + name: name + documentId: documentId + updateTime: "2000-01-23T04:56:07.000Z" + mimeType: mimeType + objectType: objectType + title: title + url: https://www.example.com/ + facetResults: + - buckets: + - percentage: 5 + count: 1 + value: + stringValue: stringValue + integerValue: 5 + - percentage: 5 + count: 1 + value: + stringValue: stringValue + integerValue: 5 + sourceName: sourceName + operatorName: operatorName + objectType: objectType + - buckets: + - percentage: 5 + count: 1 + value: + stringValue: stringValue + integerValue: 5 + - percentage: 5 + count: 1 + value: + stringValue: stringValue + integerValue: 5 + sourceName: sourceName + operatorName: operatorName + objectType: objectType + rewrittenQuery: rewrittenQuery + rewrittenFacetFilters: + - fieldName: fieldName + values: + - fieldValues + - fieldValues + - fieldName: fieldName + values: + - fieldValues + - fieldValues + MessagesResponse: + required: + - hasMore + properties: + hasMore: + type: boolean + description: Whether there are more results for client to continue requesting. + searchResponse: + $ref: "#/components/schemas/SearchResponse" + rootMessage: + $ref: "#/components/schemas/SearchResult" + EditPinRequest: + allOf: + - $ref: "#/components/schemas/PinDocumentMutableProperties" + - type: object + properties: + id: + type: string + description: The opaque id of the pin to be edited. + GetPinRequest: + properties: + id: + type: string + description: The opaque id of the pin to be fetched. + GetPinResponse: + properties: + pin: + $ref: "#/components/schemas/PinDocument" + ListPinsResponse: + required: + - pins + properties: + pins: + type: array + items: + $ref: "#/components/schemas/PinDocument" + description: List of pinned documents. + PinRequest: + allOf: + - $ref: "#/components/schemas/PinDocumentMutableProperties" + - type: object + properties: + documentId: + type: string + description: The document to be pinned. + Unpin: + properties: + id: + type: string + description: The opaque id of the pin to be unpinned. + ResultsRequest: + properties: + timestamp: + type: string + description: The ISO 8601 timestamp associated with the client request. + format: date-time + trackingToken: + type: string + description: A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. + sessionInfo: + $ref: "#/components/schemas/SessionInfo" + sourceDocument: + $ref: "#/components/schemas/Document" + description: The document from which the ResultsRequest is issued, if any. + pageSize: + type: integer + example: 100 + description: Hint to the server about how many results to send back. Server may return less or more. Structured results and clustered results don't count towards pageSize. + maxSnippetSize: + type: integer + description: Hint to the server about how many characters long a snippet may be. Server may return less or more. + example: 400 + SearchRequest: + required: + - query + allOf: + - $ref: "#/components/schemas/ResultsRequest" + - type: object + properties: + query: + type: string + description: The search terms. + example: vacation policy + cursor: + type: string + description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + resultTabIds: + type: array + items: + type: string + description: The unique IDs of the result tabs for which to fetch results. This will have precedence over datasource filters if both are specified and in conflict. + inputDetails: + $ref: "#/components/schemas/SearchRequestInputDetails" + requestOptions: + $ref: "#/components/schemas/SearchRequestOptions" + timeoutMillis: + type: integer + description: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. + example: 5000 + disableSpellcheck: + type: boolean + description: Whether or not to disable spellcheck. + example: + trackingToken: trackingToken + query: vacation policy + pageSize: 10 + requestOptions: + facetFilters: + - fieldName: type + values: + - value: article + relationType: EQUALS + - value: document + relationType: EQUALS + - fieldName: department + values: + - value: engineering + relationType: EQUALS + AutocompleteRequest: + type: object + properties: + trackingToken: + type: string + sessionInfo: + $ref: "#/components/schemas/SessionInfo" + query: + type: string + description: Partially typed query. + example: San Fra + datasourcesFilter: + type: array + items: + type: string + description: Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). Results are unfiltered if missing. + datasource: + type: string + description: Filter to only return results relevant to the given datasource. + resultTypes: + type: array + description: Filter to only return results of the given type(s). All types may be returned if omitted. + items: + type: string + enum: + - ADDITIONAL_DOCUMENT + - APP + - BROWSER_HISTORY + - DATASOURCE + - DOCUMENT + - ENTITY + - GOLINK + - HISTORY + - CHAT_HISTORY + - NEW_CHAT + - OPERATOR + - OPERATOR_VALUE + - QUICKLINK + - SUGGESTION + resultSize: + type: integer + description: | + Maximum number of results to be returned. If no value is provided, the backend will cap at 200. + example: 10 + authTokens: + type: array + description: Auth tokens which may be used for federated results. + items: + $ref: "#/components/schemas/AuthToken" + example: + trackingToken: trackingToken + query: what is a que + datasource: GDRIVE + resultSize: 10 + OperatorScope: + properties: + datasource: + type: string + docType: + type: string + OperatorMetadata: + required: + - name + properties: + name: + type: string + isCustom: + type: boolean + description: Whether this operator is supported by default or something that was created within a workplace app (e.g. custom jira field). + operatorType: + type: string + enum: + - TEXT + - DOUBLE + - DATE + - USER + helpText: + type: string + scopes: + type: array + items: + $ref: "#/components/schemas/OperatorScope" + value: + type: string + description: Raw/canonical value of the operator. Only applies when result is an operator value. + displayValue: + type: string + description: Human readable value of the operator that can be shown to the user. Only applies when result is an operator value. + example: + name: Last Updated + operatorType: DATE + scopes: + - datasource: GDRIVE + docType: Document + - datasource: ZENDESK + Quicklink: + description: An action for a specific datasource that will show up in autocomplete and app card, e.g. "Create new issue" for jira. + properties: + name: + type: string + description: Full action name. Used in autocomplete. + shortName: + type: string + description: Shortened name. Used in app cards. + url: + type: string + description: The URL of the action. + iconConfig: + $ref: "#/components/schemas/IconConfig" + description: The config for the icon for this quicklink + id: + type: string + description: Unique identifier of this quicklink + scopes: + type: array + description: The scopes for which this quicklink is applicable + items: + type: string + enum: + - APP_CARD + - AUTOCOMPLETE_EXACT_MATCH + - AUTOCOMPLETE_FUZZY_MATCH + - AUTOCOMPLETE_ZERO_QUERY + - NEW_TAB_PAGE + AutocompleteResult: + required: + - result + - result_type + properties: + result: + type: string + keywords: + type: array + items: + type: string + description: A list of all possible keywords for given result. + resultType: + type: string + enum: + - ADDITIONAL_DOCUMENT + - APP + - BROWSER_HISTORY + - DATASOURCE + - DOCUMENT + - ENTITY + - GOLINK + - HISTORY + - CHAT_HISTORY + - NEW_CHAT + - OPERATOR + - OPERATOR_VALUE + - QUICKLINK + - SUGGESTION + score: + type: number + description: Higher indicates a more confident match. + operatorMetadata: + $ref: "#/components/schemas/OperatorMetadata" + quicklink: + $ref: "#/components/schemas/Quicklink" + document: + $ref: "#/components/schemas/Document" + url: + type: string + structuredResult: + $ref: "#/components/schemas/StructuredResult" + trackingToken: + type: string + description: A token to be passed in /feedback events associated with this autocomplete result. + ranges: + type: array + items: + $ref: "#/components/schemas/TextRange" + description: Subsections of the result string to which some special formatting should be applied (eg. bold) + example: + result: sample result + resultType: DOCUMENT + score: 4.56 + url: https://www.example.com/ + trackingToken: abcd + metadata: + - datasource: confluence + - objectType: page + AutocompleteResultGroup: + description: A subsection of the results list from which distinct sections should be created. + properties: + startIndex: + type: integer + description: The inclusive start index of the range. + endIndex: + type: integer + description: The exclusive end index of the range. + title: + type: string + description: The title of the result group to be displayed. Empty means no title. + AutocompleteResponse: + allOf: + - $ref: "#/components/schemas/BackendExperimentsContext" + - type: object + properties: + trackingToken: + type: string + description: An opaque token that represents this particular set of autocomplete results. To be used for /feedback reporting. + sessionInfo: + $ref: "#/components/schemas/SessionInfo" + results: + type: array + items: + $ref: "#/components/schemas/AutocompleteResult" + groups: + type: array + items: + $ref: "#/components/schemas/AutocompleteResultGroup" + description: Subsections of the results list from which distinct sections should be created. + errorInfo: + $ref: "#/components/schemas/ErrorInfo" + backendTimeMillis: + type: integer + format: int64 + description: Time in milliseconds the backend took to respond to the request. + example: 1100 + example: + trackingToken: trackingToken + ChatZeroStateSuggestionOptions: + properties: + applicationId: + type: string + description: The Chat Application ID this feed request should be scoped to. Empty means there is no Chat Application ID.. + FeedRequestOptions: + required: + - resultSize + properties: + resultSize: + type: integer + description: Number of results asked in response. If a result is a collection, counts as one. + timezoneOffset: + type: integer + description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + categoryToResultSize: + type: object + additionalProperties: + type: object + properties: + resultSize: + type: integer + description: Mapping from category to number of results asked for the category. + datasourceFilter: + type: array + items: + type: string + description: Datasources for which content should be included. Empty is for all. + chatZeroStateSuggestionOptions: + $ref: "#/components/schemas/ChatZeroStateSuggestionOptions" + FeedRequest: + required: + - refreshType + properties: + categories: + type: array + items: + type: string + enum: + - DOCUMENT_SUGGESTION + - DOCUMENT_SUGGESTION_SCENARIO + - TRENDING_DOCUMENT + - VERIFICATION_REMINDER + - EVENT + - ANNOUNCEMENT + - MENTION + - DATASOURCE_AFFINITY + - RECENT + - COMPANY_RESOURCE + - EXPERIMENTAL + - PEOPLE_CELEBRATIONS + - DISPLAYABLE_LIST + - SOCIAL_LINK + - EXTERNAL_TASKS + - WORKFLOW_COLLECTIONS + - ZERO_STATE_CHAT_SUGGESTION + - ZERO_STATE_CHAT_TOOL_SUGGESTION + - ZERO_STATE_WORKFLOW_CREATED_BY_ME + - ZERO_STATE_WORKFLOW_FAVORITES + - ZERO_STATE_WORKFLOW_POPULAR + - ZERO_STATE_WORKFLOW_RECENT + - ZERO_STATE_WORKFLOW_SUGGESTION + - PERSONALIZED_CHAT_SUGGESTION + - DAILY_DIGEST + - TASK + - PLAN_MY_DAY + - END_MY_DAY + - STARTER_KIT + - MID_DAY_CATCH_UP + - QUERY_SUGGESTION + - COWORK_CUJ_PROMO + - CARD_STACK_PROMO + - WEEKLY_MEETINGS + - FOLLOW_UP + - MILESTONE_TIMELINE_CHECK + - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK + - PROJECT_NEXT_STEP + - DEMO_CARD + - OOO_PLANNER + - OOO_CATCH_UP + description: Categories of content requested. An allowlist gives flexibility to request content separately or together. + requestOptions: + $ref: "#/components/schemas/FeedRequestOptions" + timeoutMillis: + type: integer + description: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. + example: 5000 + sessionInfo: + $ref: "#/components/schemas/SessionInfo" + DisplayableListFormat: + properties: + format: + type: string + enum: + - LIST + description: defines how to render this particular displayable list card + DisplayableListItemUIConfig: + type: object + description: UI configurations for each item of the list + properties: + showNewIndicator: + type: boolean + description: show a "New" pill next to the item + ConferenceData: + required: + - provider + - uri + properties: + provider: + type: string + enum: + - ZOOM + - HANGOUTS + uri: + type: string + description: A permalink for the conference. + source: + type: string + enum: + - NATIVE_CONFERENCE + - LOCATION + - DESCRIPTION + EventClassificationName: + description: The name for a generated classification of an event. type: string enum: - - LAST_VIEWED_AT - - VISITORS_COUNT - - RECENT_SHARES - - DOCUMENT_CONTENT - - CUSTOM_METADATA - DocumentOrError: - x-omit-error-on-success: true - oneOf: - - $ref: "#/components/schemas/Document" - - type: object - required: - - error - properties: - error: - type: string - description: The text for error, reason. - x-is-error-field: true - GetDocumentsResponse: - properties: - documents: - type: object - additionalProperties: - $ref: "#/components/schemas/DocumentOrError" - description: The document details or the error if document is not found. - GetDocumentsByFacetsRequest: - required: - - filterSets - properties: - datasourcesFilter: - type: array - items: + - External Event + EventStrategyName: type: string - description: Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. - filterSets: - type: array - items: - $ref: "#/components/schemas/FacetFilterSet" - description: A list of facet filter sets that will be OR'ed together. An AND is assumed between different filters in each set. - cursor: - type: string - description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. - GetDocumentsByFacetsResponse: - properties: - documents: - type: array - items: - $ref: "#/components/schemas/Document" - description: The document details, ordered by score. - hasMoreResults: - type: boolean - description: Whether more results are available. Use cursor to retrieve them. - cursor: - type: string - description: Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. - InsightsOverviewRequest: - properties: - departments: - type: array - items: - type: string - description: Departments for which Insights are requested. - managerEmails: - type: array - items: - type: string - description: Manager emails whose teams should be filtered for. Empty array means no filtering. - dayRange: - $ref: "#/components/schemas/Period" - description: Time period for which Insights are requested. - InsightsAssistantRequest: - properties: - departments: - type: array - items: - type: string - description: Departments for which Insights are requested. - managerEmails: - type: array - items: - type: string - description: Manager emails whose teams should be filtered for. Empty array means no filtering. - dayRange: - $ref: "#/components/schemas/Period" - description: Time period for which Insights are requested. - AgentsInsightsV2Request: - properties: - agentIds: - type: array - items: - type: string - description: IDs of the Agents for which Insights should be returned. An empty array signifies all. - departments: - type: array - items: - type: string - description: Departments for which Insights are requested. - managerEmails: - type: array - items: - type: string - description: Manager emails whose teams should be filtered for. Empty array means no filtering. - dayRange: - $ref: "#/components/schemas/Period" - description: Time period for which Insights are requested. - McpInsightsRequest: - properties: - departments: - type: array - items: - type: string - description: Departments for which Insights are requested. - managerIds: - type: array - items: - type: string - description: Manager user IDs whose teams should be filtered for. Empty array means no filtering. - managerEmails: - type: array - items: - type: string - description: Manager emails whose teams should be filtered for. Empty array means no filtering. - dayRange: - $ref: "#/components/schemas/Period" - description: Time period for which Insights are requested. - McpBreakdownInsightsRequest: - properties: - departments: - type: array - items: - type: string - description: Departments for which Insights are requested. - managerIds: - type: array - items: - type: string - description: Manager user IDs whose teams should be filtered for. Empty array means no filtering. - managerEmails: - type: array - items: - type: string - description: Manager emails whose teams should be filtered for. Empty array means no filtering. - dayRange: - $ref: "#/components/schemas/Period" - description: Time period for which Insights are requested. - breakdownType: - type: string - enum: - - USERS - - HOST_APPLICATIONS - - TOOLS - - SERVERS - description: Type of breakdown to return. - hostApplications: - type: array - items: - type: string - description: Host applications to filter by. Empty array means all host applications. - tools: - type: array - items: - type: string - description: MCP tools to filter by. Empty array means all tools. - servers: - type: array - items: - type: string - description: MCP servers to filter by. Empty array means all servers. - InsightsRequest: - properties: - overviewRequest: - $ref: "#/components/schemas/InsightsOverviewRequest" - x-visibility: Public - description: If specified, will return data for the Overview section of the Insights Dashboard. - assistantRequest: - $ref: "#/components/schemas/InsightsAssistantRequest" - x-visibility: Public - description: If specified, will return data for the Assistant section of the Insights Dashboard. - agentsRequest: - $ref: "#/components/schemas/AgentsInsightsV2Request" - x-visibility: Public - description: If specified, will return data for the Agents section of the Insights Dashboard. - mcpRequest: - $ref: "#/components/schemas/McpInsightsRequest" - description: If specified, will return data for the MCP section of the Insights Dashboard. - mcpBreakdownRequest: - $ref: "#/components/schemas/McpBreakdownInsightsRequest" - disablePerUserInsights: - type: boolean - description: If true, suppresses the generation of per-user Insights in the response. Default is false. - UserActivityInsight: - required: - - user - - activity - properties: - user: - $ref: "#/components/schemas/Person" - activity: - type: string - enum: - - ALL - - SEARCH - description: Activity e.g. search, home page visit or all. - lastActivityTimestamp: - type: integer - description: Unix timestamp of the last activity (in seconds since epoch UTC). - activityCount: - $ref: "#/components/schemas/CountInfo" - activeDayCount: - $ref: "#/components/schemas/CountInfo" - GleanAssistInsightsResponse: - properties: - lastLogTimestamp: - type: integer - description: Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). - activityInsights: - type: array - items: - $ref: "#/components/schemas/UserActivityInsight" - description: Insights for all active users with respect to set of actions. - totalActiveUsers: - type: integer - description: Total number of active users in the requested period. - datasourceInstances: - type: array - items: - type: string - description: List of datasource instances for which glean assist is enabled. - departments: - type: array - items: - type: string - description: List of departments applicable for users tab. - CurrentActiveUsers: - properties: - monthlyActiveUsers: - type: integer - description: Number of current Monthly Active Users. - weeklyActiveUsers: - type: integer - description: Number of current Weekly Active Users. - InsightsSearchSummary: - allOf: - - $ref: "#/components/schemas/CurrentActiveUsers" - - type: object - properties: - numSearches: - type: integer - description: Total number of searches by users over the specified time period. - numSearchUsers: - type: integer - description: Total number of distinct users who searched over the specified time period. - InsightsChatSummary: - allOf: - - $ref: "#/components/schemas/CurrentActiveUsers" - - type: object - properties: - numChats: - type: integer - description: Total number of chats by users over the specified time period. - numChatUsers: - type: integer - description: Total number of distinct users who used Chat over the specified time period. - InsightsDepartmentsSummary: - allOf: - - $ref: "#/components/schemas/CurrentActiveUsers" - - type: object - properties: - departments: - type: array - items: - type: string - description: Department name(s). - employeeCount: - type: integer - description: Number of current employees in the specified departments, according to the Org Chart. - totalSignups: - type: integer - description: Number of current signed up employees in the specified departments, according to the Org Chart. - searchSummary: - $ref: "#/components/schemas/InsightsSearchSummary" - chatSummary: - $ref: "#/components/schemas/InsightsChatSummary" - searchActiveUsers: - $ref: "#/components/schemas/CurrentActiveUsers" - description: Search-specific active user counts for the specified departments. - assistantActiveUsers: - $ref: "#/components/schemas/CurrentActiveUsers" - description: Assistant-specific active user counts for the specified departments. - agentsActiveUsers: - $ref: "#/components/schemas/CurrentActiveUsers" - description: Agents-specific active user counts for the specified departments. - mcpActiveUsers: - $ref: "#/components/schemas/CurrentActiveUsers" - description: MCP active user counts for the specified departments. - extensionSummary: - $ref: "#/components/schemas/CurrentActiveUsers" - ugcSummary: - $ref: "#/components/schemas/CurrentActiveUsers" - LabeledCountInfo: - required: - - label - properties: - label: - type: string - description: Label for the included count information. - countInfo: - type: array - items: - $ref: "#/components/schemas/CountInfo" - description: List of data points for counts for a given date period. - PerUserInsight: - properties: - person: - $ref: "#/components/schemas/Person" - numSearches: - type: integer - description: Total number of searches by this user over the specified time period. - numChats: - type: integer - description: Total number of chats by this user over the specified time period. - numActiveSessions: - type: integer - description: Total number of active sessions by this user in a Glean client over the specified time period. - numGleanbotUsefulResponses: - type: integer - description: Total number of Gleanbot responses marked useful by this user over the specified time period. - numDaysActive: - type: integer - description: Total number of days this user was an Active User over the specified time period. - numSummarizations: - type: integer - description: Total number of summarized items by this user over the specified time period. - numAiAnswers: - type: integer - description: Total number of AI Answers interacted with by this user over the specified time period. - numAgentRuns: - type: integer - description: Total number of agent runs for this user over the specified time period. - numMcpCalls: - type: integer - description: Total number of MCP calls for this user over the specified time period. - InsightsOverviewResponse: - allOf: - - $ref: "#/components/schemas/InsightsDepartmentsSummary" - - type: object - properties: - lastUpdatedTs: - type: integer - description: Unix timestamp of the last update for the insights data in the response. - searchSessionSatisfaction: - type: number - format: float - description: Search session satisfaction rate, over the specified time period in the specified departments. - deprecated: true - x-glean-deprecated: - id: 2652ea73-3e33-4409-ba8c-bda7b60a2c24 - introduced: "2026-05-13" - message: This property is no longer supported. Please contact Support for alternatives. - removal: "2027-01-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-05-13, removal scheduled for 2027-01-15: This property is no longer supported. Please contact Support for alternatives." - monthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - weeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - dailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - searchMonthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - searchWeeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - searchDailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - assistantMonthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - assistantWeeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - assistantDailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - agentsMonthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - agentsWeeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - agentsDailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - mcpMonthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - mcpWeeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - mcpDailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - searchesTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - assistantInteractionsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - agentRunsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - mcpCallsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - searchDatasourceCounts: - type: object - additionalProperties: - type: integer - description: Counts of search result clicks, by datasource, over the specified time period in the specified departments. - chatDatasourceCounts: - type: object - additionalProperties: - type: integer - description: Counts of cited documents in chat, by datasource, over the specified time period in the specified departments. - perUserInsights: - type: array - items: - $ref: "#/components/schemas/PerUserInsight" - description: Per-user insights, over the specified time period in the specified departments. All current users in the organization who have signed into Glean at least once are included. - PerUserAssistantInsight: - properties: - person: - $ref: "#/components/schemas/Person" - numChatMessages: - type: integer - description: Total number of chat messages sent by this user over the specified time period. - numSummarizations: - type: integer - description: Total number of summarized items by this user over the specified time period. - numAiAnswers: - type: integer - description: Total number of AI Answers interacted with by this user over the specified time period. - numGleanbotInteractions: - type: integer - description: Total number of Gleanbot responses marked useful by this user over the specified time period. - numDaysActive: - type: integer - description: Total number of days this user was active on the Assistant over the specified time period. - AssistantInsightsResponse: - allOf: - - $ref: "#/components/schemas/CurrentActiveUsers" - - type: object - properties: - lastUpdatedTs: - type: integer - description: Unix timestamp of the last update for the insights data in the response. - monthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - weeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - dailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - totalSignups: - type: integer - description: Number of current signed up employees in the specified departments, according to the Org Chart. - chatMessagesTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - summarizationsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - aiAnswersTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - gleanbotInteractionsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - perUserInsights: - type: array - items: - $ref: "#/components/schemas/PerUserAssistantInsight" - upvotesTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - downvotesTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - PerAgentInsight: - properties: - agentId: - type: string - description: Agent ID - agentName: - type: string - description: Agent name - icon: - $ref: "#/components/schemas/IconConfig" - description: Agent icon configuration - isDeleted: - type: boolean - description: Indicates whether the agent has been deleted - userCount: - type: integer - description: Total number of users for this agent over the specified time period. - runCount: - type: integer - description: Total number of runs for this agent over the specified time period. - upvoteCount: - type: integer - description: Total number of upvotes for this agent over the specified time period. - downvoteCount: - type: integer - description: Total number of downvotes for this agent over the specified time period. - owner: - $ref: "#/components/schemas/Person" - description: | - The creator/owner of the agent. Absent if agent is deleted or owner is unknown. - AgentUseCaseInsight: - properties: - useCase: - type: string - description: Use case name - runCount: - type: integer - description: Total number of runs for this use case over the specified time period. - trend: - type: number - format: float - description: Percentage change in runs compared to the previous equivalent time period. - topDepartments: - type: string - description: Comma-separated list of the top departments using this use case. - topAgentId: - type: string - description: ID of the most-used agent for this use case. - topAgentName: - type: string - description: Name of the most-used agent for this use case. - topAgentIcon: - $ref: "#/components/schemas/IconConfig" - description: Icon of the most-used agent for this use case. - topAgentIsDeleted: - type: boolean - description: Indicates whether the top agent has been deleted. - AgentsUsageByDepartmentInsight: - properties: - department: - type: string - description: Name of the department - agentAdoptionRate: - type: number - format: float - description: Percentage of employees in the department who have used agents at least once over the specified time period. - userCount: - type: integer - description: Total number of users in this department who have used any agent over the specified time period. - runCount: - type: integer - description: Total number of runs in this department over the specified time period. - agentId: - type: string - description: ID of the agent to be shown in the agent column in this department over the specified time period. - agentName: - type: string - description: Name of the agent to be shown in the agent column in this department over the specified time period. - icon: - $ref: "#/components/schemas/IconConfig" - description: Agent icon configuration - isDeleted: - type: boolean - description: Indicates whether the agent has been deleted - AgentUsersInsight: - properties: - person: - $ref: "#/components/schemas/Person" - departmentName: - type: string - description: Department name - agentsUsedCount: - type: integer - description: Total number of agents used by this user over the specified time period. - averageRunsPerDayCount: - type: number - format: float - description: Average number of runs per day for this user over the specified time period. - agentsCreatedCount: - type: integer - description: Total number of agents created by this user over the specified time period. - runCount: - type: integer - description: Total number of agent runs for this user over the specified time period. - AgentsTimeSavedInsight: - properties: - agentId: - type: string - description: Agent ID - agentName: - type: string - description: Agent name - icon: - $ref: "#/components/schemas/IconConfig" - description: Agent icon configuration - isDeleted: - type: boolean - description: Indicates whether the agent has been deleted - runCount: - type: integer - description: Total number of runs for this agent over the specified time period. - minsPerRun: - type: number - format: float - description: Average minutes saved per run for this agent over the specified time period. - feedbackUserCount: - type: integer - description: Total number of users who provided feedback on time saved for this agent over the specified time period. - AgentsInsightsV2Response: - allOf: - - $ref: "#/components/schemas/CurrentActiveUsers" - - type: object - properties: - monthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - weeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - dailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - sharedAgentsCount: - type: integer - description: Total number of shared agents. - topAgentsInsights: - type: array - items: - $ref: "#/components/schemas/PerAgentInsight" - topUseCasesInsights: - type: array - items: - $ref: "#/components/schemas/AgentUseCaseInsight" - agentsUsageByDepartmentInsights: - type: array - items: - $ref: "#/components/schemas/AgentsUsageByDepartmentInsight" - agentUsersInsights: - type: array - items: - $ref: "#/components/schemas/AgentUsersInsight" - agentsTimeSavedInsights: - type: array - items: - $ref: "#/components/schemas/AgentsTimeSavedInsight" - description: Insights for agents time saved over the specified time period. - dailyAgentRunsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - successfulRunsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - failedRunsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - pausedRunsTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - upvotesTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - downvotesTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - McpInsightsResponse: - allOf: - - $ref: "#/components/schemas/CurrentActiveUsers" - - type: object - properties: - dailyActiveUsers: - type: integer - description: Number of current Daily Active Users. - monthlyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - weeklyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - dailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - overallDailyActiveUserTimeseries: - $ref: "#/components/schemas/LabeledCountInfo" - topHostApplicationsActiveUserTimeseries: - type: array - items: - $ref: "#/components/schemas/LabeledCountInfo" - McpUserBreakdown: - properties: - person: - $ref: "#/components/schemas/Person" - totalCalls: - type: integer - description: Total number of MCP calls made by this user in the specified time period. - hostApplications: - type: array - items: - type: string - description: Host applications used by this user in the specified time period. - tools: - type: array - items: - type: string - description: MCP tools used by this user in the specified time period. - servers: - type: array - items: - type: string - description: MCP servers used by this user in the specified time period. - McpHostApplicationBreakdown: - properties: - hostApplication: - type: string - description: Host application name. - totalCalls: - type: integer - description: Total number of MCP calls made from this host application in the specified time period. - activeUsers: - type: integer - description: Total number of active users from this host application in the specified time period. - McpToolBreakdown: - properties: - tool: - type: string - description: MCP tool name. - totalCalls: - type: integer - description: Total number of MCP calls for this tool in the specified time period. - activeUsers: - type: integer - description: Total number of active users for this tool in the specified time period. - hostApplications: - type: array - items: - type: string - description: Host applications using this tool in the specified time period. - McpServerBreakdown: - properties: - server: - type: string - description: MCP server name. - totalCalls: - type: integer - description: Total number of MCP calls for this server in the specified time period. - activeUsers: - type: integer - description: Total number of active users for this server in the specified time period. - hostApplications: - type: array - items: + description: The name of method used to surface relevant data for a given calendar event. + enum: + - customerCard + - news + - call + - email + - meetingNotes + - linkedIn + - relevantDocuments + - chatFollowUps + - conversations + EventClassification: + description: A generated classification of a given event. + properties: + name: + $ref: "#/components/schemas/EventClassificationName" + strategies: + type: array + items: + $ref: "#/components/schemas/EventStrategyName" + StructuredLink: + description: The display configuration for a link. + properties: + name: + type: string + description: The display name for the link + url: + type: string + description: The URL for the link. + iconConfig: + $ref: "#/components/schemas/IconConfig" + GeneratedAttachmentContent: + description: Content that has been generated or extrapolated from the documents present in the document field. + properties: + displayHeader: + description: The header describing the generated content. + type: string + text: + description: The content that has been generated. + type: string + example: + displayHeader: Action Items + content: You said you'd send over the design document after the meeting. + GeneratedAttachment: + description: These are attachments that aren't natively present on the event, and have been smartly suggested. + properties: + strategyName: + $ref: "#/components/schemas/EventStrategyName" + documents: + type: array + items: + $ref: "#/components/schemas/Document" + person: + $ref: "#/components/schemas/Person" + customer: + $ref: "#/components/schemas/Customer" + externalLinks: + description: A list of links to external sources outside of Glean. + type: array + items: + $ref: "#/components/schemas/StructuredLink" + content: + type: array + items: + $ref: "#/components/schemas/GeneratedAttachmentContent" + CalendarEvent: + required: + - id + - url + allOf: + - $ref: "#/components/schemas/AnonymousEvent" + - type: object + properties: + id: + type: string + description: The calendar event id + url: + type: string + description: A permalink for this calendar event + attendees: + $ref: "#/components/schemas/CalendarAttendees" + location: + type: string + description: The location that this event is taking place at. + conferenceData: + $ref: "#/components/schemas/ConferenceData" + description: + type: string + description: The HTML description of the event. + datasource: + type: string + description: The app or other repository type from which the event was extracted + hasTranscript: + type: boolean + description: The event has a transcript associated with it enabling features like summarization + transcriptUrl: + type: string + description: A link to the transcript of the event + classifications: + type: array + items: + $ref: "#/components/schemas/EventClassification" + generatedAttachments: + type: array + items: + $ref: "#/components/schemas/GeneratedAttachment" + SectionType: type: string - description: Host applications using this server in the specified time period. - McpBreakdownInsightsResponse: - properties: - usersBreakdown: - type: array - items: - $ref: "#/components/schemas/McpUserBreakdown" - hostApplicationsBreakdown: - type: array - items: - $ref: "#/components/schemas/McpHostApplicationBreakdown" - toolsBreakdown: - type: array - items: - $ref: "#/components/schemas/McpToolBreakdown" - serversBreakdown: - type: array - items: - $ref: "#/components/schemas/McpServerBreakdown" - InsightsResponse: - properties: - gleanAssist: - deprecated: true - $ref: "#/components/schemas/GleanAssistInsightsResponse" - x-glean-deprecated: - id: 15850758-4d95-4d98-8d57-39c50663a796 - introduced: "2026-02-05" - message: Field is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" - overviewResponse: - $ref: "#/components/schemas/InsightsOverviewResponse" - assistantResponse: - $ref: "#/components/schemas/AssistantInsightsResponse" - agentsResponse: - $ref: "#/components/schemas/AgentsInsightsV2Response" - mcpResponse: - $ref: "#/components/schemas/McpInsightsResponse" - mcpBreakdownResponse: - $ref: "#/components/schemas/McpBreakdownInsightsResponse" - MessagesRequest: - required: - - id - - idType - - datasource - properties: - idType: - type: string - enum: - - CHANNEL_NAME - - THREAD_ID - - CONVERSATION_ID - description: Type of the id in the incoming request. - id: - type: string - description: ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID. - workspaceId: - type: string - description: Id for the for the workspace in case of multiple workspaces. - direction: - type: string - enum: - - OLDER - - NEWER - description: The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. - timestampMillis: - type: integer - format: int64 - description: Timestamp in millis of the reference message. Only applicable when using a message_id. - includeRootMessage: - type: boolean - description: Whether to include root message in response. - datasource: - type: string - enum: - - SLACK - - SLACKENTGRID - - MICROSOFTTEAMS - - GCHAT - - FACEBOOKWORKPLACE - description: The type of the data source. - datasourceInstanceDisplayName: - type: string - description: The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. - InvalidOperatorValueError: - properties: - key: - description: The operator key that has an invalid value. - type: string - value: - description: The invalid operator value. - type: string - ErrorMessage: - properties: - source: - description: The datasource this message relates to. - type: string - errorMessage: - type: string - ErrorInfo: - properties: - badGmailToken: - type: boolean - description: Indicates the gmail results could not be fetched due to bad token. - badOutlookToken: - type: boolean - description: Indicates the outlook results could not be fetched due to bad token. - invalidOperators: - type: array - description: Indicates results could not be fetched due to invalid operators in the query. - items: - $ref: "#/components/schemas/InvalidOperatorValueError" - errorMessages: - type: array - items: - $ref: "#/components/schemas/ErrorMessage" - federatedSearchRateLimitError: - type: boolean - description: Indicates the federated search results could not be fetched due to rate limiting. - x-speakeasy-name-override: GleanDataError - ResultsResponse: - properties: - trackingToken: - type: string - description: A token that should be passed for additional requests related to this request (such as more results requests). - sessionInfo: - $ref: "#/components/schemas/SessionInfo" - results: - type: array - items: - $ref: "#/components/schemas/SearchResult" - structuredResults: - type: array - items: - $ref: "#/components/schemas/StructuredResult" - generatedQnaResult: - $ref: "#/components/schemas/GeneratedQna" - errorInfo: - $ref: "#/components/schemas/ErrorInfo" - requestID: - type: string - description: A platform-generated request ID to correlate backend logs. - backendTimeMillis: - type: integer - format: int64 - description: Time in milliseconds the backend took to respond to the request. - example: 1100 - BackendExperimentsContext: - properties: - experimentIds: - type: array - items: - type: integer - format: int64 - description: List of experiment ids for the corresponding request. - SearchWarning: - required: - - warningType - properties: - warningType: - type: string - enum: - - LONG_QUERY - - QUOTED_PUNCTUATION - - PUNCTUATION_ONLY - - COPYPASTED_QUOTES - - INVALID_OPERATOR - - MAYBE_INVALID_FACET_QUERY - - TOO_MANY_DATASOURCE_GROUPS - description: The type of the warning. - lastUsedTerm: - type: string - description: The last term we considered in the user's long query. - quotesIgnoredQuery: - type: string - description: The query after ignoring/removing quotes. - ignoredTerms: - type: array - items: + description: Type of the section. This defines how the section should be interpreted and rendered in the digest. + x-enumDescriptions: + CHANNEL: A standard section for channel-based digests (e.g. from Slack, Teams). + MENTIONS: A dedicated section that surfaces user mentions (actionable, informative, or all). + TOPIC: A section driven by a generic topic, not tied to any specific channel or instance. + x-speakeasy-enum-descriptions: + CHANNEL: A standard section for channel-based digests (e.g. from Slack, Teams). + MENTIONS: A dedicated section that surfaces user mentions (actionable, informative, or all). + TOPIC: A section driven by a generic topic, not tied to any specific channel or instance. + enum: + - CHANNEL + - MENTIONS + - TOPIC + UpdateType: type: string - description: A list of query terms that were ignored when generating search results, if any. For example, terms containing invalid filters such as "updated:invalid_date" will be ignored. - SearchResponseMetadata: - properties: - rewrittenQuery: - type: string - description: A cleaned up or updated version of the query to be displayed in the query box. Useful for mapping visual facets to search operators. - searchedQuery: - type: string - description: The actual query used to perform search and return results. - searchedQueryWithoutNegation: - type: string - description: The query used to perform search and return results, with negated terms and facets removed. - x-includeEmpty: true - searchedQueryRanges: - type: array - items: - $ref: "#/components/schemas/TextRange" - description: The bolded ranges within the searched query. - originalQuery: - type: string - description: The query text sent by the client in the request. - querySuggestion: - $ref: "#/components/schemas/QuerySuggestion" - description: An alternative query to the one provided that may give better results, e.g. a spelling suggestion. - additionalQuerySuggestions: - $ref: "#/components/schemas/QuerySuggestionList" - description: Other alternative queries that may provide better or more specific results than the original query. - negatedTerms: - type: array - items: + description: Optional type classification for the update. + x-enumDescriptions: + ACTIONABLE: Updates that require user attention or action + INFORMATIVE: Updates that are purely informational + x-speakeasy-enum-descriptions: + ACTIONABLE: Updates that require user attention or action + INFORMATIVE: Updates that are purely informational + enum: + - ACTIONABLE + - INFORMATIVE + DigestUpdate: + type: object + properties: + urls: + type: array + description: List of URLs for similar updates that are grouped together and rendered as a single update. + items: + type: string + url: + type: string + description: URL link to the content or document. + title: + type: string + description: Title or headline of the update. + datasource: + type: string + description: Name or identifier of the data source (e.g., slack, confluence, etc.). + summary: + type: string + description: Brief summary or description of the update content. + type: + $ref: "#/components/schemas/UpdateType" + DigestSection: + type: object + required: + - id + - type + - updates + properties: + id: + type: string + description: Unique identifier for the digest section. + type: + $ref: "#/components/schemas/SectionType" + displayName: + type: string + description: Human-readable name for the digest section. + channelName: + type: string + description: Name of the channel (applicable for CHANNEL type sections). Used to display in the frontend. + channelType: + type: string + description: | + Channel visibility/type for CHANNEL sections. For Slack this is typically one of + PublicChannel, PrivateChannel. Omit if not applicable or unknown. + instanceId: + type: string + description: Instance identifier for the channel or workspace. Used for constructing channel URLs to display in the frontend. + url: + type: string + description: Optional URL for the digest section. Should be populated only if the section is a CHANNEL type section. + updates: + type: array + items: + $ref: "#/components/schemas/DigestUpdate" + description: List of updates within this digest section. + Digest: + type: object + properties: + podcastFileId: + type: string + description: Identifier for the podcast file generated from this digest content. + podcastDuration: + type: number + format: float + description: Duration of the podcast file in seconds. + digestDate: + type: string + description: The date this digest covers, in YYYY-MM-DD format. Represents the specific day for which the digest content and updates were compiled. This can be empty if the digest is not yet available. + example: "2025-09-03" + sections: + type: array + items: + $ref: "#/components/schemas/DigestSection" + description: Array of digest sections from which the podcast was created. + ChatSuggestion: + properties: + query: + type: string + description: The actionable chat query to run when the user selects this suggestion. + cta: + type: string + description: Button text to show for the suggestion action. + feature: + type: string + description: Targeted Glean Chat feature for the suggestion. + sourceDocumentIds: + type: array + items: + type: string + description: Document IDs that grounded the suggestion. + PromptTemplateMutableProperties: + required: + - template + properties: + name: + type: string + description: The user-given identifier for this prompt template. + template: + type: string + description: The actual template string. + applicationId: + type: string + description: The Application Id the prompt template should be created under. Empty for default assistant. + inclusions: + $ref: "#/components/schemas/ChatRestrictionFilters" + description: A list of filters which only allows the prompt template to access certain content. + addedRoles: + type: array + description: A list of added user roles for the Workflow. + items: + $ref: "#/components/schemas/UserRoleSpecification" + removedRoles: + type: array + description: A list of removed user roles for the Workflow. + items: + $ref: "#/components/schemas/UserRoleSpecification" + PromptTemplate: + allOf: + - $ref: "#/components/schemas/PromptTemplateMutableProperties" + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/AttributionProperties" + - type: object + properties: + id: + type: string + description: Opaque id for this prompt template + author: + $ref: "#/components/schemas/Person" + createTimestamp: + type: integer + description: Server Unix timestamp of the creation time. + lastUpdateTimestamp: + type: integer + description: Server Unix timestamp of the last update time. + lastUpdatedBy: + $ref: "#/components/schemas/Person" + roles: + type: array + description: A list of roles for this prompt template explicitly granted. + items: + $ref: "#/components/schemas/UserRoleSpecification" + UgcType: + enum: + - AGENT_TYPE + - ANNOUNCEMENTS_TYPE + - ANSWERS_TYPE + - CHATS_TYPE + - COLLECTIONS_TYPE + - EMAIL_TYPE + - HTML_CODE_TYPE + - IMAGE_TYPE + - MESSAGE_TYPE + - PAPER_TYPE + - PRISM_VIEWS_TYPE + - PROMPT_TEMPLATES_TYPE + - PINS_TYPE + - SCRIBES_TYPE + - SHORTCUTS_TYPE + - SLIDE_TYPE + - SPREADSHEET_TYPE + - INLINE_HTML_TYPE + - PODCAST_TYPE + - WORKFLOWS_TYPE + FavoriteInfo: + type: object + properties: + ugcType: + $ref: "#/components/schemas/UgcType" + id: + type: string + description: Opaque id of the UGC. + count: + type: integer + x-includeEmpty: true + description: Number of users this object has been favorited by. + favoritedByUser: + type: boolean + x-includeEmpty: true + description: If the requesting user has favorited this object. + PromptTemplateResult: + properties: + promptTemplate: + $ref: "#/components/schemas/PromptTemplate" + trackingToken: + type: string + description: An opaque token that represents this prompt template + favoriteInfo: + $ref: "#/components/schemas/FavoriteInfo" + runCount: + $ref: "#/components/schemas/CountInfo" + description: This tracks how many times this prompt template was run. If user runs a prompt template after modifying the original one, it still counts as a run for the original template. + UserActivity: + properties: + actor: + $ref: "#/components/schemas/Person" + timestamp: + type: integer + description: Unix timestamp of the activity (in seconds since epoch UTC). + action: + type: string + enum: + - ADD + - ADD_REMINDER + - CLICK + - COMMENT + - DELETE + - DISMISS + - EDIT + - MENTION + - MOVE + - OTHER + - RESTORE + - UNKNOWN + - VERIFY + - VIEW + description: The action for the activity + aggregateVisitCount: + $ref: "#/components/schemas/CountInfo" + FeedEntry: + required: + - title + properties: + entryId: + type: string + description: optional ID associated with a single feed entry (displayable_list_id) + title: + type: string + description: Title for the result. Can be document title, event title and so on. + thumbnail: + $ref: "#/components/schemas/Thumbnail" + createdBy: + $ref: "#/components/schemas/Person" + uiConfig: + allOf: + - $ref: "#/components/schemas/DisplayableListFormat" + - type: object + properties: + additionalFlags: + $ref: "#/components/schemas/DisplayableListItemUIConfig" + justificationType: + type: string + enum: + - FREQUENTLY_ACCESSED + - RECENTLY_ACCESSED + - TRENDING_DOCUMENT + - VERIFICATION_REMINDER + - SUGGESTED_DOCUMENT + - EMPTY_STATE_SUGGESTION + - FRECENCY_SCORED + - SERVER_GENERATED + - USE_CASE + - UPDATE_SINCE_LAST_VIEW + - RECENTLY_STARTED + - EVENT + - USER_MENTION + - ANNOUNCEMENT + - EXTERNAL_ANNOUNCEMENT + - POPULARITY_BASED_TRENDING + - COMPANY_RESOURCE + - EVENT_DOCUMENT_FROM_CONTENT + - EVENT_DOCUMENT_FROM_SEARCH + - VISIT_AFFINITY_SCORED + - SUGGESTED_APP + - SUGGESTED_PERSON + - ACTIVITY_HIGHLIGHT + - SAVED_SEARCH + - SUGGESTED_CHANNEL + - PEOPLE_CELEBRATIONS + - SOCIAL_LINK + - ZERO_STATE_CHAT_SUGGESTION + - ZERO_STATE_CHAT_TOOL_SUGGESTION + - ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION + - ZERO_STATE_STATIC_WORKFLOW_SUGGESTION + - ZERO_STATE_AGENT_SUGGESTION + - PERSONALIZED_CHAT_SUGGESTION + - DAILY_DIGEST + - TASK + - PLAN_MY_DAY + - END_MY_DAY + - STARTER_KIT_EXTENSION + - STARTER_KIT_ORG_CHART + - STARTER_KIT_ADD_DOC + - MEETING_RECAP + - ACTIVE_DISCUSSION + - MID_DAY_CATCH_UP + - QUERY_SUGGESTION + - COWORK_CUJ_PROMO + - CARD_STACK_PROMO + - WEEKLY_MEETINGS + - FOLLOW_UP + - MILESTONE_TIMELINE_CHECK + - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK + - PROJECT_NEXT_STEP + - DEMO_CARD + - OOO_PLANNER + - OOO_CATCH_UP + description: Type of the justification. + justification: + type: string + description: Server side generated justification string if server provides one. + trackingToken: + type: string + description: An opaque token that represents this particular feed entry in this particular response. To be used for /feedback reporting. + viewUrl: + type: string + description: View URL for the entry if based on links that are not documents in Glean. + document: + $ref: "#/components/schemas/Document" + event: + $ref: "#/components/schemas/CalendarEvent" + announcement: + $ref: "#/components/schemas/Announcement" + digest: + $ref: "#/components/schemas/Digest" + collection: + $ref: "#/components/schemas/Collection" + collectionItem: + $ref: "#/components/schemas/CollectionItem" + person: + $ref: "#/components/schemas/Person" + app: + $ref: "#/components/schemas/AppResult" + chatSuggestion: + $ref: "#/components/schemas/ChatSuggestion" + promptTemplate: + $ref: "#/components/schemas/PromptTemplateResult" + workflow: + $ref: "#/components/schemas/WorkflowResult" + activities: + type: array + items: + $ref: "#/components/schemas/UserActivity" + description: List of activity where each activity has user, action, timestamp. + documentVisitorCount: + $ref: "#/components/schemas/CountInfo" + FeedResult: + required: + - category + - primaryEntry + properties: + category: + type: string + enum: + - DOCUMENT_SUGGESTION + - DOCUMENT_SUGGESTION_SCENARIO + - TRENDING_DOCUMENT + - USE_CASE + - VERIFICATION_REMINDER + - EVENT + - ANNOUNCEMENT + - MENTION + - DATASOURCE_AFFINITY + - RECENT + - COMPANY_RESOURCE + - EXPERIMENTAL + - PEOPLE_CELEBRATIONS + - SOCIAL_LINK + - EXTERNAL_TASKS + - DISPLAYABLE_LIST + - ZERO_STATE_CHAT_SUGGESTION + - ZERO_STATE_CHAT_TOOL_SUGGESTION + - ZERO_STATE_WORKFLOW_CREATED_BY_ME + - ZERO_STATE_WORKFLOW_FAVORITES + - ZERO_STATE_WORKFLOW_POPULAR + - ZERO_STATE_WORKFLOW_RECENT + - ZERO_STATE_WORKFLOW_SUGGESTION + - PERSONALIZED_CHAT_SUGGESTION + - DAILY_DIGEST + - TASK + - PLAN_MY_DAY + - END_MY_DAY + - STARTER_KIT + - MID_DAY_CATCH_UP + - QUERY_SUGGESTION + - COWORK_CUJ_PROMO + - CARD_STACK_PROMO + - WEEKLY_MEETINGS + - FOLLOW_UP + - MILESTONE_TIMELINE_CHECK + - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK + - PROJECT_NEXT_STEP + - DEMO_CARD + - OOO_PLANNER + - OOO_CATCH_UP + description: Category of the result, one of the requested categories in incoming request. + primaryEntry: + $ref: "#/components/schemas/FeedEntry" + secondaryEntries: + type: array + items: + $ref: "#/components/schemas/FeedEntry" + description: Secondary entries for the result e.g. suggested docs for the calendar, carousel. + rank: + type: integer + description: Rank of the result. Rank is suggested by server. Client side rank may differ. + placementReason: + type: string + enum: + - ORGANIC + - PROMO + description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + FeedResponse: + required: + - serverTimestamp + allOf: + - $ref: "#/components/schemas/BackendExperimentsContext" + - type: object + properties: + trackingToken: + type: string + description: An opaque token that represents this particular feed response. + serverTimestamp: + type: integer + description: Server unix timestamp (in seconds since epoch UTC). + results: + type: array + items: + $ref: "#/components/schemas/FeedResult" + facetResults: + type: object + additionalProperties: + type: array + items: + $ref: "#/components/schemas/FacetResult" + description: Map from category to the list of facets that can be used to filter the entry's content. + mentionsTimeWindowInHours: + type: integer + description: The time window (in hours) used for generating user mentions. + RecommendationsRequestOptions: + properties: + datasourceFilter: + type: string + description: Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. + datasourcesFilter: + type: array + items: + type: string + description: Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). All results are returned if missing. + facetFilterSets: + type: array + items: + $ref: "#/components/schemas/FacetFilterSet" + description: A list of facet filter sets that will be OR'ed together. + context: + $ref: "#/components/schemas/Document" + description: Content for either a new or unindexed document, or additional content for an indexed document, which may be used to generate recommendations. + resultProminence: + description: The types of prominence wanted in results returned. Default is any type. + type: array + items: + $ref: "#/components/schemas/SearchResultProminenceEnum" + RecommendationsRequest: + allOf: + - $ref: "#/components/schemas/ResultsRequest" + - type: object + properties: + recommendationDocumentSpec: + $ref: "#/components/schemas/DocumentSpec" + description: Retrieve recommendations for this document. Glean Document ID is preferred over URL. + requestOptions: + $ref: "#/components/schemas/RecommendationsRequestOptions" + description: Options for adjusting the request for recommendations. + RecommendationsResponse: + allOf: + - $ref: "#/components/schemas/ResultsResponse" + SortOptions: + type: object + properties: + orderBy: + type: string + enum: + - ASC + - DESC + sortBy: + type: string + ListEntitiesRequest: + type: object + properties: + filter: + type: array + items: + $ref: "#/components/schemas/FacetFilter" + sort: + description: Use EntitiesSortOrder enum for SortOptions.sortBy + type: array + items: + $ref: "#/components/schemas/SortOptions" + entityType: + type: string + default: PEOPLE + enum: + - PEOPLE + - TEAMS + - CUSTOM_ENTITIES + datasource: + type: string + description: The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES + query: + type: string + description: A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. + includeFields: + description: List of entity fields to return (that aren't returned by default) + type: array + items: + type: string + enum: + - PEOPLE + - TEAMS + - PEOPLE_DISTANCE + - PERMISSIONS + - FACETS + - INVITE_INFO + - LAST_EXTENSION_USE + - MANAGEMENT_DETAILS + - UNPROCESSED_TEAMS + pageSize: + type: integer + example: 100 + description: Hint to the server about how many results to send back. Server may return less. + cursor: + type: string + description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + source: + type: string + description: A string denoting the search surface from which the endpoint is called. + requestType: + type: string + default: STANDARD + description: The type of request being made. + x-enumDescriptions: + STANDARD: Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities. + FULL_DIRECTORY: Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations. + x-speakeasy-enum-descriptions: + STANDARD: Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities. + FULL_DIRECTORY: Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations. + enum: + - STANDARD + - FULL_DIRECTORY + EntitiesSortOrder: type: string - description: A list of terms that were negated when processing the query. - modifiedQueryWasUsed: - type: boolean - description: A different query was performed than the one requested. - originalQueryHadNoResults: - type: boolean - description: No results were found for the original query. The usage of this bit in conjunction with modifiedQueryWasUsed will dictate whether the full page replacement is 0-result or few-result based. - searchWarning: - $ref: "#/components/schemas/SearchWarning" - triggeredExpertDetection: - type: boolean - description: Whether the query triggered expert detection results in the People tab. - isNoQuotesSuggestion: - type: boolean - description: Whether the query was modified to remove quotes - FacetValue: - properties: - stringValue: - type: string - example: engineering - description: The value that should be set in the FacetFilter when applying this filter to a search request. - integerValue: - type: integer - example: 5 - displayLabel: - type: string - example: engineering - description: An optional user-friendly label to display in place of the facet value. - iconConfig: - $ref: "#/components/schemas/IconConfig" - FacetBucket: - properties: - count: - type: integer - description: Estimated number of results in this facet. - example: 1 - datasource: - type: string - example: jira - description: The datasource the value belongs to. This will be used by the all tab to show types across all datasources. - percentage: - type: integer - description: Estimated percentage of results in this facet. - example: 5 - value: - $ref: "#/components/schemas/FacetValue" - FacetResult: - properties: - sourceName: - type: string - description: The source of this facet (e.g. container_name, type, last_updated_at). - example: container_name - operatorName: - type: string - description: How to display this facet. Currently supportes 'SelectSingle' and 'SelectMultiple'. - example: SelectMultiple - buckets: - type: array - description: A list of unique buckets that exist within this result set. - items: - $ref: "#/components/schemas/FacetBucket" - hasMoreBuckets: - type: boolean - description: Returns true if more buckets exist than those returned. Additional buckets can be retrieve by requesting again with a higher facetBucketSize. - example: false - groupName: - type: string - description: For most facets this will be the empty string, meaning the facet is high-level and applies to all documents for the datasource. When non-empty, this is used to group facets together (i.e. group facets for each doctype for a certain datasource) - example: Service Cloud - ResultsDescription: - properties: - text: - type: string - description: Textual description of the results. Can be shown at the top of SERP, e.g. 'People who write about this topic' for experts in people tab. - iconConfig: - $ref: "#/components/schemas/IconConfig" - description: The config for the icon that's displayed with this description - SearchResponse: - allOf: - - $ref: "#/components/schemas/ResultsResponse" - - $ref: "#/components/schemas/BackendExperimentsContext" - - type: object - properties: - metadata: - $ref: "#/components/schemas/SearchResponseMetadata" - facetResults: - type: array - items: - $ref: "#/components/schemas/FacetResult" - resultTabs: - type: array - items: - $ref: "#/components/schemas/ResultTab" - description: All result tabs available for the current query. Populated if QUERY_METADATA is specified in the request. - resultTabIds: - type: array - items: - type: string - description: The unique IDs of the result tabs to which this response belongs. - resultsDescription: - $ref: "#/components/schemas/ResultsDescription" - rewrittenFacetFilters: - type: array - items: - $ref: "#/components/schemas/FacetFilter" - description: The actual applied facet filters based on the operators and facetFilters in the query. Useful for mapping typed operators to visual facets. - cursor: - type: string - description: Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. - hasMoreResults: - type: boolean - description: Whether more results are available. Use cursor to retrieve them. - example: - trackingToken: trackingToken - suggestedSpellCorrectedQuery: suggestedSpellCorrectedQuery - hasMoreResults: true - errorInfo: - errorMessages: - - source: gmail - errorMessage: invalid token - - source: slack - errorMessage: expired token - requestID: 5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100 - results: - - snippets: - - snippet: snippet - mimeType: mimeType - metadata: - container: container - createTime: "2000-01-23T04:56:07.000Z" - datasource: datasource - author: - name: name - documentId: documentId - updateTime: "2000-01-23T04:56:07.000Z" - mimeType: mimeType - objectType: objectType - title: title - url: https://www.example.com/ - - snippets: - - snippet: snippet - mimeType: mimeType - metadata: - container: container - createTime: "2000-01-23T04:56:07.000Z" - datasource: datasource - author: - name: name - documentId: documentId - updateTime: "2000-01-23T04:56:07.000Z" - mimeType: mimeType - objectType: objectType - title: title - url: https://www.example.com/ - facetResults: - - buckets: - - percentage: 5 - count: 1 - value: - stringValue: stringValue - integerValue: 5 - - percentage: 5 - count: 1 + description: Different ways of sorting entities + enum: + - ENTITY_NAME + - FIRST_NAME + - LAST_NAME + - ORG_SIZE_COUNT + - START_DATE + - TEAM_SIZE + - RELEVANCE + ListEntitiesResponse: + type: object + properties: + results: + type: array + items: + $ref: "#/components/schemas/Person" + teamResults: + type: array + items: + $ref: "#/components/schemas/Team" + customEntityResults: + type: array + items: + $ref: "#/components/schemas/CustomEntity" + facetResults: + type: array + items: + $ref: "#/components/schemas/FacetResult" + cursor: + type: string + description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + totalCount: + type: integer + description: The total number of entities available + hasMoreResults: + type: boolean + description: Whether or not more entities can be fetched. + sortOptions: + type: array + description: Sort options from EntitiesSortOrder supported for this response. Default is empty list. + items: + $ref: "#/components/schemas/EntitiesSortOrder" + customFacetNames: + type: array + description: list of Person attributes that are custom setup by deployment + items: + type: string + PeopleRequest: + type: object + properties: + timezoneOffset: + type: integer + description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + obfuscatedIds: + type: array + items: + type: string + description: The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. + emailIds: + type: array + items: + type: string + description: The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. + includeFields: + description: List of PersonMetadata fields to return (that aren't returned by default) + type: array + items: + type: string + enum: + - BADGES + - BUSY_EVENTS + - DOCUMENT_ACTIVITY + - INVITE_INFO + - PEOPLE_DISTANCE + - PERMISSIONS + - PEOPLE_DETAILS + - MANAGEMENT_DETAILS + - PEOPLE_PROFILE_SETTINGS + - PEOPLE_WITHOUT_MANAGER + includeTypes: + description: The types of people entities to include in the response in addition to those returned by default. + x-enumDescriptions: + PEOPLE_WITHOUT_MANAGER: Returns all people without a manager apart from the requested IDs. + INVALID_ENTITIES: Includes invalid entities in the response if any of the requested IDs are invalid. + x-speakeasy-enum-descriptions: + PEOPLE_WITHOUT_MANAGER: Returns all people without a manager apart from the requested IDs. + INVALID_ENTITIES: Includes invalid entities in the response if any of the requested IDs are invalid. + type: array + items: + type: string + enum: + - PEOPLE_WITHOUT_MANAGER + - INVALID_ENTITIES + source: + type: string + description: A string denoting the search surface from which the endpoint is called. + example: + obfuscatedIds: + - abc123 + - abc456 + PeopleResponse: + properties: + results: + type: array + items: + $ref: "#/components/schemas/Person" + description: A Person for each ID in the request, each with PersonMetadata populated. + relatedDocuments: + type: array + items: + $ref: "#/components/schemas/RelatedDocuments" + description: A list of documents related to this people response. This is only included if DOCUMENT_ACTIVITY is requested and only 1 person is included in the request. + errors: + type: array + items: + type: string + description: A list of IDs that could not be found. + CreateShortcutRequest: + required: + - data + properties: + data: + $ref: "#/components/schemas/ShortcutMutableProperties" + ShortcutError: + properties: + errorType: + type: string + enum: + - NO_PERMISSION + - INVALID_ID + - EXISTING_SHORTCUT + - INVALID_CHARS + CreateShortcutResponse: + properties: + shortcut: + $ref: "#/components/schemas/Shortcut" + error: + $ref: "#/components/schemas/ShortcutError" + DeleteShortcutRequest: + allOf: + - $ref: "#/components/schemas/UserGeneratedContentId" + - type: object + required: + - id + GetShortcutRequest: + oneOf: + - $ref: "#/components/schemas/UserGeneratedContentId" + - type: object + required: + - alias + properties: + alias: + type: string + description: The alias for the shortcut, including any arguments for variable shortcuts. + GetShortcutResponse: + properties: + shortcut: + $ref: "#/components/schemas/Shortcut" + description: Shortcut given the input alias with any provided arguments substituted into the destination URL. + error: + $ref: "#/components/schemas/ShortcutError" + ListShortcutsPaginatedRequest: + required: + - pageSize + properties: + includeFields: + description: Array of fields/data to be included in response that are not included by default + type: array + items: + type: string + enum: + - FACETS + - PEOPLE_DETAILS + pageSize: + type: integer + example: 10 + cursor: + type: string + description: A token specifying the position in the overall results to start at. Received from the endpoint and iterated back. Currently being used as page no (as we implement offset pagination) + filters: + type: array + items: + $ref: "#/components/schemas/FacetFilter" + description: A list of filters for the query. An AND is assumed between different filters. We support filters on Go Link name, author, department and type. + sort: + $ref: "#/components/schemas/SortOptions" + description: Specifies fieldname to sort on and order (ASC|DESC) to sort in + query: + type: string + description: Search query that should be a substring in atleast one of the fields (alias , inputAlias, destinationUrl, description). Empty query does not filter shortcuts. + ShortcutsPaginationMetadata: + properties: + cursor: + type: string + description: Cursor indicates the start of the next page of results + hasNextPage: + type: boolean + totalItemCount: + type: integer + ListShortcutsPaginatedResponse: + required: + - shortcuts + - meta + properties: + shortcuts: + type: array + items: + $ref: "#/components/schemas/Shortcut" + description: List of all shortcuts accessible to the user + facetResults: + type: array + items: + $ref: "#/components/schemas/FacetResult" + meta: + $ref: "#/components/schemas/ShortcutsPaginationMetadata" + description: Contains metadata like total item count and whether next page exists + UpdateShortcutRequest: + allOf: + - $ref: "#/components/schemas/UserGeneratedContentId" + - $ref: "#/components/schemas/ShortcutMutableProperties" + - type: object + required: + - id + UpdateShortcutResponse: + properties: + shortcut: + $ref: "#/components/schemas/Shortcut" + error: + $ref: "#/components/schemas/ShortcutError" + SummarizeRequest: + description: Summary of the document + required: + - documentSpecs + properties: + timestamp: + type: string + description: The ISO 8601 timestamp associated with the client request. + format: date-time + query: + type: string + description: Optional query that the summary should be about + preferredSummaryLength: + type: integer + description: Optional length of summary output. If not given, defaults to 500 chars. + documentSpecs: + type: array + items: + $ref: "#/components/schemas/DocumentSpec" + description: Specifications of documents to summarize + trackingToken: + type: string + description: An opaque token that represents this particular result. To be used for /feedback reporting. + Summary: + properties: + text: + type: string + followUpPrompts: + type: array + items: + type: string + description: Follow-up prompts based on the summarized doc + SummarizeResponse: + properties: + error: + type: object + properties: + message: + type: string + summary: + $ref: "#/components/schemas/Summary" + trackingToken: + type: string + description: An opaque token that represents this summary in this particular query. To be used for /feedback reporting. + ReminderRequest: + required: + - documentId + properties: + documentId: + type: string + description: The document which the verification is for new reminders and/or update. + assignee: + type: string + description: The obfuscated id of the person this verification is assigned to. + remindInDays: + type: integer + description: Reminder for the next verifications in terms of days. For deletion, this will be omitted. + reason: + type: string + description: An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). + VerificationFeed: + properties: + documents: + type: array + items: + $ref: "#/components/schemas/Verification" + description: List of document infos that include verification related information for them. + VerifyRequest: + required: + - documentId + properties: + documentId: + type: string + description: The document which is verified. + action: + type: string + enum: + - VERIFY + - DEPRECATE + - UNVERIFY + description: The verification action requested. + ToolParameter: + type: object + properties: + type: + type: string + description: Parameter type (string, number, boolean, object, array) + enum: + - string + - number + - boolean + - object + - array + name: + type: string + description: The name of the parameter + description: + type: string + description: The description of the parameter + isRequired: + type: boolean + description: Whether the parameter is required + possibleValues: + type: array + description: The possible values for the parameter. Can contain only primitive values or arrays of primitive values. + items: + type: string + items: + type: object + description: When type is 'array', this describes the structure of the item in the array. + $ref: "#/components/schemas/ToolParameter" + properties: + type: object + description: When type is 'object', this describes the structure of the object. + additionalProperties: + $ref: "#/components/schemas/ToolParameter" + Tool: + type: object + properties: + type: + type: string + description: Type of tool (READ, WRITE) + enum: + - READ + - WRITE + name: + type: string + description: Unique identifier for the tool + displayName: + type: string + description: Human-readable name + description: + type: string + description: LLM friendly description of the tool + parameters: + type: object + description: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. + additionalProperties: + $ref: "#/components/schemas/ToolParameter" + ToolsListResponse: + type: object + properties: + tools: + type: array + items: + $ref: "#/components/schemas/Tool" + ToolsCallParameter: + type: object + required: + - name + - value + properties: + name: + type: string + description: The name of the parameter value: - stringValue: stringValue - integerValue: 5 - sourceName: sourceName - operatorName: operatorName - objectType: objectType - - buckets: - - percentage: 5 - count: 1 + type: string + description: The value of the parameter (for primitive types) + items: + type: array + description: The value of the parameter (for array types) + items: + $ref: "#/components/schemas/ToolsCallParameter" + properties: + type: object + description: The value of the parameter (for object types) + additionalProperties: + $ref: "#/components/schemas/ToolsCallParameter" + ToolsCallRequest: + type: object + required: + - name + - parameters + properties: + name: + type: string + description: Required name of the tool to execute + parameters: + type: object + description: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. + additionalProperties: + $ref: "#/components/schemas/ToolsCallParameter" + ToolsCallResponse: + type: object + properties: + rawResponse: + additionalProperties: true + type: object + description: The raw response from the tool + error: + type: string + description: The error message if applicable + ActionAuthType: + type: string + description: | + Authentication mechanism used by an action pack. + - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. + - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. + - `AUTH_NONE`: Action pack requires no authentication. + enum: + - AUTH_USER_OAUTH + - AUTH_ADMIN + - AUTH_NONE + ActionPackAuthStatus: + type: object + required: + - authenticated + - authType + properties: + authenticated: + type: boolean + description: Whether the calling user is already authenticated to the tool backing the action pack. + authType: + $ref: "#/components/schemas/ActionAuthType" + ActionPackAuthStatusResponse: + type: object + required: + - actionPack + properties: + actionPack: + $ref: "#/components/schemas/ActionPackAuthStatus" + description: | + Action-pack-scoped authentication status. Wrapped under `actionPack` so the response + shape clearly conveys that the status applies to the whole pack and leaves room to add + sibling fields (e.g. per-action status) later without a breaking change. + AuthorizeActionPackRequest: + type: object + required: + - returnUrl + properties: + returnUrl: + type: string + description: | + URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth + callback completes. Must be present in the tenant's return URL allowlist. + AuthorizeActionPackResponse: + type: object + required: + - redirectUrl + properties: + redirectUrl: + type: string + description: | + URL that the customer UI should navigate the end user to in order to begin the third-party OAuth flow. + After the user consents, control returns to `returnUrl` from the request. + IndexDocumentRequest: + type: object + description: Describes the request body of the /indexdocument API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + document: + description: Document being added/updated + $ref: "#/components/schemas/DocumentDefinition" + required: + - document + IndexDocumentsRequest: + type: object + description: Describes the request body of the /indexdocuments API call + properties: + uploadId: + type: string + description: Optional id parameter to identify and track a batch of documents. + datasource: + type: string + description: Datasource of the documents + documents: + description: Batch of documents being added/updated + type: array + items: + $ref: "#/components/schemas/DocumentDefinition" + required: + - documents + - datasource + UpdatePermissionsRequest: + type: object + description: Describes the request body of the /updatepermissions API call + properties: + datasource: + type: string + objectType: + type: string + description: The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ + id: + type: string + description: The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. + viewURL: + type: string + description: | + The permalink for viewing the document. **Note: viewURL is a required field if id was not set when uploading the document.**' + permissions: + $ref: "#/components/schemas/DocumentPermissionsDefinition" + description: The permissions that define who can view this document in the search results. Please refer to [this](https://developers.glean.com/indexing/documents/permissions) for more details. + required: + - permissions + - datasource + GetDocumentCountRequest: + type: object + description: Describes the request body of the /getdocumentcount API call + properties: + datasource: + type: string + description: Datasource name for which document count is needed. + required: + - datasource + GetDocumentCountResponse: + type: object + description: Describes the response body of the /getdocumentcount API call + properties: + documentCount: + type: integer + description: Number of documents corresponding to the specified custom datasource. + GetDocumentStatusRequest: + type: object + description: Describes the request body for /getdocumentstatus API call + properties: + datasource: + type: string + description: Datasource to get fetch document status for + objectType: + type: string + description: Object type of the document to get the status for + docId: + type: string + description: Glean Document ID within the datasource to get the status for. + required: + - datasource + - objectType + - docId + GetDocumentStatusResponse: + type: object + description: Describes the response body of the /getdocumentstatus API call + properties: + uploadStatus: + type: string + description: Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN + lastUploadedAt: + type: integer + format: int64 + description: Time of last successful upload, in epoch seconds + indexingStatus: + type: string + description: Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN + lastIndexedAt: + type: integer + format: int64 + description: Time of last successful indexing, in epoch seconds + BulkIndexRequest: + type: object + description: Describes the request body of a bulk upload API call + required: + - uploadId + properties: + uploadId: + type: string + description: Unique id that must be used for this bulk upload instance + isFirstPage: + type: boolean + description: true if this is the first page of the upload. Defaults to false + isLastPage: + type: boolean + description: true if this is the last page of the upload. Defaults to false + forceRestartUpload: + type: boolean + description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + BulkIndexTeamsRequest: + type: object + description: Describes the request body of the /bulkindexteams API call + allOf: + - $ref: "#/components/schemas/BulkIndexRequest" + - type: object + properties: + teams: + description: Batch of team information + type: array + items: + $ref: "#/components/schemas/TeamInfoDefinition" + required: + - teams + BulkIndexEmployeesRequest: + type: object + description: Describes the request body of the /bulkindexemployees API call + allOf: + - $ref: "#/components/schemas/BulkIndexRequest" + - type: object + properties: + employees: + description: Batch of employee information + type: array + items: + $ref: "#/components/schemas/EmployeeInfoDefinition" + disableStaleDataDeletionCheck: + type: boolean + description: True if older employee data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than 20%. This must only be set when `isLastPage = true` + required: + - employees + BulkIndexDocumentsRequest: + type: object + description: Describes the request body of the /bulkindexdocuments API call + allOf: + - $ref: "#/components/schemas/BulkIndexRequest" + - type: object + properties: + datasource: + type: string + description: Datasource of the documents + documents: + description: Batch of documents for the datasource + type: array + items: + $ref: "#/components/schemas/DocumentDefinition" + disableStaleDocumentDeletionCheck: + type: boolean + description: True if older documents need to be force deleted after the upload completes. Defaults to older documents being deleted asynchronously. This must only be set when `isLastPage = true` + required: + - datasource + - documents + ProcessAllDocumentsRequest: + type: object + description: Describes the request body of the /processalldocuments API call + properties: + datasource: + type: string + description: If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed. + DeleteDocumentRequest: + type: object + description: Describes the request body of the /deletedocument API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + datasource: + type: string + description: datasource of the document + objectType: + type: string + description: object type of the document + id: + type: string + description: The id of the document + required: + - datasource + - id + - objectType + IndexUserRequest: + type: object + description: Describes the request body of the /indexuser API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + datasource: + type: string + description: The datasource for which the user is added + user: + description: The user to be added or updated + $ref: "#/components/schemas/DatasourceUserDefinition" + required: + - datasource + - user + GetUserCountRequest: + type: object + description: Describes the request body of the /getusercount API call + properties: + datasource: + type: string + description: Datasource name for which user count is needed. + required: + - datasource + GetUserCountResponse: + type: object + description: Describes the response body of the /getusercount API call + properties: + userCount: + type: integer + description: Number of users corresponding to the specified custom datasource. + BulkIndexUsersRequest: + type: object + description: Describes the request body for the /bulkindexusers API call + properties: + uploadId: + type: string + description: Unique id that must be used for this instance of datasource users upload + isFirstPage: + type: boolean + description: true if this is the first page of the upload. Defaults to false + isLastPage: + type: boolean + description: true if this is the last page of the upload. Defaults to false + forceRestartUpload: + type: boolean + description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + datasource: + type: string + description: datasource of the users + users: + description: batch of users for the datasource + type: array + items: + $ref: "#/components/schemas/DatasourceUserDefinition" + disableStaleDataDeletionCheck: + type: boolean + description: True if older user data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` + required: + - uploadId + - datasource + - users + GreenlistUsersRequest: + type: object + description: Describes the request body of the /betausers API call + properties: + datasource: + type: string + description: Datasource which needs to be made visible to users specified in the `emails` field. + emails: + type: array + description: The emails of the beta users + items: + type: string + format: email + required: + - datasource + - emails + DatasourceUserDefinition: + type: object + description: describes a user in the datasource + properties: + email: + type: string + userId: + description: To be supplied if the user id in the datasource is not the email + type: string + name: + type: string + isActive: + type: boolean + description: set to false if the user is a former employee or a bot + required: + - email + - name + IndexGroupRequest: + type: object + description: Describes the request body of the /indexgroup API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + datasource: + type: string + description: The datasource for which the group is added + group: + description: The group to be added or updated + $ref: "#/components/schemas/DatasourceGroupDefinition" + required: + - datasource + - group + BulkIndexGroupsRequest: + type: object + description: Describes the request body for the /bulkindexgroups API call + properties: + uploadId: + type: string + description: Unique id that must be used for this instance of datasource groups upload + isFirstPage: + type: boolean + description: true if this is the first page of the upload. Defaults to false + isLastPage: + type: boolean + description: true if this is the last page of the upload. Defaults to false + forceRestartUpload: + type: boolean + description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + datasource: + type: string + description: datasource of the groups + groups: + description: batch of groups for the datasource + type: array + items: + $ref: "#/components/schemas/DatasourceGroupDefinition" + disableStaleDataDeletionCheck: + type: boolean + description: True if older group data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` + required: + - uploadId + - datasource + - groups + DatasourceGroupDefinition: + type: object + description: describes a group in the datasource + properties: + name: + type: string + description: name of the group. Should be unique among all groups for the datasource, and cannot have spaces. + required: + - name + IndexMembershipRequest: + type: object + description: Describes the request body of the /indexmembership API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + datasource: + type: string + description: The datasource for which the membership is added + membership: + description: The membership to be added or updated + $ref: "#/components/schemas/DatasourceMembershipDefinition" + required: + - datasource + - membership + BulkIndexMembershipsRequest: + type: object + description: Describes the request body for the /bulkindexmemberships API call + properties: + uploadId: + type: string + description: Unique id that must be used for this instance of datasource group memberships upload + isFirstPage: + type: boolean + description: true if this is the first page of the upload. Defaults to false + isLastPage: + type: boolean + description: true if this is the last page of the upload. Defaults to false + forceRestartUpload: + type: boolean + description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + datasource: + type: string + description: datasource of the memberships + group: + type: string + description: group who's memberships are specified + memberships: + description: batch of memberships for the group + type: array + items: + $ref: "#/components/schemas/DatasourceBulkMembershipDefinition" + required: + - uploadId + - datasource + - memberships + ProcessAllMembershipsRequest: + type: object + description: Describes the request body of the /processallmemberships API call + properties: + datasource: + type: string + description: If provided, process group memberships only for this custom datasource. Otherwise all uploaded memberships are processed. + DatasourceMembershipDefinition: + type: object + description: describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. + properties: + groupName: + description: The group for which the membership is specified + type: string + memberUserId: + description: If the member is a user, then the email or datasource id for the user + type: string + memberGroupName: + description: If the member is a group, then the name of the member group + type: string + required: + - groupName + DatasourceBulkMembershipDefinition: + type: object + description: describes the membership row of a group in the bulk uploaded. Only one of memberUserId and memberGroupName can be specified. + properties: + memberUserId: + description: If the member is a user, then the email or datasource id for the user + type: string + memberGroupName: + description: If the member is a group, then the name of the member group + type: string + DeleteUserRequest: + type: object + description: Describes the request body of the /deleteuser API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + datasource: + type: string + description: The datasource for which the user is removed + email: + description: The email of the user to be deleted + type: string + required: + - datasource + - email + DeleteGroupRequest: + type: object + description: Describes the request body of the /deletegroup API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + datasource: + type: string + description: The datasource for which the group is removed + groupName: + description: the name of the group to be deleted + type: string + required: + - datasource + - groupName + DeleteMembershipRequest: + type: object + description: Describes the request body of the /deletemembership API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + datasource: + type: string + description: The datasource for which the membership is removed + membership: + description: the name of the membership to be deleted + $ref: "#/components/schemas/DatasourceMembershipDefinition" + required: + - datasource + - membership + DeleteEmployeeRequest: + type: object + description: Describes the request body of the /deleteemployee API call + properties: + version: + type: integer + format: int64 + description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + employeeEmail: + description: The deleted employee's email + type: string + required: + - employeeEmail + DeleteTeamRequest: + type: object + description: Describes the request body of the /deleteteam API call + properties: + id: + description: The deleted team's id + type: string + required: + - id + DocumentDefinition: + type: object + description: Indexable document structure + properties: + title: + type: string + description: Document title, in plain text, if present. If not present, the title would be attempted to be extracted from the content. + filename: + type: string + description: Source filename, in plain text, for the document. May be used as a fallback title for the document, if the title is not provided and cannot be extracted from the content. Populate this if there is no explicit title for the document and the content is sourced from a file. + container: + type: string + description: The container name for the content (Folder for example for file content). + containerDatasourceId: + type: string + description: This represents the datasource sepcific id of the container. + containerObjectType: + type: string + description: This represents the object type of the container. It cannot have spaces or _ + datasource: + type: string + objectType: + type: string + description: The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ + viewURL: + type: string + description: | + The permalink for viewing the document. **Note: viewURL is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false).**' + id: + type: string + description: | + The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. Note: id is a required field for datasources created after 1st March 2025 + summary: + $ref: "#/components/schemas/ContentDefinition" + body: + $ref: "#/components/schemas/ContentDefinition" + author: + $ref: "#/components/schemas/UserReferenceDefinition" + owner: + $ref: "#/components/schemas/UserReferenceDefinition" + description: The current owner of the document, if not the author. + permissions: + $ref: "#/components/schemas/DocumentPermissionsDefinition" + description: The permissions that define who can view this document in the search results. Please refer to [this](https://developers.glean.com/indexing/documents/permissions) for more details. + createdAt: + type: integer + format: int64 + description: The creation time, in epoch seconds. + updatedAt: + type: integer + format: int64 + description: The last update time, in epoch seconds. + updatedBy: + $ref: "#/components/schemas/UserReferenceDefinition" + tags: + type: array + items: + type: string + description: Labels associated with the document. + interactions: + $ref: "#/components/schemas/DocumentInteractionsDefinition" + status: + type: string + additionalUrls: + type: array + items: + type: string + description: Additional variations of the URL that this document points to. + nativeAppUrl: + type: string + description: A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://channel/message). + comments: + type: array + items: + $ref: "#/components/schemas/CommentDefinition" + description: Comments associated with the document. + customProperties: + type: array + items: + $ref: "#/components/schemas/CustomProperty" + description: Additional metadata properties of the document. These can surface as [facets and operators](https://developers.glean.com/indexing/datasource/custom-properties/operators_and_facets). + required: + - datasource + CommentDefinition: + type: object + description: Describes a comment on a document + properties: + id: + type: string + description: The document specific id for the comment. This field is case insensitive and should not be more than 200 characters in length. + author: + $ref: "#/components/schemas/UserReferenceDefinition" + description: The author of the comment. + content: + $ref: "#/components/schemas/ContentDefinition" + description: The content of the comment. + createdAt: + type: integer + format: int64 + description: The creation time, in epoch seconds. + updatedAt: + type: integer + format: int64 + description: The last updated time, in epoch seconds. + updatedBy: + $ref: "#/components/schemas/UserReferenceDefinition" + description: The user who last updated the comment. + required: + - id + ContentDefinition: + type: object + description: Describes text content or base64 encoded binary content + properties: + mimeType: + type: string + textContent: + type: string + description: text content. Only one of textContent or binary content can be specified + binaryContent: + type: string + description: base64 encoded binary content. Only one of textContent or binary content can be specified + required: + - mimeType + UserReferenceDefinition: + type: object + description: Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. + properties: + email: + type: string + datasourceUserId: + type: string + description: some datasources refer to the user by the datasource user id in the document + name: + type: string + PermissionsGroupIntersectionDefinition: + type: object + description: describes a list of groups that are all required in a permissions constraint + properties: + requiredGroups: + type: array + items: + type: string + DocumentPermissionsDefinition: + type: object + description: describes the access control details of the document + properties: + allowedUsers: + description: List of users who can view the document + type: array + items: + $ref: "#/components/schemas/UserReferenceDefinition" + allowedGroups: + description: List of groups that can view the document + type: array + items: + type: string + allowedGroupIntersections: + description: List of allowed group intersections. This describes a permissions constraint of the form ((GroupA AND GroupB AND GroupC) OR (GroupX AND GroupY) OR ... + type: array + items: + $ref: "#/components/schemas/PermissionsGroupIntersectionDefinition" + allowAnonymousAccess: + description: If true, then any Glean user can view the document + type: boolean + allowAllDatasourceUsersAccess: + description: If true, then any user who has an account in the datasource can view the document. + type: boolean + DocumentInteractionsDefinition: + type: object + description: describes the interactions on the document + properties: + numViews: + type: integer + numLikes: + type: integer + numComments: + type: integer + CheckDocumentAccessRequest: + type: object + description: Describes the request body of the /checkdocumentaccess API call + properties: + datasource: + type: string + description: Datasource of document to check access for. + objectType: + type: string + description: Object type of document to check access for. + docId: + type: string + description: Glean Document ID to check access for. + userEmail: + type: string + description: Email of user to check access for. + required: + - datasource + - objectType + - docId + - userEmail + CheckDocumentAccessResponse: + type: object + description: Describes the response body of the /checkdocumentaccess API call + properties: + hasAccess: + type: boolean + description: If true, user has access to document for search + CustomProperty: + type: object + description: Describes the custom properties of the object. + properties: + name: + type: string value: - stringValue: stringValue - integerValue: 5 - - percentage: 5 - count: 1 + description: Must be a string, a number (for INT properties), or an array of strings. A boolean is not valid. When OpenAPI Generator supports `oneOf`, we can semantically enforce this. + DatasourceConfig: + $ref: "#/components/schemas/SharedDatasourceConfig" + GetDatasourceConfigRequest: + type: object + description: Describes the request body of the /getdatasourceconfig API call + properties: + datasource: + type: string + description: Datasource name for which config is needed. + required: + - datasource + DatasourceConfigList: + description: List of datasource configurations. + required: + - datasourceConfig + properties: + datasourceConfig: + type: array + description: Datasource configuration. + items: + $ref: "#/components/schemas/SharedDatasourceConfig" + RotateTokenResponse: + description: Describes the response body of the /rotatetoken API call + properties: + rawSecret: + type: string + description: New raw secret + createdAt: + type: integer + format: int64 + description: Unix timestamp in seconds when the new secret value is assigned to the token. The token needs to be rotated before `rotationPeriodMinutes` past the createdAt timestamp otherwise it would be rendered unusable. + rotationPeriodMinutes: + type: integer + format: int64 + description: Refers to the time period in minutes before which this token needs to be rotated. It is required to rotate the token within the specified `rotationPeriodMinutes` after each `/rotatetoken` call, otherwise the tokens would expire. Note that the token would still expire at `expiresAt` timestamp provided during token creation even if the token is being regularly rotated. `rotationPeriodMinutes` property is inherited from the parent token being rotated + IndexEmployeeRequest: + type: object + description: Info about an employee and optional version for that info + properties: + employee: + description: Info about the employee + $ref: "#/components/schemas/EmployeeInfoDefinition" + version: + description: Version number for the employee object. If absent or 0 then no version checks are done + type: integer + format: int64 + required: + - employee + IndexEmployeeListRequest: + type: object + description: Describes the request body of the /indexemployeelist API call + properties: + employees: + description: List of employee info and version. + type: array + items: + $ref: "#/components/schemas/IndexEmployeeRequest" + SocialNetworkDefinition: + type: object + description: Employee's social network profile + properties: + name: + type: string + description: Possible values are "twitter", "linkedin". + profileName: + type: string + description: Human-readable profile name. + profileUrl: + type: string + description: Link to profile. + AdditionalFieldDefinition: + type: object + description: Additional information about the employee or team. + properties: + key: + type: string + description: Key to reference this field, e.g. "languages". Note that the key should be all lowercase alphabetic characters with no numbers, spaces, hyphens or underscores. value: - stringValue: stringValue - integerValue: 5 - sourceName: sourceName - operatorName: operatorName - objectType: objectType - rewrittenQuery: rewrittenQuery - rewrittenFacetFilters: - - fieldName: fieldName - values: - - fieldValues - - fieldValues - - fieldName: fieldName - values: - - fieldValues - - fieldValues - MessagesResponse: - required: - - hasMore - properties: - hasMore: - type: boolean - description: Whether there are more results for client to continue requesting. - searchResponse: - $ref: "#/components/schemas/SearchResponse" - rootMessage: - $ref: "#/components/schemas/SearchResult" - EditPinRequest: - allOf: - - $ref: "#/components/schemas/PinDocumentMutableProperties" - - type: object - properties: - id: - type: string - description: The opaque id of the pin to be edited. - GetPinRequest: - properties: - id: - type: string - description: The opaque id of the pin to be fetched. - GetPinResponse: - properties: - pin: - $ref: "#/components/schemas/PinDocument" - ListPinsResponse: - required: - - pins - properties: - pins: - type: array - items: - $ref: "#/components/schemas/PinDocument" - description: List of pinned documents. - PinRequest: - allOf: - - $ref: "#/components/schemas/PinDocumentMutableProperties" - - type: object - properties: - documentId: - type: string - description: The document to be pinned. - Unpin: - properties: - id: - type: string - description: The opaque id of the pin to be unpinned. - ResultsRequest: - properties: - timestamp: - type: string - description: The ISO 8601 timestamp associated with the client request. - format: date-time - trackingToken: - type: string - description: A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. - sessionInfo: - $ref: "#/components/schemas/SessionInfo" - sourceDocument: - $ref: "#/components/schemas/Document" - description: The document from which the ResultsRequest is issued, if any. - pageSize: - type: integer - example: 100 - description: Hint to the server about how many results to send back. Server may return less or more. Structured results and clustered results don't count towards pageSize. - maxSnippetSize: - type: integer - description: Hint to the server about how many characters long a snippet may be. Server may return less or more. - example: 400 - SearchRequest: - required: - - query - allOf: - - $ref: "#/components/schemas/ResultsRequest" - - type: object - properties: - query: - type: string - description: The search terms. - example: vacation policy - cursor: - type: string - description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. - resultTabIds: - type: array - items: - type: string - description: The unique IDs of the result tabs for which to fetch results. This will have precedence over datasource filters if both are specified and in conflict. - inputDetails: - $ref: "#/components/schemas/SearchRequestInputDetails" - requestOptions: - $ref: "#/components/schemas/SearchRequestOptions" - timeoutMillis: - type: integer - description: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. - example: 5000 - disableSpellcheck: - type: boolean - description: Whether or not to disable spellcheck. - example: - trackingToken: trackingToken - query: vacation policy - pageSize: 10 - requestOptions: - facetFilters: - - fieldName: type - values: - - value: article - relationType: EQUALS - - value: document - relationType: EQUALS - - fieldName: department - values: - - value: engineering - relationType: EQUALS - AutocompleteRequest: - type: object - properties: - trackingToken: - type: string - sessionInfo: - $ref: "#/components/schemas/SessionInfo" - query: - type: string - description: Partially typed query. - example: San Fra - datasourcesFilter: - type: array - items: - type: string - description: Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). Results are unfiltered if missing. - datasource: - type: string - description: Filter to only return results relevant to the given datasource. - resultTypes: - type: array - description: Filter to only return results of the given type(s). All types may be returned if omitted. - items: - type: string - enum: - - ADDITIONAL_DOCUMENT - - APP - - BROWSER_HISTORY - - DATASOURCE - - DOCUMENT - - ENTITY - - GOLINK - - HISTORY - - CHAT_HISTORY - - NEW_CHAT - - OPERATOR - - OPERATOR_VALUE - - QUICKLINK - - SUGGESTION - resultSize: - type: integer - description: | - Maximum number of results to be returned. If no value is provided, the backend will cap at 200. - example: 10 - authTokens: - type: array - description: Auth tokens which may be used for federated results. - items: - $ref: "#/components/schemas/AuthToken" - example: - trackingToken: trackingToken - query: what is a que - datasource: GDRIVE - resultSize: 10 - OperatorScope: - properties: - datasource: - type: string - docType: - type: string - OperatorMetadata: - required: - - name - properties: - name: - type: string - isCustom: - type: boolean - description: Whether this operator is supported by default or something that was created within a workplace app (e.g. custom jira field). - operatorType: - type: string - enum: - - TEXT - - DOUBLE - - DATE - - USER - helpText: - type: string - scopes: - type: array - items: - $ref: "#/components/schemas/OperatorScope" - value: - type: string - description: Raw/canonical value of the operator. Only applies when result is an operator value. - displayValue: - type: string - description: Human readable value of the operator that can be shown to the user. Only applies when result is an operator value. - example: - name: Last Updated - operatorType: DATE - scopes: - - datasource: GDRIVE - docType: Document - - datasource: ZENDESK - Quicklink: - description: An action for a specific datasource that will show up in autocomplete and app card, e.g. "Create new issue" for jira. - properties: - name: - type: string - description: Full action name. Used in autocomplete. - shortName: - type: string - description: Shortened name. Used in app cards. - url: - type: string - description: The URL of the action. - iconConfig: - $ref: "#/components/schemas/IconConfig" - description: The config for the icon for this quicklink - id: - type: string - description: Unique identifier of this quicklink - scopes: - type: array - description: The scopes for which this quicklink is applicable - items: + type: array + description: | + List of type string or HypertextField. + + HypertextField is defined as + ``` + { + anchor: string, // Anchor text for the hypertext field. + hyperlink: string, // URL for the hypertext field. + } + ``` + Example: ```{"anchor":"Glean","hyperlink":"https://glean.com"}``` + + When OpenAPI Generator supports oneOf, we will semantically enforce this in the docs. + + **Note**: If using the Python SDK to pass in a list of strings, the value may need to be a list of dictionaries. In that case, the key in that dictionary will be ignored. + Example: ```"languages": [{"lang":"English","lang":"Spanish",...}]```. In this case, the key "lang" will be ignored and can even be passed in as an empty string. + items: + type: object + description: Either a string or HypertextField. When OpenAPI Generator supports oneOf, we can semantically enforce this in the docs. + HypertextField: + type: object + properties: + anchor: + type: string + description: Anchor text for the hypertext field. + hyperlink: + type: string + description: URL for the hypertext field. + EmployeeInfoDefinition: + type: object + description: Describes employee info + properties: + email: + type: string + description: The employee's email + firstName: + type: string + description: | + The first name of the employee. **Note**: The value cannot be empty + lastName: + type: string + description: | + The last name of the employee. **Note**: The value cannot be empty + preferredName: + type: string + description: The preferred name or nickname of the employee + id: + type: string + description: | + **[Advanced]** A unique universal internal identifier for the employee. This is solely used for understanding manager relationships along with `managerId`. + phoneNumber: + type: string + description: The employee's phone number. + location: + type: string + description: The employee's location (city/office name etc). + deprecated: true + x-glean-deprecated: + id: a7f6fbaa-0eaf-4c0c-a4f5-ab90347f73fd + introduced: "2026-02-05" + message: Field is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" + structuredLocation: + description: Detailed location with information about country, state, city etc. + $ref: "#/components/schemas/StructuredLocation" + title: + type: string + description: The employee's role title. + photoUrl: + type: string + format: uri + description: The employee's profile pic + businessUnit: + type: string + description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + department: + type: string + description: An organizational unit where everyone has a similar task, e.g. `Engineering`. + datasourceProfiles: + type: array + description: The datasource profiles of the employee, e.g. `Slack`,`Github`. + items: + $ref: "#/components/schemas/DatasourceProfile" + teams: + type: array + description: Info about the employee's team(s) + items: + $ref: "#/components/schemas/EmployeeTeamInfo" + startDate: + type: string + format: date + description: The date when the employee started + endDate: + type: string + format: date + description: If a former employee, the last date of employment. + bio: + type: string + description: Short biography or mission statement of the employee. + pronoun: + type: string + description: She/her, He/his or other pronoun. + alsoKnownAs: + type: array + description: Other names associated with the employee. + items: + type: string + profileUrl: + type: string + description: Link to internal company person profile. + socialNetworks: + type: array + description: List of social network profiles. + items: + $ref: "#/components/schemas/SocialNetworkDefinition" + managerEmail: + type: string + description: The email of the employee's manager + managerId: + type: string + description: | + **[Advanced]** A unique universal internal identifier for the employee's manager. This is solely used in conjunction with `id`. + type: + type: string + description: The type of the employee, an enum of `FULL_TIME`, `CONTRACTOR`, `NON_EMPLOYEE` + default: FULL_TIME + relationships: + type: array + description: List of unidirectional relationships with other employees. E.g. this employee (`A`) is a CHIEF_OF_STAFF to another employee (`B`); or this employee (`A`) is an EXECUTIVE_ASSISTANT of another employee (`C`). The mapping should be attached to `A`'s profile. + items: + $ref: "#/components/schemas/EntityRelationship" + status: + type: string + description: The status of the employee, an enum of `CURRENT`, `FUTURE`, `EX` + default: CURRENT + additionalFields: + type: array + description: List of additional fields with more information about the employee. + items: + $ref: "#/components/schemas/AdditionalFieldDefinition" + required: + - department + - email + EmployeeAndVersionDefinition: + type: object + description: describes info about an employee and optional version for that info + properties: + employee: + description: Info about the employee + $ref: "#/components/schemas/EmployeeInfoDefinition" + version: + description: Version number for the employee object. If absent or 0 then no version checks are done + type: integer + format: int64 + required: + - info + EmployeeTeamInfo: + type: object + description: Information about which team an employee belongs to + properties: + id: + type: string + description: unique identifier for this team + name: + type: string + description: Team name + url: + type: string + format: uri + description: Link to internal company team page + EntityRelationship: + type: object + description: Describes a relationship edge between a source and destination entity + required: + - name + - email + properties: + name: + type: string + description: The title or type of relationship. Currently an enum of `CHIEF_OF_STAFF`, `EXECUTIVE_ASSISTANT` + email: + type: string + description: Email of the person with whom the relationship exists. Per the example above, either `B` or `C`'s email depending on the relationship. + TeamMember: + type: object + description: Information about a team's member + properties: + email: + type: string + description: The member's email + format: email + relationship: + type: string + description: The member's relationship to the team, an enum of `MEMBER`, `MANAGER`, `LEAD`, `POINT_OF_CONTACT`, `OTHER` + default: MEMBER + join_date: + type: string + format: date + description: The member's start date + required: + - email + TeamInfoDefinition: + type: object + description: Information about an employee's team + properties: + id: + type: string + description: The unique ID of the team + name: + type: string + description: Human-readable team name + description: + type: string + description: The description of this team + businessUnit: + type: string + description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + department: + type: string + description: An organizational unit where everyone has a similar task, e.g. `Engineering`. + photoUrl: + type: string + format: uri + description: A link to the team's photo + externalLink: + type: string + format: uri + description: | + A link to an external team page. If set, team results will link to it. + emails: + type: array + description: The emails of the team + items: + $ref: "#/components/schemas/TeamEmail" + datasourceProfiles: + type: array + description: The datasource profiles of the team, e.g. `Slack`,`Github`. + items: + $ref: "#/components/schemas/DatasourceProfile" + members: + type: array + description: The members of the team + items: + $ref: "#/components/schemas/TeamMember" + additionalFields: + type: array + description: List of additional fields with more information about the team. + items: + $ref: "#/components/schemas/AdditionalFieldDefinition" + required: + - id + - members + - name + IndexTeamRequest: + type: object + description: Info about a team and optional version for that info + properties: + team: + description: Info about the team + $ref: "#/components/schemas/TeamInfoDefinition" + version: + description: Version number for the team object. If absent or 0 then no version checks are done + type: integer + format: int64 + required: + - team + BulkIndexShortcutsRequest: + type: object + description: Describes the request body of the /bulkindexshortcuts API call + allOf: + - $ref: "#/components/schemas/BulkIndexRequest" + - type: object + properties: + shortcuts: + description: Batch of shortcuts information + type: array + items: + $ref: "#/components/schemas/ExternalShortcut" + required: + - shortcuts + UploadShortcutsRequest: + type: object + description: Describes the request body of the /uploadshortcuts API call + allOf: + - $ref: "#/components/schemas/BulkIndexRequest" + - type: object + properties: + shortcuts: + description: Batch of shortcuts information + type: array + items: + $ref: "#/components/schemas/IndexingShortcut" + required: + - shortcuts + DebugDatasourceStatusResponse: + type: object + description: Describes the response body of the /debug/{datasource}/status API call + properties: + documents: + type: object + properties: + bulkUploadHistory: + type: object + $ref: "#/components/schemas/BulkUploadHistoryEventList" + counts: + type: object + properties: + uploaded: + type: array + items: + $ref: "#/components/schemas/DatasourceObjectTypeDocumentCountEntry" + description: | + A list of object types and corresponding upload counts. Note: This data may be cached and could be up to 3 hours stale. + indexed: + type: array + description: The number of documents indexed, grouped by objectType + items: + $ref: "#/components/schemas/DatasourceObjectTypeDocumentCountEntry" + processingHistory: + $ref: "#/components/schemas/ProcessingHistoryEventList" + identity: + type: object + properties: + processingHistory: + $ref: "#/components/schemas/ProcessingHistoryEventList" + users: + $ref: "#/components/schemas/DebugDatasourceStatusIdentityResponseComponent" + groups: + $ref: "#/components/schemas/DebugDatasourceStatusIdentityResponseComponent" + memberships: + $ref: "#/components/schemas/DebugDatasourceStatusIdentityResponseComponent" + datasourceVisibility: + type: string + description: The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE + enum: + - ENABLED_FOR_ALL + - ENABLED_FOR_TEST_GROUP + - NOT_ENABLED + example: ENABLED_FOR_ALL + DebugDatasourceStatusIdentityResponseComponent: + type: object + properties: + bulkUploadHistory: + type: object + $ref: "#/components/schemas/BulkUploadHistoryEventList" + counts: + type: object + properties: + uploaded: + type: integer + description: The number of users/groups/memberships uploaded + example: 15 + DatasourceObjectTypeDocumentCountEntry: + type: object + properties: + objectType: + type: string + description: The object type of the document + example: Article + count: + type: integer + description: The number of documents of the corresponding objectType + example: 15 + BulkUploadHistoryEvent: + type: object + description: Information about a successful bulk upload + properties: + uploadId: + type: string + description: The unique ID of the upload + example: upload-id-content-1707403081 + startTime: + type: string + description: The start time of the upload in ISO 8601 format + example: "2021-08-06T17:58:01.000Z" + endTime: + type: string + description: The end time of the upload in ISO 8601 format, 'NA' if the upload is still active + example: "2021-08-06T18:58:01.000Z" + status: + type: string + description: The status of the upload, an enum of ACTIVE, SUCCESSFUL + enum: + - ACTIVE + - SUCCESSFUL + example: SUCCESSFUL + processingState: + type: string + description: The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED + enum: + - UNAVAILABLE + - UPLOAD STARTED + - UPLOAD IN PROGRESS + - UPLOAD COMPLETED + - DELETION PAUSED + - INDEXING COMPLETED + example: UPLOAD COMPLETED + BulkUploadHistoryEventList: + description: Information about active and recent successful uploads for the datasource + type: array + items: + $ref: "#/components/schemas/BulkUploadHistoryEvent" + DebugDocumentRequest: + type: object + description: Describes the request body of the /debug/{datasource}/document API call. + properties: + objectType: + type: string + description: Object type of the document to get the status for. + example: Article + docId: + type: string + description: Glean Document ID within the datasource to get the status for. + example: art123 + required: + - objectType + - docId + DebugDocumentResponse: + type: object + description: Describes the response body of the /debug/{datasource}/document API call + properties: + status: + type: object + description: Upload and indexing status of the document + $ref: "#/components/schemas/DocumentStatusResponse" + uploadedPermissions: + $ref: "#/components/schemas/DocumentPermissionsDefinition" + DebugDocumentsRequest: + type: object + description: Describes the request body of the /debug/{datasource}/documents API call. + properties: + debugDocuments: + type: array + description: Documents to fetch debug information for + items: + $ref: "#/components/schemas/DebugDocumentRequest" + required: + - debugDocuments + DebugDocumentsResponseItem: + type: object + description: Describes the response body of a single document in the /debug/{datasource}/documents API call + properties: + docId: + type: string + description: Id of the document + objectType: + type: string + description: objectType of the document + debugInfo: + type: object + description: Debug information of the document + $ref: "#/components/schemas/DebugDocumentResponse" + DebugDocumentsResponse: + type: object + description: Describes the response body of a single document in the /debug/{datasource}/documents API call + properties: + documentStatuses: + type: array + description: List of document ids/urls and their debug information + items: + $ref: "#/components/schemas/DebugDocumentsResponseItem" + DocumentStatusResponse: + type: object + description: Describes the document status response body + properties: + uploadStatus: + type: string + description: Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN + example: UPLOADED + lastUploadedAt: + type: string + description: Time of last successful upload for the document, in ISO 8601 format + example: "2021-08-06T17:58:01.000Z" + indexingStatus: + type: string + description: Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN + example: INDEXED + lastIndexedAt: + type: string + description: Time of last successful indexing for the document, in ISO 8601 format + example: "2021-08-06T17:58:01.000Z" + permissionIdentityStatus: + type: string + description: Permission identity status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN (Always unknown if `identityDatasourceName` is set). Document visibility may be affected status is `NOT_UPLOADED`. + example: UPLOADED + LifeCycleEvent: + type: object + properties: + event: + type: string + description: Type of event + enum: + - UPLOADED + - INDEXED + - DELETION_REQUESTED + - DELETED + example: INDEXED + timestamp: + type: string + description: Timestamp of the event + example: "2021-08-06T17:58:01.000Z" + ProcessingHistoryEvent: + type: object + description: Processing history event for a datasource + properties: + startTime: + type: string + description: The start time of the processing in ISO 8601 format + example: "2021-08-06T17:58:01.000Z" + endTime: + type: string + description: The end time of the processing in ISO 8601 format, 'NA' if still in progress + example: "2021-08-06T18:58:01.000Z" + ProcessingHistoryEventList: + description: Information about processing history for the datasource + type: array + items: + $ref: "#/components/schemas/ProcessingHistoryEvent" + DebugUserRequest: + type: object + description: Describes the request body of the /debug/{datasource}/user API call + properties: + email: + type: string + description: Email ID of the user to get the status for + example: u1@foo.com + required: + - email + DebugUserResponse: + type: object + description: Describes the response body of the /debug/{datasource}/user API call + properties: + status: + type: object + description: Upload and indexing status of the user + $ref: "#/components/schemas/UserStatusResponse" + uploadedGroups: + type: array + description: List of groups the user is a member of, as uploaded via permissions API. + items: + $ref: "#/components/schemas/DatasourceGroupDefinition" + UserStatusResponse: + type: object + description: Describes the user status response body + properties: + isActiveUser: + type: boolean + description: Whether the user is active or not + example: true + uploadStatus: + $ref: "#/components/schemas/UploadStatusEnum" + lastUploadedAt: + type: string + description: Time of last successful upload for the user, in ISO 8601 format + example: "2021-08-06T17:58:01.000Z" + UploadStatusEnum: type: string + description: Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN enum: - - APP_CARD - - AUTOCOMPLETE_EXACT_MATCH - - AUTOCOMPLETE_FUZZY_MATCH - - AUTOCOMPLETE_ZERO_QUERY - - NEW_TAB_PAGE - AutocompleteResult: - required: - - result - - result_type - properties: - result: - type: string - keywords: - type: array - items: - type: string - description: A list of all possible keywords for given result. - resultType: - type: string - enum: - - ADDITIONAL_DOCUMENT - - APP - - BROWSER_HISTORY - - DATASOURCE - - DOCUMENT - - ENTITY - - GOLINK - - HISTORY - - CHAT_HISTORY - - NEW_CHAT - - OPERATOR - - OPERATOR_VALUE - - QUICKLINK - - SUGGESTION - score: - type: number - description: Higher indicates a more confident match. - operatorMetadata: - $ref: "#/components/schemas/OperatorMetadata" - quicklink: - $ref: "#/components/schemas/Quicklink" - document: - $ref: "#/components/schemas/Document" - url: - type: string - structuredResult: - $ref: "#/components/schemas/StructuredResult" - trackingToken: - type: string - description: A token to be passed in /feedback events associated with this autocomplete result. - ranges: - type: array - items: - $ref: "#/components/schemas/TextRange" - description: Subsections of the result string to which some special formatting should be applied (eg. bold) - example: - result: sample result - resultType: DOCUMENT - score: 4.56 - url: https://www.example.com/ - trackingToken: abcd - metadata: - - datasource: confluence - - objectType: page - AutocompleteResultGroup: - description: A subsection of the results list from which distinct sections should be created. - properties: - startIndex: - type: integer - description: The inclusive start index of the range. - endIndex: - type: integer - description: The exclusive end index of the range. - title: - type: string - description: The title of the result group to be displayed. Empty means no title. - AutocompleteResponse: - allOf: - - $ref: "#/components/schemas/BackendExperimentsContext" - - type: object - properties: - trackingToken: - type: string - description: An opaque token that represents this particular set of autocomplete results. To be used for /feedback reporting. - sessionInfo: - $ref: "#/components/schemas/SessionInfo" - results: - type: array - items: - $ref: "#/components/schemas/AutocompleteResult" - groups: - type: array - items: - $ref: "#/components/schemas/AutocompleteResultGroup" - description: Subsections of the results list from which distinct sections should be created. - errorInfo: - $ref: "#/components/schemas/ErrorInfo" - backendTimeMillis: - type: integer - format: int64 - description: Time in milliseconds the backend took to respond to the request. - example: 1100 - example: - trackingToken: trackingToken - ChatZeroStateSuggestionOptions: - properties: - applicationId: - type: string - description: The Chat Application ID this feed request should be scoped to. Empty means there is no Chat Application ID.. - FeedRequestOptions: - required: - - resultSize - properties: - resultSize: - type: integer - description: Number of results asked in response. If a result is a collection, counts as one. - timezoneOffset: - type: integer - description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. - categoryToResultSize: - type: object - additionalProperties: + - UPLOADED + - NOT_UPLOADED + - STATUS_UNKNOWN + example: UPLOADED + DebugDocumentLifecycleRequest: type: object + description: Describes the request body of the /debug/{datasource}/document/events API call. properties: - resultSize: - type: integer - description: Mapping from category to number of results asked for the category. - datasourceFilter: - type: array - items: - type: string - description: Datasources for which content should be included. Empty is for all. - chatZeroStateSuggestionOptions: - $ref: "#/components/schemas/ChatZeroStateSuggestionOptions" - FeedRequest: - required: - - refreshType - properties: - categories: - type: array - items: + objectType: + type: string + description: Object type of the document to get lifecycle events for. + example: Article + docId: + type: string + description: Glean Document ID within the datasource to get lifecycle events for. + example: art123 + startDate: + type: string + description: The start date for events to be fetched. Cannot be more than 30 days (default 7 days) in the past. + example: "2025-05-01" + maxEvents: + type: integer + description: Max number of events to be fetched. Cannot be more than 100 (default 20). + example: 50 + required: + - objectType + - docId + DebugDocumentLifecycleResponse: + type: object + description: Describes the response body of the /debug/{datasource}/document/events API call + properties: + lifeCycleEvents: + type: array + description: List of lifecycle events corresponding to the document + items: + $ref: "#/components/schemas/LifeCycleEvent" + CustomMetadataPutRequest: + type: object + description: Request body for adding or updating custom metadata on a document + properties: + customMetadata: + type: array + description: Array of custom metadata key-value pairs + items: + $ref: "#/components/schemas/CustomProperty" + required: + - customMetadata + CustomMetadataSchema: + type: object + description: Schema for custom metadata containing metadata key definitions + properties: + metadataKeys: + type: array + description: Array of metadata key definitions + items: + $ref: "#/components/schemas/CustomMetadataPropertyDefinition" + required: + - metadataKeys + SuccessResponse: + type: object + description: Success response for custom metadata operations + properties: + success: + type: boolean + description: Indicates if the operation was successful + default: true + ErrorInfoResponse: + type: object + description: Error response for custom metadata operations + properties: + error: + type: string + description: Error message describing what went wrong + message: + type: string + description: Additional details about the error + required: + - error + PropertyDefinition: + properties: + name: + type: string + description: The name of the property in the `DocumentMetadata` (e.g. 'createTime', 'updateTime', 'author', 'container'). In the future, this will support custom properties too. + displayLabel: + type: string + description: The user friendly label for the property. + displayLabelPlural: + type: string + description: The user friendly label for the property that will be used if a plural context. + propertyType: + type: string + enum: + - TEXT + - DATE + - INT + - USERID + - PICKLIST + - TEXTLIST + - MULTIPICKLIST + description: The type of custom property - this governs the search and faceting behavior. Note that MULTIPICKLIST is not yet supported. + uiOptions: + type: string + enum: + - NONE + - SEARCH_RESULT + - DOC_HOVERCARD + hideUiFacet: + type: boolean + description: If true then the property will not show up as a facet in the UI. + uiFacetOrder: + type: integer + description: Will be used to set the order of facets in the UI, if present. If set for one facet, must be set for all non-hidden UI facets. Must take on an integer value from 1 (shown at the top) to N (shown last), where N is the number of non-hidden UI facets. These facets will be ordered below the built-in "Type" and "Tag" operators. + skipIndexing: + type: boolean + description: If true then the property will not be indexed for retrieval and ranking. + group: + type: string + description: The unique identifier of the `PropertyGroup` to which this property belongs. + PropertyGroup: + description: A grouping for multiple PropertyDefinition. Grouped properties will be displayed together in the UI. + properties: + name: + type: string + description: The unique identifier of the group. + displayLabel: + type: string + description: The user-friendly group label to display. + ObjectDefinition: + description: The definition for an `DocumentMetadata.objectType` within a datasource. + properties: + name: + type: string + description: Unique identifier for this `DocumentMetadata.objectType`. If omitted, this definition is used as a default for all unmatched `DocumentMetadata.objectType`s in this datasource. + displayLabel: + type: string + description: The user-friendly name of the object for display. + docCategory: + type: string + enum: + - UNCATEGORIZED + - TICKETS + - CRM + - PUBLISHED_CONTENT + - COLLABORATIVE_CONTENT + - QUESTION_ANSWER + - MESSAGING + - CODE_REPOSITORY + - CHANGE_MANAGEMENT + - PEOPLE + - EMAIL + - SSO + - ATS + - KNOWLEDGE_HUB + - EXTERNAL_SHORTCUT + - ENTITY + - CALENDAR + - AGENTS + description: The document category of this object type. + propertyDefinitions: + type: array + items: + $ref: "#/components/schemas/PropertyDefinition" + propertyGroups: + type: array + description: A list of `PropertyGroup`s belonging to this object type, which will group properties to be displayed together in the UI. + items: + $ref: "#/components/schemas/PropertyGroup" + summarizable: + description: Whether or not the object is summarizable + type: boolean + CanonicalizingRegexType: + description: Regular expression to apply to an arbitrary string to transform it into a canonical string. + properties: + matchRegex: + type: string + description: Regular expression to match to an arbitrary string. + rewriteRegex: + type: string + description: Regular expression to transform into a canonical string. + SharedDatasourceConfigNoInstance: + type: object + description: Structure describing shared config properties of a datasource with no multi-instance support. + required: + - name + properties: + name: + type: string + description: Unique identifier of datasource instance to which this config applies. + displayName: + type: string + description: The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. + datasourceCategory: + type: string + enum: + - UNCATEGORIZED + - TICKETS + - CRM + - PUBLISHED_CONTENT + - COLLABORATIVE_CONTENT + - QUESTION_ANSWER + - MESSAGING + - CODE_REPOSITORY + - CHANGE_MANAGEMENT + - PEOPLE + - EMAIL + - SSO + - ATS + - KNOWLEDGE_HUB + - EXTERNAL_SHORTCUT + - ENTITY + - CALENDAR + - AGENTS + default: UNCATEGORIZED + description: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. + urlRegex: + type: string + description: "Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.**" + example: https://example-company.datasource.com/.* + iconUrl: + type: string + description: The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + objectDefinitions: + type: array + description: The list of top-level `objectType`s for the datasource. + items: + $ref: "#/components/schemas/ObjectDefinition" + suggestionText: + type: string + description: Example text for what to search for in this datasource + homeUrl: + type: string + description: The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. + crawlerSeedUrls: + type: array + description: This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. + items: + type: string + iconDarkUrl: + type: string + description: The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + hideBuiltInFacets: + type: array + description: List of built-in facet types that should be hidden for the datasource. + items: + type: string + enum: + - TYPE + - TAG + - AUTHOR + - OWNER + canonicalizingURLRegex: + type: array + description: A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. + items: + $ref: "#/components/schemas/CanonicalizingRegexType" + canonicalizingTitleRegex: + type: array + description: A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results + items: + $ref: "#/components/schemas/CanonicalizingRegexType" + redlistTitleRegex: + type: string + description: A regex that identifies titles that should not be indexed + connectorType: + allOf: + - $ref: "#/components/schemas/ConnectorType" + type: string + quicklinks: + type: array + description: List of actions for this datasource instance that will show up in autocomplete and app card, e.g. "Create new issue" for jira + items: + $ref: "#/components/schemas/Quicklink" + renderConfigPreset: + type: string + description: The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details + aliases: + type: array + description: Aliases that can be used as `app` operator-values. + items: + type: string + isOnPrem: + type: boolean + description: Whether or not this datasource is hosted on-premise. + trustUrlRegexForViewActivity: + type: boolean + default: true + description: True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. + includeUtmSource: + type: boolean + description: If true, a utm_source query param will be added to outbound links to this datasource within Glean. + stripFragmentInCanonicalUrl: + type: boolean + default: true + description: If true, the fragment part of the URL will be stripped when converting to a canonical url. + CustomDatasourceConfig: + description: Structure describing config properties of a custom datasource + allOf: + - $ref: "#/components/schemas/SharedDatasourceConfigNoInstance" + - type: object + properties: + identityDatasourceName: + type: string + description: If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. + productAccessGroup: + type: string + description: If the datasource uses a specific product access group, then the name of that group. + isUserReferencedByEmail: + type: boolean + description: whether email is used to reference users in document ACLs and in group memberships. + isEntityDatasource: + type: boolean + default: false + description: True if this datasource is used to push custom entities. + isTestDatasource: + type: boolean + default: false + description: True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. + ShortcutProperties: + properties: + inputAlias: + type: string + description: link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. + description: + type: string + description: A short, plain text blurb to help people understand the intent of the shortcut. + destinationUrl: + type: string + format: url + description: destination URL for the shortcut. + createdBy: + type: string + description: Email of the user who created this shortcut. + createTime: + type: integer + format: int64 + description: The time the shortcut was created in epoch seconds. + updatedBy: + type: string + description: Email of the user who last updated this shortcut. + updateTime: + type: integer + format: int64 + description: The time the shortcut was updated in epoch seconds. + ExternalShortcut: + allOf: + - $ref: "#/components/schemas/ShortcutProperties" + - type: object + required: + - destinationUrl + - intermediateUrl + - createdBy + - inputAlias + properties: + title: + type: string + description: Title of the golink + intermediateUrl: + type: string + format: url + description: The URL from which the user is then redirected to the destination URL. + decayedVisitScore: + type: number + format: double + description: decayed visits score for ranking + editUrl: + type: string + format: url + description: The URL using which the user can access the edit page of the shortcut. + SharedDatasourceConfig: + description: Structure describing shared config properties of the datasource (including multi-instance support) + allOf: + - $ref: "#/components/schemas/SharedDatasourceConfigNoInstance" + - type: object + properties: + datasourceName: + type: string + description: The (non-unique) name of the datasource of which this config is an instance, e.g. "jira". + instanceOnlyName: + type: string + description: The instance of the datasource for this particular config, e.g. "onprem". + instanceDescription: + type: string + description: A human readable string identifying this instance as compared to its peers, e.g. "github.com/askscio" or "github.askscio.com" + IndexingShortcut: + allOf: + - $ref: "#/components/schemas/ShortcutProperties" + - type: object + required: + - destinationUrl + - createdBy + - inputAlias + properties: + unlisted: + type: boolean + description: Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author and admins only. + urlTemplate: + type: string + description: For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. + SensitiveInfoType: + properties: + likelihoodThreshold: + deprecated: true + type: string + enum: + - LIKELY + - VERY_LIKELY + - POSSIBLE + - UNLIKELY + - VERY_UNLIKELY + x-glean-deprecated: + - id: d45039ec-d6f6-47ba-93b7-ab2307b07f84 + introduced: "2026-02-05" + kind: property + message: Field is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" + infoType: + description: Text representation of an info-type to scan for. + type: string + TimeRange: + properties: + startTime: + type: string + description: start time of the time range, applicable for the CUSTOM type. + format: date-time + endTime: + type: string + description: end time of the time range, applicable for the CUSTOM type. + format: date-time + lastNDaysValue: + type: integer + description: The number of days to look back from the current time, applicable for the LAST_N_DAYS type. + format: int64 + InputOptions: + description: Controls which data-sources and what time-range to include in scans. + properties: + urlGreenlist: + deprecated: true + type: array + description: list of url regex matching documents excluded from report + items: + type: string + x-glean-deprecated: + id: e022aaa5-56e6-4b57-bca3-b11943da76a0 + introduced: "2026-02-05" + message: Field is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" + datasourcesType: + type: string + description: The types of datasource for which to run the report/policy. + enum: + - ALL + - CUSTOM + datasources: + deprecated: true + type: array + description: List of datasources to consider for report. DEPRECATED - use datasourceInstances instead. + items: + type: string + x-glean-deprecated: + id: 97e35970-e0ed-4248-be13-2af8c22e7894 + introduced: "2026-02-05" + message: Use datasourceInstances instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use datasourceInstances instead" + datasourceInstances: + type: array + description: List of datasource instances to consider for report/policy. + items: + type: string + timePeriodType: + type: string + description: Type of time period for which to run the report/policy. PAST_DAY is deprecated. + enum: + - ALL_TIME + - PAST_YEAR + - PAST_DAY + - CUSTOM + - LAST_N_DAYS + customTimeRange: + $ref: "#/components/schemas/TimeRange" + subsetDocIdsToScan: + type: array + description: Subset of document IDs to scan. If empty, all documents matching other scope criteria will be scanned. + items: + type: string + SharingOptions: + description: Controls how "shared" a document must be to get picked for scans. + properties: + enabled: + deprecated: true + type: boolean + x-glean-deprecated: + id: e9260be6-209b-4ce2-a4b3-f7f22879dd86 + introduced: "2026-02-05" + message: Field is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" + threshold: + description: The minimum number of users the document is shared with. + type: integer + thresholdEnabled: + description: Documents will be filtered based on how many people have access to it. + type: boolean + anyoneWithLinkEnabled: + deprecated: true + type: boolean + x-glean-deprecated: + id: 30646ced-e0db-43ef-8412-64a67c5d0f53 + introduced: "2026-02-05" + message: Field is deprecated + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" + anyoneInternalEnabled: + description: Only users within the organization can access the document. + type: boolean + anonymousAccessEnabled: + description: Anyone on the internet can access the document. + type: boolean + userAccessEnabled: + description: Enable user access check + type: boolean + userIds: + type: array + description: Any one of the specified users can access the document. + items: + type: string + ExternalSharingOptions: + deprecated: true + x-glean-deprecated: + id: 7c9e4a1d-3f8b-4e2c-9a5d-6b0f1c8e2d4a + introduced: "2026-02-05" + message: Use broadSharingOptions instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead" + allOf: + - description: DEPRECATED - use `broadSharingOptions` instead. + - $ref: "#/components/schemas/SharingOptions" + - type: object + properties: + domainAccessEnabled: + type: boolean + HotwordProximity: + properties: + windowBefore: + type: integer + windowAfter: + type: integer + Hotword: + properties: + regex: + type: string + proximity: + $ref: "#/components/schemas/HotwordProximity" + SensitiveExpression: + properties: + expression: + description: Sensitive word, phrase, or regular expression. + type: string + hotwords: + description: Zero to three proximate regular expressions necessary to consider an expression as sensitive content. + type: array + items: + $ref: "#/components/schemas/Hotword" + CustomSensitiveRuleType: type: string + description: Type of the custom sensitive rule. enum: - - DOCUMENT_SUGGESTION - - DOCUMENT_SUGGESTION_SCENARIO - - TRENDING_DOCUMENT - - VERIFICATION_REMINDER - - EVENT - - ANNOUNCEMENT - - MENTION - - DATASOURCE_AFFINITY - - RECENT - - COMPANY_RESOURCE - - EXPERIMENTAL - - PEOPLE_CELEBRATIONS - - DISPLAYABLE_LIST - - SOCIAL_LINK - - EXTERNAL_TASKS - - WORKFLOW_COLLECTIONS - - ZERO_STATE_CHAT_SUGGESTION - - ZERO_STATE_CHAT_TOOL_SUGGESTION - - ZERO_STATE_WORKFLOW_CREATED_BY_ME - - ZERO_STATE_WORKFLOW_FAVORITES - - ZERO_STATE_WORKFLOW_POPULAR - - ZERO_STATE_WORKFLOW_RECENT - - ZERO_STATE_WORKFLOW_SUGGESTION - - PERSONALIZED_CHAT_SUGGESTION - - DAILY_DIGEST - - TASK - - PLAN_MY_DAY - - END_MY_DAY - - STARTER_KIT - - MID_DAY_CATCH_UP - - QUERY_SUGGESTION - - COWORK_CUJ_PROMO - - WEEKLY_MEETINGS - - FOLLOW_UP - - MILESTONE_TIMELINE_CHECK - - PROJECT_DISCUSSION_DIGEST - - PROJECT_FOCUS_BLOCK - - PROJECT_NEXT_STEP - - DEMO_CARD - - OOO_PLANNER - - OOO_CATCH_UP - description: Categories of content requested. An allowlist gives flexibility to request content separately or together. - requestOptions: - $ref: "#/components/schemas/FeedRequestOptions" - timeoutMillis: - type: integer - description: Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. - example: 5000 - sessionInfo: - $ref: "#/components/schemas/SessionInfo" - DisplayableListFormat: - properties: - format: - type: string - enum: - - LIST - description: defines how to render this particular displayable list card - DisplayableListItemUIConfig: - type: object - description: UI configurations for each item of the list - properties: - showNewIndicator: - type: boolean - description: show a "New" pill next to the item - ConferenceData: - required: - - provider - - uri - properties: - provider: - type: string - enum: - - ZOOM - - HANGOUTS - uri: - type: string - description: A permalink for the conference. - source: - type: string - enum: - - NATIVE_CONFERENCE - - LOCATION - - DESCRIPTION - EventClassificationName: - description: The name for a generated classification of an event. - type: string - enum: - - External Event - EventStrategyName: - type: string - description: The name of method used to surface relevant data for a given calendar event. - enum: - - customerCard - - news - - call - - email - - meetingNotes - - linkedIn - - relevantDocuments - - chatFollowUps - - conversations - EventClassification: - description: A generated classification of a given event. - properties: - name: - $ref: "#/components/schemas/EventClassificationName" - strategies: - type: array - items: - $ref: "#/components/schemas/EventStrategyName" - StructuredLink: - description: The display configuration for a link. - properties: - name: - type: string - description: The display name for the link - url: - type: string - description: The URL for the link. - iconConfig: - $ref: "#/components/schemas/IconConfig" - GeneratedAttachmentContent: - description: Content that has been generated or extrapolated from the documents present in the document field. - properties: - displayHeader: - description: The header describing the generated content. - type: string - text: - description: The content that has been generated. - type: string - example: - displayHeader: Action Items - content: You said you'd send over the design document after the meeting. - GeneratedAttachment: - description: These are attachments that aren't natively present on the event, and have been smartly suggested. - properties: - strategyName: - $ref: "#/components/schemas/EventStrategyName" - documents: - type: array - items: - $ref: "#/components/schemas/Document" - person: - $ref: "#/components/schemas/Person" - customer: - $ref: "#/components/schemas/Customer" - externalLinks: - description: A list of links to external sources outside of Glean. - type: array - items: - $ref: "#/components/schemas/StructuredLink" - content: - type: array - items: - $ref: "#/components/schemas/GeneratedAttachmentContent" - CalendarEvent: - required: - - id - - url - allOf: - - $ref: "#/components/schemas/AnonymousEvent" - - type: object - properties: - id: - type: string - description: The calendar event id - url: - type: string - description: A permalink for this calendar event - attendees: - $ref: "#/components/schemas/CalendarAttendees" - location: - type: string - description: The location that this event is taking place at. - conferenceData: - $ref: "#/components/schemas/ConferenceData" - description: - type: string - description: The HTML description of the event. - datasource: - type: string - description: The app or other repository type from which the event was extracted - hasTranscript: - type: boolean - description: The event has a transcript associated with it enabling features like summarization - transcriptUrl: - type: string - description: A link to the transcript of the event - classifications: - type: array - items: - $ref: "#/components/schemas/EventClassification" - generatedAttachments: - type: array - items: - $ref: "#/components/schemas/GeneratedAttachment" - SectionType: - type: string - description: Type of the section. This defines how the section should be interpreted and rendered in the digest. - x-enumDescriptions: - CHANNEL: A standard section for channel-based digests (e.g. from Slack, Teams). - MENTIONS: A dedicated section that surfaces user mentions (actionable, informative, or all). - TOPIC: A section driven by a generic topic, not tied to any specific channel or instance. - enum: - - CHANNEL - - MENTIONS - - TOPIC - x-speakeasy-enum-descriptions: - CHANNEL: A standard section for channel-based digests (e.g. from Slack, Teams). - MENTIONS: A dedicated section that surfaces user mentions (actionable, informative, or all). - TOPIC: A section driven by a generic topic, not tied to any specific channel or instance. - UpdateType: - type: string - description: Optional type classification for the update. - x-enumDescriptions: - ACTIONABLE: Updates that require user attention or action - INFORMATIVE: Updates that are purely informational - enum: - - ACTIONABLE - - INFORMATIVE - x-speakeasy-enum-descriptions: - ACTIONABLE: Updates that require user attention or action - INFORMATIVE: Updates that are purely informational - DigestUpdate: - type: object - properties: - urls: - type: array - description: List of URLs for similar updates that are grouped together and rendered as a single update. - items: - type: string - url: - type: string - description: URL link to the content or document. - title: - type: string - description: Title or headline of the update. - datasource: - type: string - description: Name or identifier of the data source (e.g., slack, confluence, etc.). - summary: - type: string - description: Brief summary or description of the update content. - type: - $ref: "#/components/schemas/UpdateType" - DigestSection: - type: object - required: - - id - - type - - updates - properties: - id: - type: string - description: Unique identifier for the digest section. - type: - $ref: "#/components/schemas/SectionType" - displayName: - type: string - description: Human-readable name for the digest section. - channelName: - type: string - description: Name of the channel (applicable for CHANNEL type sections). Used to display in the frontend. - channelType: - type: string - description: | - Channel visibility/type for CHANNEL sections. For Slack this is typically one of - PublicChannel, PrivateChannel. Omit if not applicable or unknown. - instanceId: - type: string - description: Instance identifier for the channel or workspace. Used for constructing channel URLs to display in the frontend. - url: - type: string - description: Optional URL for the digest section. Should be populated only if the section is a CHANNEL type section. - updates: - type: array - items: - $ref: "#/components/schemas/DigestUpdate" - description: List of updates within this digest section. - Digest: - type: object - properties: - podcastFileId: - type: string - description: Identifier for the podcast file generated from this digest content. - podcastDuration: - type: number - format: float - description: Duration of the podcast file in seconds. - digestDate: - type: string - description: The date this digest covers, in YYYY-MM-DD format. Represents the specific day for which the digest content and updates were compiled. This can be empty if the digest is not yet available. - example: "2025-09-03" - sections: - type: array - items: - $ref: "#/components/schemas/DigestSection" - description: Array of digest sections from which the podcast was created. - ChatSuggestion: - properties: - query: - type: string - description: The actionable chat query to run when the user selects this suggestion. - cta: - type: string - description: Button text to show for the suggestion action. - feature: - type: string - description: Targeted Glean Chat feature for the suggestion. - sourceDocumentIds: - type: array - items: - type: string - description: Document IDs that grounded the suggestion. - PromptTemplateMutableProperties: - required: - - template - properties: - name: - type: string - description: The user-given identifier for this prompt template. - template: - type: string - description: The actual template string. - applicationId: - type: string - description: The Application Id the prompt template should be created under. Empty for default assistant. - inclusions: - $ref: "#/components/schemas/ChatRestrictionFilters" - description: A list of filters which only allows the prompt template to access certain content. - addedRoles: - type: array - description: A list of added user roles for the Workflow. - items: - $ref: "#/components/schemas/UserRoleSpecification" - removedRoles: - type: array - description: A list of removed user roles for the Workflow. - items: - $ref: "#/components/schemas/UserRoleSpecification" - AttributionProperties: {} - PromptTemplate: - allOf: - - $ref: "#/components/schemas/PromptTemplateMutableProperties" - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/AttributionProperties" - - type: object - properties: - id: - type: string - description: Opaque id for this prompt template - author: - $ref: "#/components/schemas/Person" - createTimestamp: - type: integer - description: Server Unix timestamp of the creation time. - lastUpdateTimestamp: - type: integer - description: Server Unix timestamp of the last update time. - lastUpdatedBy: - $ref: "#/components/schemas/Person" - roles: - type: array - description: A list of roles for this prompt template explicitly granted. - items: - $ref: "#/components/schemas/UserRoleSpecification" - UgcType: - enum: - - AGENT_TYPE - - ANNOUNCEMENTS_TYPE - - ANSWERS_TYPE - - CHATS_TYPE - - COLLECTIONS_TYPE - - EMAIL_TYPE - - HTML_CODE_TYPE - - IMAGE_TYPE - - MESSAGE_TYPE - - PAPER_TYPE - - PRISM_VIEWS_TYPE - - PROMPT_TEMPLATES_TYPE - - PINS_TYPE - - SCRIBES_TYPE - - SHORTCUTS_TYPE - - SLIDE_TYPE - - SPREADSHEET_TYPE - - INLINE_HTML_TYPE - - PODCAST_TYPE - - WORKFLOWS_TYPE - FavoriteInfo: - type: object - properties: - ugcType: - $ref: "#/components/schemas/UgcType" - id: - type: string - description: Opaque id of the UGC. - count: - type: integer - x-includeEmpty: true - description: Number of users this object has been favorited by. - favoritedByUser: - type: boolean - x-includeEmpty: true - description: If the requesting user has favorited this object. - PromptTemplateResult: - properties: - promptTemplate: - $ref: "#/components/schemas/PromptTemplate" - trackingToken: - type: string - description: An opaque token that represents this prompt template - favoriteInfo: - $ref: "#/components/schemas/FavoriteInfo" - runCount: - $ref: "#/components/schemas/CountInfo" - description: This tracks how many times this prompt template was run. If user runs a prompt template after modifying the original one, it still counts as a run for the original template. - WorkflowMetadata: - allOf: - - type: object - properties: - author: - $ref: "#/components/schemas/Person" - createTimestamp: - type: integer - description: Server Unix timestamp of the creation time. - lastUpdateTimestamp: - type: integer - description: Server Unix timestamp of the last update time. - lastDraftSavedAt: - type: integer - description: Server Unix timestamp of the last time the draft was saved. - lastDraftSavedBy: - description: The person who last saved the draft. - $ref: "#/components/schemas/Person" - lastDraftGitAuthorId: - type: string - description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. - lastUpdatedBy: - $ref: "#/components/schemas/Person" - Workflow: - allOf: - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/WorkflowMutableProperties" - - $ref: "#/components/schemas/WorkflowMetadata" - - $ref: "#/components/schemas/AttributionProperties" - - type: object - properties: - id: - type: string - description: The ID of the workflow. - verified: - type: boolean - readOnly: true - description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. - showOrganizationAsAuthor: - type: boolean - readOnly: true - description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. - WorkflowResult: - type: object - required: - - workflow - properties: - workflow: - $ref: "#/components/schemas/Workflow" - UserActivity: - properties: - actor: - $ref: "#/components/schemas/Person" - timestamp: - type: integer - description: Unix timestamp of the activity (in seconds since epoch UTC). - action: - type: string - enum: - - ADD - - ADD_REMINDER - - CLICK - - COMMENT - - DELETE - - DISMISS - - EDIT - - MENTION - - MOVE - - OTHER - - RESTORE - - UNKNOWN - - VERIFY - - VIEW - description: The action for the activity - aggregateVisitCount: - $ref: "#/components/schemas/CountInfo" - FeedEntry: - required: - - title - properties: - entryId: - type: string - description: optional ID associated with a single feed entry (displayable_list_id) - title: - type: string - description: Title for the result. Can be document title, event title and so on. - thumbnail: - $ref: "#/components/schemas/Thumbnail" - createdBy: - $ref: "#/components/schemas/Person" - uiConfig: - allOf: - - $ref: "#/components/schemas/DisplayableListFormat" - - type: object - properties: - additionalFlags: - $ref: "#/components/schemas/DisplayableListItemUIConfig" - justificationType: - type: string - enum: - - FREQUENTLY_ACCESSED - - RECENTLY_ACCESSED - - TRENDING_DOCUMENT - - VERIFICATION_REMINDER - - SUGGESTED_DOCUMENT - - EMPTY_STATE_SUGGESTION - - FRECENCY_SCORED - - SERVER_GENERATED - - USE_CASE - - UPDATE_SINCE_LAST_VIEW - - RECENTLY_STARTED - - EVENT - - USER_MENTION - - ANNOUNCEMENT - - EXTERNAL_ANNOUNCEMENT - - POPULARITY_BASED_TRENDING - - COMPANY_RESOURCE - - EVENT_DOCUMENT_FROM_CONTENT - - EVENT_DOCUMENT_FROM_SEARCH - - VISIT_AFFINITY_SCORED - - SUGGESTED_APP - - SUGGESTED_PERSON - - ACTIVITY_HIGHLIGHT - - SAVED_SEARCH - - SUGGESTED_CHANNEL - - PEOPLE_CELEBRATIONS - - SOCIAL_LINK - - ZERO_STATE_CHAT_SUGGESTION - - ZERO_STATE_CHAT_TOOL_SUGGESTION - - ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION - - ZERO_STATE_STATIC_WORKFLOW_SUGGESTION - - ZERO_STATE_AGENT_SUGGESTION - - PERSONALIZED_CHAT_SUGGESTION - - DAILY_DIGEST - - TASK - - PLAN_MY_DAY - - END_MY_DAY - - STARTER_KIT_EXTENSION - - STARTER_KIT_ORG_CHART - - STARTER_KIT_ADD_DOC - - MEETING_RECAP - - ACTIVE_DISCUSSION - - MID_DAY_CATCH_UP - - QUERY_SUGGESTION - - COWORK_CUJ_PROMO - - WEEKLY_MEETINGS - - FOLLOW_UP - - MILESTONE_TIMELINE_CHECK - - PROJECT_DISCUSSION_DIGEST - - PROJECT_FOCUS_BLOCK - - PROJECT_NEXT_STEP - - DEMO_CARD - - OOO_PLANNER - - OOO_CATCH_UP - description: Type of the justification. - justification: - type: string - description: Server side generated justification string if server provides one. - trackingToken: - type: string - description: An opaque token that represents this particular feed entry in this particular response. To be used for /feedback reporting. - viewUrl: - type: string - description: View URL for the entry if based on links that are not documents in Glean. - document: - $ref: "#/components/schemas/Document" - event: - $ref: "#/components/schemas/CalendarEvent" - announcement: - $ref: "#/components/schemas/Announcement" - digest: - $ref: "#/components/schemas/Digest" - collection: - $ref: "#/components/schemas/Collection" - collectionItem: - $ref: "#/components/schemas/CollectionItem" - person: - $ref: "#/components/schemas/Person" - app: - $ref: "#/components/schemas/AppResult" - chatSuggestion: - $ref: "#/components/schemas/ChatSuggestion" - promptTemplate: - $ref: "#/components/schemas/PromptTemplateResult" - workflow: - $ref: "#/components/schemas/WorkflowResult" - activities: - type: array - items: - $ref: "#/components/schemas/UserActivity" - description: List of activity where each activity has user, action, timestamp. - documentVisitorCount: - $ref: "#/components/schemas/CountInfo" - FeedResult: - required: - - category - - primaryEntry - properties: - category: - type: string - enum: - - DOCUMENT_SUGGESTION - - DOCUMENT_SUGGESTION_SCENARIO - - TRENDING_DOCUMENT - - USE_CASE - - VERIFICATION_REMINDER - - EVENT - - ANNOUNCEMENT - - MENTION - - DATASOURCE_AFFINITY - - RECENT - - COMPANY_RESOURCE - - EXPERIMENTAL - - PEOPLE_CELEBRATIONS - - SOCIAL_LINK - - EXTERNAL_TASKS - - DISPLAYABLE_LIST - - ZERO_STATE_CHAT_SUGGESTION - - ZERO_STATE_CHAT_TOOL_SUGGESTION - - ZERO_STATE_WORKFLOW_CREATED_BY_ME - - ZERO_STATE_WORKFLOW_FAVORITES - - ZERO_STATE_WORKFLOW_POPULAR - - ZERO_STATE_WORKFLOW_RECENT - - ZERO_STATE_WORKFLOW_SUGGESTION - - PERSONALIZED_CHAT_SUGGESTION - - DAILY_DIGEST - - TASK - - PLAN_MY_DAY - - END_MY_DAY - - STARTER_KIT - - MID_DAY_CATCH_UP - - QUERY_SUGGESTION - - COWORK_CUJ_PROMO - - WEEKLY_MEETINGS - - FOLLOW_UP - - MILESTONE_TIMELINE_CHECK - - PROJECT_DISCUSSION_DIGEST - - PROJECT_FOCUS_BLOCK - - PROJECT_NEXT_STEP - - DEMO_CARD - - OOO_PLANNER - - OOO_CATCH_UP - description: Category of the result, one of the requested categories in incoming request. - primaryEntry: - $ref: "#/components/schemas/FeedEntry" - secondaryEntries: - type: array - items: - $ref: "#/components/schemas/FeedEntry" - description: Secondary entries for the result e.g. suggested docs for the calendar, carousel. - rank: - type: integer - description: Rank of the result. Rank is suggested by server. Client side rank may differ. - FeedResponse: - required: - - serverTimestamp - allOf: - - $ref: "#/components/schemas/BackendExperimentsContext" - - type: object - properties: - trackingToken: - type: string - description: An opaque token that represents this particular feed response. - serverTimestamp: - type: integer - description: Server unix timestamp (in seconds since epoch UTC). - results: - type: array - items: - $ref: "#/components/schemas/FeedResult" - facetResults: - type: object - additionalProperties: - type: array - items: - $ref: "#/components/schemas/FacetResult" - description: Map from category to the list of facets that can be used to filter the entry's content. - mentionsTimeWindowInHours: - type: integer - description: The time window (in hours) used for generating user mentions. - RecommendationsRequestOptions: - properties: - datasourceFilter: - type: string - description: Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. - datasourcesFilter: - type: array - items: - type: string - description: Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). All results are returned if missing. - facetFilterSets: - type: array - items: - $ref: "#/components/schemas/FacetFilterSet" - description: A list of facet filter sets that will be OR'ed together. - context: - $ref: "#/components/schemas/Document" - description: Content for either a new or unindexed document, or additional content for an indexed document, which may be used to generate recommendations. - resultProminence: - description: The types of prominence wanted in results returned. Default is any type. - type: array - items: - $ref: "#/components/schemas/SearchResultProminenceEnum" - RecommendationsRequest: - allOf: - - $ref: "#/components/schemas/ResultsRequest" - - type: object - properties: - recommendationDocumentSpec: - $ref: "#/components/schemas/DocumentSpec" - description: Retrieve recommendations for this document. Glean Document ID is preferred over URL. - requestOptions: - $ref: "#/components/schemas/RecommendationsRequestOptions" - description: Options for adjusting the request for recommendations. - RecommendationsResponse: - allOf: - - $ref: "#/components/schemas/ResultsResponse" - SortOptions: - type: object - properties: - orderBy: - type: string - enum: - - ASC - - DESC - sortBy: - type: string - ListEntitiesRequest: - type: object - properties: - filter: - type: array - items: - $ref: "#/components/schemas/FacetFilter" - sort: - description: Use EntitiesSortOrder enum for SortOptions.sortBy - type: array - items: - $ref: "#/components/schemas/SortOptions" - entityType: - type: string - default: PEOPLE - enum: - - PEOPLE - - TEAMS - - CUSTOM_ENTITIES - datasource: - type: string - description: The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES - query: - type: string - description: A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. - includeFields: - description: List of entity fields to return (that aren't returned by default) - type: array - items: + - REGEX + - TERM + - INFO_TYPE + CustomSensitiveRule: + properties: + id: + description: Identifier for the custom sensitive expression. + type: string + value: + type: string + description: The value of the custom sensitive rule. For REGEX type, this is the regex pattern; for TERM type, it is the term to match; and for INFO_TYPE type, it refers to predefined categories of sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available options. + type: + $ref: "#/components/schemas/CustomSensitiveRuleType" + likelihoodThreshold: + description: Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type. + type: string + enum: + - LIKELY + - VERY_LIKELY + - POSSIBLE + - UNLIKELY + - VERY_UNLIKELY + CustomSensitiveExpression: + properties: + id: + description: Identifier for the custom sensitive expression. + type: string + keyword: + description: The keyword to match against. + $ref: "#/components/schemas/CustomSensitiveRule" + evaluationExpression: + description: The expression to evaluate the keyword match. + type: string + SensitiveContentOptions: + description: Options for defining sensitive content within scanned documents. + properties: + sensitiveInfoTypes: + deprecated: true + description: DEPRECATED - use 'customSensitiveExpressions' instead. + type: array + items: + $ref: "#/components/schemas/SensitiveInfoType" + x-glean-deprecated: + id: 3497cb1c-f7aa-42d8-81b8-309c3adeed84 + introduced: "2026-02-05" + message: Use customSensitiveExpressions instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead" + sensitiveTerms: + deprecated: true + description: DEPRECATED - use 'customSensitiveExpressions' instead. + type: array + items: + $ref: "#/components/schemas/SensitiveExpression" + x-glean-deprecated: + id: b0713b37-472e-4c29-80ba-6f5d6f2b449c + introduced: "2026-02-05" + message: Use customSensitiveExpressions instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead" + sensitiveRegexes: + deprecated: true + description: DEPRECATED - use 'customSensitiveExpressions' instead. + type: array + items: + $ref: "#/components/schemas/SensitiveExpression" + x-glean-deprecated: + id: a26e1920-36b6-4c0f-981f-57b09a9ebce3 + introduced: "2026-02-05" + message: Use customSensitiveExpressions instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead" + customSensitiveExpressions: + description: list of custom sensitive expressions to consider as sensitive content + type: array + items: + $ref: "#/components/schemas/CustomSensitiveExpression" + DlpPersonMetadata: + properties: + firstName: + type: string + description: The first name of the person + email: + type: string + description: The user's primary email address + DlpPerson: + description: Details about the person who created this report/policy. + required: + - name + - obfuscatedId + properties: + name: + type: string + description: The display name. + obfuscatedId: + type: string + description: An opaque identifier that can be used to request metadata for a Person. + metadata: + $ref: "#/components/schemas/DlpPersonMetadata" + AllowlistOptions: + description: Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. + properties: + terms: + type: array + description: list of words and phrases to consider as whitelisted content + items: + type: string + regexes: + type: array + description: list of regular expressions whose matches are considered whitelisted content + items: + type: string + DlpConfig: + description: Detailed configuration of what documents and sensitive content will be scanned. + properties: + version: + description: Synonymous with report/policy id. + type: integer + format: int64 + sensitiveInfoTypes: + deprecated: true + description: DEPRECATED - use `sensitiveContentOptions` instead. + type: array + items: + $ref: "#/components/schemas/SensitiveInfoType" + x-glean-deprecated: + id: 60d6d182-e9d0-448d-af75-137f68bbdcbf + introduced: "2026-02-05" + message: Use sensitiveContentOptions instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead" + inputOptions: + description: Options for documents to include or exclude in a report + $ref: "#/components/schemas/InputOptions" + externalSharingOptions: + deprecated: true + description: DEPRECATED - use `broadSharingOptions` instead. + $ref: "#/components/schemas/ExternalSharingOptions" + x-glean-deprecated: + id: 6484ec17-a133-4176-b2ce-28e25b0e9065 + introduced: "2026-02-05" + message: Use broadSharingOptions instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead" + broadSharingOptions: + description: Options for defining documents to scan for sensitive content. + $ref: "#/components/schemas/SharingOptions" + sensitiveContentOptions: + description: Options for defining sensitive content within scanned documents. + $ref: "#/components/schemas/SensitiveContentOptions" + reportName: + type: string + frequency: + description: Interval between scans. + type: string + createdBy: + description: Person who created this report/policy. + $ref: "#/components/schemas/DlpPerson" + createdAt: + description: Timestamp at which this configuration was created. + type: string + format: iso-date-time + redactQuote: + description: redact quote in findings of the report + type: boolean + autoHideDocs: + description: auto hide documents with findings in the report + type: boolean + allowlistOptions: + description: Options for defining whitelisting content within scanned documents + $ref: "#/components/schemas/AllowlistOptions" + DlpFrequency: type: string + description: Interval between scans. DAILY is deprecated. + x-include-enum-class-prefix: true enum: - - PEOPLE - - TEAMS - - PEOPLE_DISTANCE - - PERMISSIONS - - FACETS - - INVITE_INFO - - LAST_EXTENSION_USE - - MANAGEMENT_DETAILS - - UNPROCESSED_TEAMS - pageSize: - type: integer - example: 100 - description: Hint to the server about how many results to send back. Server may return less. - cursor: - type: string - description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. - source: - type: string - description: A string denoting the search surface from which the endpoint is called. - requestType: - type: string - default: STANDARD - description: The type of request being made. - x-enumDescriptions: - STANDARD: Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities. - FULL_DIRECTORY: Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations. - enum: - - STANDARD - - FULL_DIRECTORY - x-speakeasy-enum-descriptions: - STANDARD: Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities. - FULL_DIRECTORY: Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations. - EntitiesSortOrder: - type: string - description: Different ways of sorting entities - enum: - - ENTITY_NAME - - FIRST_NAME - - LAST_NAME - - ORG_SIZE_COUNT - - START_DATE - - TEAM_SIZE - - RELEVANCE - ListEntitiesResponse: - type: object - properties: - results: - type: array - items: - $ref: "#/components/schemas/Person" - teamResults: - type: array - items: - $ref: "#/components/schemas/Team" - customEntityResults: - type: array - items: - $ref: "#/components/schemas/CustomEntity" - facetResults: - type: array - items: - $ref: "#/components/schemas/FacetResult" - cursor: - type: string - description: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. - totalCount: - type: integer - description: The total number of entities available - hasMoreResults: - type: boolean - description: Whether or not more entities can be fetched. - sortOptions: - type: array - description: Sort options from EntitiesSortOrder supported for this response. Default is empty list. - items: - $ref: "#/components/schemas/EntitiesSortOrder" - customFacetNames: - type: array - description: list of Person attributes that are custom setup by deployment - items: - type: string - PeopleRequest: - type: object - properties: - timezoneOffset: - type: integer - description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. - obfuscatedIds: - type: array - items: - type: string - description: The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. - emailIds: - type: array - items: - type: string - description: The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. - includeFields: - description: List of PersonMetadata fields to return (that aren't returned by default) - type: array - items: + - ONCE + - DAILY + - WEEKLY + - CONTINUOUS + - NONE + DlpReportStatus: type: string + description: The status of the policy/report. Only ACTIVE status will be picked for scans. + x-include-enum-class-prefix: true enum: - - BADGES - - BUSY_EVENTS - - DOCUMENT_ACTIVITY - - INVITE_INFO - - PEOPLE_DISTANCE - - PERMISSIONS - - PEOPLE_DETAILS - - MANAGEMENT_DETAILS - - PEOPLE_PROFILE_SETTINGS - - PEOPLE_WITHOUT_MANAGER - includeTypes: - description: The types of people entities to include in the response in addition to those returned by default. - x-enumDescriptions: - PEOPLE_WITHOUT_MANAGER: Returns all people without a manager apart from the requested IDs. - INVALID_ENTITIES: Includes invalid entities in the response if any of the requested IDs are invalid. - type: array - items: + - ACTIVE + - INACTIVE + - CANCELLED + - NONE + DlpReport: + description: Full policy information that will be used for scans. + properties: + id: + type: string + name: + type: string + config: + description: All details of the policy that is needed for a scan. + $ref: "#/components/schemas/DlpConfig" + frequency: + description: The interval between scans. + $ref: "#/components/schemas/DlpFrequency" + status: + description: The status of the policy. + $ref: "#/components/schemas/DlpReportStatus" + createdBy: + description: Person who created this report. + $ref: "#/components/schemas/DlpPerson" + createdAt: + description: Timestamp at which the policy was created. + type: string + format: iso-date-time + lastUpdatedAt: + description: Timestamp at which the policy was last updated. + type: string + format: iso-date-time + autoHideDocs: + description: Auto hide documents with findings in the policy. + type: boolean + lastScanStatus: + type: string + enum: + - PENDING + - SUCCESS + - FAILURE + - CANCELLED + - CANCELLING + - ACTIVE + lastScanStartTime: + description: The timestamp at which the report's last run/scan began. + type: string + format: iso-date-time + updatedBy: + description: Person who last updated this report. + $ref: "#/components/schemas/DlpPerson" + GetDlpReportResponse: + properties: + report: + $ref: "#/components/schemas/DlpReport" + UpdateDlpReportRequest: + properties: + config: + description: The new configuration the policy will follow if provided. + $ref: "#/components/schemas/DlpConfig" + frequency: + description: The new frequency the policy will follow if provided. + $ref: "#/components/schemas/DlpFrequency" + status: + description: The new status the policy will be updated to if provided. + $ref: "#/components/schemas/DlpReportStatus" + autoHideDocs: + description: The new autoHideDoc boolean the policy will be updated to if provided. + type: boolean + reportName: + description: The new name of the policy if provided. + type: string + DlpSimpleResult: type: string enum: - - PEOPLE_WITHOUT_MANAGER - - INVALID_ENTITIES - x-speakeasy-enum-descriptions: - PEOPLE_WITHOUT_MANAGER: Returns all people without a manager apart from the requested IDs. - INVALID_ENTITIES: Includes invalid entities in the response if any of the requested IDs are invalid. - source: - type: string - description: A string denoting the search surface from which the endpoint is called. - example: - obfuscatedIds: - - abc123 - - abc456 - PeopleResponse: - properties: - results: - type: array - items: - $ref: "#/components/schemas/Person" - description: A Person for each ID in the request, each with PersonMetadata populated. - relatedDocuments: - type: array - items: - $ref: "#/components/schemas/RelatedDocuments" - description: A list of documents related to this people response. This is only included if DOCUMENT_ACTIVITY is requested and only 1 person is included in the request. - errors: - type: array - items: - type: string - description: A list of IDs that could not be found. - CreateShortcutRequest: - required: - - data - properties: - data: - $ref: "#/components/schemas/ShortcutMutableProperties" - ShortcutError: - properties: - errorType: - type: string - enum: - - NO_PERMISSION - - INVALID_ID - - EXISTING_SHORTCUT - - INVALID_CHARS - CreateShortcutResponse: - properties: - shortcut: - $ref: "#/components/schemas/Shortcut" - error: - $ref: "#/components/schemas/ShortcutError" - DeleteShortcutRequest: - allOf: - - $ref: "#/components/schemas/UserGeneratedContentId" - - type: object - required: - - id - GetShortcutRequest: - oneOf: - - $ref: "#/components/schemas/UserGeneratedContentId" - - type: object - required: - - alias - properties: - alias: - type: string - description: The alias for the shortcut, including any arguments for variable shortcuts. - GetShortcutResponse: - properties: - shortcut: - $ref: "#/components/schemas/Shortcut" - description: Shortcut given the input alias with any provided arguments substituted into the destination URL. - error: - $ref: "#/components/schemas/ShortcutError" - ListShortcutsPaginatedRequest: - required: - - pageSize - properties: - includeFields: - description: Array of fields/data to be included in response that are not included by default - type: array - items: + - SUCCESS + - FAILURE + UpdateDlpReportResponse: + properties: + result: + $ref: "#/components/schemas/DlpSimpleResult" + ListDlpReportsResponse: + properties: + reports: + type: array + items: + $ref: "#/components/schemas/DlpReport" + CreateDlpReportRequest: + properties: + name: + description: Name of the policy being created. + type: string + config: + description: Details on the configuration used in the scans. + $ref: "#/components/schemas/DlpConfig" + frequency: + description: Interval between scans. + $ref: "#/components/schemas/DlpFrequency" + autoHideDocs: + description: Controls whether the policy should hide documents with violations. + type: boolean + CreateDlpReportResponse: + properties: + report: + $ref: "#/components/schemas/DlpReport" + UpdateDlpConfigRequest: + properties: + config: + $ref: "#/components/schemas/DlpConfig" + frequency: + description: Only "ONCE" is supported for reports. + type: string + UpdateDlpConfigResponse: + properties: + result: + $ref: "#/components/schemas/DlpSimpleResult" + reportId: + description: The id of the report that was just created and run. + type: string + ReportStatusResponse: + properties: + status: + type: string + enum: + - PENDING + - SUCCESS + - FAILURE + - CANCELLED + - CANCELLING + - ACTIVE + startTime: + description: The timestamp at which the report's run/scan began. + type: string + format: iso-date-time + DocumentVisibilityOverride: + properties: + docId: + type: string + override: + description: The visibility-override state of the document. + type: string + enum: + - NONE + - HIDE_FROM_ALL + - HIDE_FROM_GROUPS + - HIDE_FROM_ALL_EXCEPT_OWNER + GetDocumentVisibilityOverridesResponse: + properties: + visibilityOverrides: + type: array + items: + $ref: "#/components/schemas/DocumentVisibilityOverride" + UpdateDocumentVisibilityOverridesRequest: + properties: + visibilityOverrides: + type: array + items: + $ref: "#/components/schemas/DocumentVisibilityOverride" + DocumentVisibilityUpdateResult: + allOf: + - $ref: "#/components/schemas/DocumentVisibilityOverride" + - type: object + properties: + success: + description: Whether this document was successfully set to its desired visibility state. + type: boolean + UpdateDocumentVisibilityOverridesResponse: + properties: + results: + description: The documents and whether their visibility was successfully updated. + type: array + items: + $ref: "#/components/schemas/DocumentVisibilityUpdateResult" + DlpSeverity: type: string + description: Severity levels for DLP findings and analyses. + x-include-enum-class-prefix: true enum: - - FACETS - - PEOPLE_DETAILS - pageSize: - type: integer - example: 10 - cursor: - type: string - description: A token specifying the position in the overall results to start at. Received from the endpoint and iterated back. Currently being used as page no (as we implement offset pagination) - filters: - type: array - items: - $ref: "#/components/schemas/FacetFilter" - description: A list of filters for the query. An AND is assumed between different filters. We support filters on Go Link name, author, department and type. - sort: - $ref: "#/components/schemas/SortOptions" - description: Specifies fieldname to sort on and order (ASC|DESC) to sort in - query: - type: string - description: Search query that should be a substring in atleast one of the fields (alias , inputAlias, destinationUrl, description). Empty query does not filter shortcuts. - ShortcutsPaginationMetadata: - properties: - cursor: - type: string - description: Cursor indicates the start of the next page of results - hasNextPage: - type: boolean - totalItemCount: - type: integer - ListShortcutsPaginatedResponse: - required: - - shortcuts - - meta - properties: - shortcuts: - type: array - items: - $ref: "#/components/schemas/Shortcut" - description: List of all shortcuts accessible to the user - facetResults: - type: array - items: - $ref: "#/components/schemas/FacetResult" - meta: - $ref: "#/components/schemas/ShortcutsPaginationMetadata" - description: Contains metadata like total item count and whether next page exists - UpdateShortcutRequest: - allOf: - - $ref: "#/components/schemas/UserGeneratedContentId" - - $ref: "#/components/schemas/ShortcutMutableProperties" - - type: object - required: - - id - UpdateShortcutResponse: - properties: - shortcut: - $ref: "#/components/schemas/Shortcut" - error: - $ref: "#/components/schemas/ShortcutError" - SummarizeRequest: - description: Summary of the document - required: - - documentSpecs - properties: - timestamp: - type: string - description: The ISO 8601 timestamp associated with the client request. - format: date-time - query: - type: string - description: Optional query that the summary should be about - preferredSummaryLength: - type: integer - description: Optional length of summary output. If not given, defaults to 500 chars. - documentSpecs: - type: array - items: - $ref: "#/components/schemas/DocumentSpec" - description: Specifications of documents to summarize - trackingToken: - type: string - description: An opaque token that represents this particular result. To be used for /feedback reporting. - Summary: - properties: - text: - type: string - followUpPrompts: - type: array - items: - type: string - description: Follow-up prompts based on the summarized doc - SummarizeResponse: - properties: - error: - type: object - properties: - message: - type: string - summary: - $ref: "#/components/schemas/Summary" - trackingToken: - type: string - description: An opaque token that represents this summary in this particular query. To be used for /feedback reporting. - ReminderRequest: - required: - - documentId - properties: - documentId: - type: string - description: The document which the verification is for new reminders and/or update. - assignee: - type: string - description: The obfuscated id of the person this verification is assigned to. - remindInDays: - type: integer - description: Reminder for the next verifications in terms of days. For deletion, this will be omitted. - reason: - type: string - description: An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). - VerificationFeed: - properties: - documents: - type: array - items: - $ref: "#/components/schemas/Verification" - description: List of document infos that include verification related information for them. - VerifyRequest: - required: - - documentId - properties: - documentId: - type: string - description: The document which is verified. - action: - type: string - enum: - - VERIFY - - DEPRECATE - - UNVERIFY - description: The verification action requested. - ToolParameter: - type: object - properties: - type: - type: string - description: Parameter type (string, number, boolean, object, array) - enum: - - string - - number - - boolean - - object - - array - name: - type: string - description: The name of the parameter - description: - type: string - description: The description of the parameter - isRequired: - type: boolean - description: Whether the parameter is required - possibleValues: - type: array - description: The possible values for the parameter. Can contain only primitive values or arrays of primitive values. - items: - type: string - items: - type: object - description: When type is 'array', this describes the structure of the item in the array. - $ref: "#/components/schemas/ToolParameter" - properties: - type: object - description: When type is 'object', this describes the structure of the object. - additionalProperties: - $ref: "#/components/schemas/ToolParameter" - Tool: - type: object - properties: - type: - type: string - description: Type of tool (READ, WRITE) - enum: - - READ - - WRITE - name: - type: string - description: Unique identifier for the tool - displayName: - type: string - description: Human-readable name - description: - type: string - description: LLM friendly description of the tool - parameters: - type: object - description: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. - additionalProperties: - $ref: "#/components/schemas/ToolParameter" - ToolsListResponse: - type: object - properties: - tools: - type: array - items: - $ref: "#/components/schemas/Tool" - ToolsCallParameter: - type: object - required: - - name - - value - properties: - name: - type: string - description: The name of the parameter - value: - type: string - description: The value of the parameter (for primitive types) - items: - type: array - description: The value of the parameter (for array types) - items: - $ref: "#/components/schemas/ToolsCallParameter" - properties: - type: object - description: The value of the parameter (for object types) - additionalProperties: - $ref: "#/components/schemas/ToolsCallParameter" - ToolsCallRequest: - type: object - required: - - name - - parameters - properties: - name: - type: string - description: Required name of the tool to execute - parameters: - type: object - description: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. - additionalProperties: - $ref: "#/components/schemas/ToolsCallParameter" - ToolsCallResponse: - type: object - properties: - rawResponse: - additionalProperties: true - type: object - description: The raw response from the tool - error: - type: string - description: The error message if applicable - ActionAuthType: - type: string - description: | - Authentication mechanism used by an action pack. - - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. - - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. - - `AUTH_NONE`: Action pack requires no authentication. - enum: - - AUTH_USER_OAUTH - - AUTH_ADMIN - - AUTH_NONE - ActionPackAuthStatus: - type: object - required: - - authenticated - - authType - properties: - authenticated: - type: boolean - description: Whether the calling user is already authenticated to the tool backing the action pack. - authType: - $ref: "#/components/schemas/ActionAuthType" - ActionPackAuthStatusResponse: - type: object - required: - - actionPack - properties: - actionPack: - $ref: "#/components/schemas/ActionPackAuthStatus" - description: | - Action-pack-scoped authentication status. Wrapped under `actionPack` so the response - shape clearly conveys that the status applies to the whole pack and leaves room to add - sibling fields (e.g. per-action status) later without a breaking change. - AuthorizeActionPackRequest: - type: object - required: - - returnUrl - properties: - returnUrl: - type: string - description: | - URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth - callback completes. Must be present in the tenant's return URL allowlist. - AuthorizeActionPackResponse: - type: object - required: - - redirectUrl - properties: - redirectUrl: - type: string - description: | - URL that the customer UI should navigate the end user to in order to begin the third-party OAuth flow. - After the user consents, control returns to `returnUrl` from the request. - IndexDocumentRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - document: - $ref: '#/components/schemas/DocumentDefinition' - description: Document being added/updated - required: - - document - description: Describes the request body of the /indexdocument API call - IndexDocumentsRequest: - type: object - properties: - uploadId: - type: string - description: Optional id parameter to identify and track a batch of documents. - datasource: - type: string - description: Datasource of the documents - documents: - type: array - items: - $ref: '#/components/schemas/DocumentDefinition' - description: Batch of documents being added/updated - required: - - documents - - datasource - description: Describes the request body of the /indexdocuments API call - UpdatePermissionsRequest: - type: object - properties: - datasource: - type: string - objectType: - type: string - description: The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ - id: - type: string - description: The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. - viewURL: - type: string - description: | - The permalink for viewing the document. **Note: viewURL is a required field if id was not set when uploading the document.**' - permissions: - $ref: '#/components/schemas/DocumentPermissionsDefinition' - description: The permissions that define who can view this document in the search results. Please refer to [this](https://developers.glean.com/indexing/documents/permissions) for more details. - required: - - permissions - - datasource - description: Describes the request body of the /updatepermissions API call - GetDocumentCountRequest: - type: object - properties: - datasource: - type: string - description: Datasource name for which document count is needed. - required: - - datasource - description: Describes the request body of the /getdocumentcount API call - GetDocumentCountResponse: - type: object - properties: - documentCount: - type: integer - description: Number of documents corresponding to the specified custom datasource. - description: Describes the response body of the /getdocumentcount API call - GetDocumentStatusRequest: - type: object - properties: - datasource: - type: string - description: Datasource to get fetch document status for - objectType: - type: string - description: Object type of the document to get the status for - docId: - type: string - description: Glean Document ID within the datasource to get the status for. - required: - - datasource - - objectType - - docId - description: Describes the request body for /getdocumentstatus API call - GetDocumentStatusResponse: - type: object - properties: - uploadStatus: - type: string - description: Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN - lastUploadedAt: - type: integer - format: int64 - description: Time of last successful upload, in epoch seconds - indexingStatus: - type: string - description: Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN - lastIndexedAt: - type: integer - format: int64 - description: Time of last successful indexing, in epoch seconds - description: Describes the response body of the /getdocumentstatus API call - BulkIndexRequest: - type: object - properties: - uploadId: - type: string - description: Unique id that must be used for this bulk upload instance - isFirstPage: - type: boolean - description: true if this is the first page of the upload. Defaults to false - isLastPage: - type: boolean - description: true if this is the last page of the upload. Defaults to false - forceRestartUpload: - type: boolean - description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true - required: - - uploadId - description: Describes the request body of a bulk upload API call - BulkIndexTeamsRequest: - type: object - allOf: - - $ref: '#/components/schemas/BulkIndexRequest' - - type: object - properties: - teams: - type: array - items: - $ref: '#/components/schemas/TeamInfoDefinition' - description: Batch of team information - required: - - teams - description: Describes the request body of the /bulkindexteams API call - BulkIndexEmployeesRequest: - type: object - allOf: - - $ref: '#/components/schemas/BulkIndexRequest' - - type: object - properties: - employees: - type: array - items: - $ref: '#/components/schemas/EmployeeInfoDefinition' - description: Batch of employee information - disableStaleDataDeletionCheck: - type: boolean - description: True if older employee data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than 20%. This must only be set when `isLastPage = true` - required: - - employees - description: Describes the request body of the /bulkindexemployees API call - BulkIndexDocumentsRequest: - type: object - allOf: - - $ref: '#/components/schemas/BulkIndexRequest' - - type: object - properties: - datasource: - type: string - description: Datasource of the documents - documents: - type: array - items: - $ref: '#/components/schemas/DocumentDefinition' - description: Batch of documents for the datasource - disableStaleDocumentDeletionCheck: - type: boolean - description: True if older documents need to be force deleted after the upload completes. Defaults to older documents being deleted asynchronously. This must only be set when `isLastPage = true` - required: - - datasource - - documents - description: Describes the request body of the /bulkindexdocuments API call - ProcessAllDocumentsRequest: - type: object - properties: - datasource: - type: string - description: If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed. - description: Describes the request body of the /processalldocuments API call - DeleteDocumentRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - datasource: - type: string - description: datasource of the document - objectType: - type: string - description: object type of the document - id: - type: string - description: The id of the document - required: - - datasource - - id - - objectType - description: Describes the request body of the /deletedocument API call - IndexUserRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - datasource: - type: string - description: The datasource for which the user is added - user: - $ref: '#/components/schemas/DatasourceUserDefinition' - description: The user to be added or updated - required: - - datasource - - user - description: Describes the request body of the /indexuser API call - GetUserCountRequest: - type: object - properties: - datasource: - type: string - description: Datasource name for which user count is needed. - required: - - datasource - description: Describes the request body of the /getusercount API call - GetUserCountResponse: - type: object - properties: - userCount: - type: integer - description: Number of users corresponding to the specified custom datasource. - description: Describes the response body of the /getusercount API call - BulkIndexUsersRequest: - type: object - properties: - uploadId: - type: string - description: Unique id that must be used for this instance of datasource users upload - isFirstPage: - type: boolean - description: true if this is the first page of the upload. Defaults to false - isLastPage: - type: boolean - description: true if this is the last page of the upload. Defaults to false - forceRestartUpload: - type: boolean - description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true - datasource: - type: string - description: datasource of the users - users: - type: array - items: - $ref: '#/components/schemas/DatasourceUserDefinition' - description: batch of users for the datasource - disableStaleDataDeletionCheck: - type: boolean - description: True if older user data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` - required: - - uploadId - - datasource - - users - description: Describes the request body for the /bulkindexusers API call - GreenlistUsersRequest: - type: object - properties: - datasource: - type: string - description: Datasource which needs to be made visible to users specified in the `emails` field. - emails: - type: array - items: - type: string - format: email - description: The emails of the beta users - required: - - datasource - - emails - description: Describes the request body of the /betausers API call - DatasourceUserDefinition: - type: object - properties: - email: - type: string - userId: - type: string - description: To be supplied if the user id in the datasource is not the email - name: - type: string - isActive: - type: boolean - description: set to false if the user is a former employee or a bot - required: - - email - - name - description: describes a user in the datasource - IndexGroupRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - datasource: - type: string - description: The datasource for which the group is added - group: - $ref: '#/components/schemas/DatasourceGroupDefinition' - description: The group to be added or updated - required: - - datasource - - group - description: Describes the request body of the /indexgroup API call - BulkIndexGroupsRequest: - type: object - properties: - uploadId: - type: string - description: Unique id that must be used for this instance of datasource groups upload - isFirstPage: - type: boolean - description: true if this is the first page of the upload. Defaults to false - isLastPage: - type: boolean - description: true if this is the last page of the upload. Defaults to false - forceRestartUpload: - type: boolean - description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true - datasource: - type: string - description: datasource of the groups - groups: - type: array - items: - $ref: '#/components/schemas/DatasourceGroupDefinition' - description: batch of groups for the datasource - disableStaleDataDeletionCheck: - type: boolean - description: True if older group data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` - required: - - uploadId - - datasource - - groups - description: Describes the request body for the /bulkindexgroups API call - DatasourceGroupDefinition: - type: object - properties: - name: - type: string - description: name of the group. Should be unique among all groups for the datasource, and cannot have spaces. - required: - - name - description: describes a group in the datasource - IndexMembershipRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - datasource: - type: string - description: The datasource for which the membership is added - membership: - $ref: '#/components/schemas/DatasourceMembershipDefinition' - description: The membership to be added or updated - required: - - datasource - - membership - description: Describes the request body of the /indexmembership API call - BulkIndexMembershipsRequest: - type: object - properties: - uploadId: - type: string - description: Unique id that must be used for this instance of datasource group memberships upload - isFirstPage: - type: boolean - description: true if this is the first page of the upload. Defaults to false - isLastPage: - type: boolean - description: true if this is the last page of the upload. Defaults to false - forceRestartUpload: - type: boolean - description: Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true - datasource: - type: string - description: datasource of the memberships - group: - type: string - description: group who's memberships are specified - memberships: - type: array - items: - $ref: '#/components/schemas/DatasourceBulkMembershipDefinition' - description: batch of memberships for the group - required: - - uploadId - - datasource - - memberships - description: Describes the request body for the /bulkindexmemberships API call - ProcessAllMembershipsRequest: - type: object - properties: - datasource: - type: string - description: If provided, process group memberships only for this custom datasource. Otherwise all uploaded memberships are processed. - description: Describes the request body of the /processallmemberships API call - DatasourceMembershipDefinition: - type: object - properties: - groupName: - type: string - description: The group for which the membership is specified - memberUserId: - type: string - description: If the member is a user, then the email or datasource id for the user - memberGroupName: - type: string - description: If the member is a group, then the name of the member group - required: - - groupName - description: describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. - DatasourceBulkMembershipDefinition: - type: object - properties: - memberUserId: - type: string - description: If the member is a user, then the email or datasource id for the user - memberGroupName: - type: string - description: If the member is a group, then the name of the member group - description: describes the membership row of a group in the bulk uploaded. Only one of memberUserId and memberGroupName can be specified. - DeleteUserRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - datasource: - type: string - description: The datasource for which the user is removed - email: - type: string - description: The email of the user to be deleted - required: - - datasource - - email - description: Describes the request body of the /deleteuser API call - DeleteGroupRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - datasource: - type: string - description: The datasource for which the group is removed - groupName: - type: string - description: the name of the group to be deleted - required: - - datasource - - groupName - description: Describes the request body of the /deletegroup API call - DeleteMembershipRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - datasource: - type: string - description: The datasource for which the membership is removed - membership: - $ref: '#/components/schemas/DatasourceMembershipDefinition' - description: the name of the membership to be deleted - required: - - datasource - - membership - description: Describes the request body of the /deletemembership API call - DeleteEmployeeRequest: - type: object - properties: - version: - type: integer - format: int64 - description: Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. - employeeEmail: - type: string - description: The deleted employee's email - required: - - employeeEmail - description: Describes the request body of the /deleteemployee API call - DeleteTeamRequest: - type: object - properties: - id: - type: string - description: The deleted team's id - required: - - id - description: Describes the request body of the /deleteteam API call - DocumentDefinition: - type: object - properties: - title: - type: string - description: Document title, in plain text, if present. If not present, the title would be attempted to be extracted from the content. - filename: - type: string - description: Source filename, in plain text, for the document. May be used as a fallback title for the document, if the title is not provided and cannot be extracted from the content. Populate this if there is no explicit title for the document and the content is sourced from a file. - container: - type: string - description: The container name for the content (Folder for example for file content). - containerDatasourceId: - type: string - description: This represents the datasource sepcific id of the container. - containerObjectType: - type: string - description: This represents the object type of the container. It cannot have spaces or _ - datasource: - type: string - objectType: - type: string - description: The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ - viewURL: - type: string - description: | - The permalink for viewing the document. **Note: viewURL is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false).**' - id: - type: string - description: | - The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. Note: id is a required field for datasources created after 1st March 2025 - summary: - $ref: '#/components/schemas/ContentDefinition' - body: - $ref: '#/components/schemas/ContentDefinition' - author: - $ref: '#/components/schemas/UserReferenceDefinition' - owner: - $ref: '#/components/schemas/UserReferenceDefinition' - description: The current owner of the document, if not the author. - permissions: - $ref: '#/components/schemas/DocumentPermissionsDefinition' - description: The permissions that define who can view this document in the search results. Please refer to [this](https://developers.glean.com/indexing/documents/permissions) for more details. - createdAt: - type: integer - format: int64 - description: The creation time, in epoch seconds. - updatedAt: - type: integer - format: int64 - description: The last update time, in epoch seconds. - updatedBy: - $ref: '#/components/schemas/UserReferenceDefinition' - tags: - type: array - items: - type: string - description: Labels associated with the document. - interactions: - $ref: '#/components/schemas/DocumentInteractionsDefinition' - status: - type: string - additionalUrls: - type: array - items: - type: string - description: Additional variations of the URL that this document points to. - nativeAppUrl: - type: string - description: A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://channel/message). - comments: - type: array - items: - $ref: '#/components/schemas/CommentDefinition' - description: Comments associated with the document. - customProperties: - type: array - items: - $ref: '#/components/schemas/CustomProperty' - description: Additional metadata properties of the document. These can surface as [facets and operators](https://developers.glean.com/indexing/datasource/custom-properties/operators_and_facets). - required: - - datasource - description: Indexable document structure - CommentDefinition: - type: object - properties: - id: - type: string - description: The document specific id for the comment. This field is case insensitive and should not be more than 200 characters in length. - author: - $ref: '#/components/schemas/UserReferenceDefinition' - description: The author of the comment. - content: - $ref: '#/components/schemas/ContentDefinition' - description: The content of the comment. - createdAt: - type: integer - format: int64 - description: The creation time, in epoch seconds. - updatedAt: - type: integer - format: int64 - description: The last updated time, in epoch seconds. - updatedBy: - $ref: '#/components/schemas/UserReferenceDefinition' - description: The user who last updated the comment. - required: - - id - description: Describes a comment on a document - ContentDefinition: - type: object - properties: - mimeType: - type: string - textContent: - type: string - description: text content. Only one of textContent or binary content can be specified - binaryContent: - type: string - description: base64 encoded binary content. Only one of textContent or binary content can be specified - required: - - mimeType - description: Describes text content or base64 encoded binary content - UserReferenceDefinition: - type: object - properties: - email: - type: string - datasourceUserId: - type: string - description: some datasources refer to the user by the datasource user id in the document - name: - type: string - description: Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. - PermissionsGroupIntersectionDefinition: - type: object - properties: - requiredGroups: - type: array - items: - type: string - description: describes a list of groups that are all required in a permissions constraint - DocumentPermissionsDefinition: - type: object - properties: - allowedUsers: - type: array - items: - $ref: '#/components/schemas/UserReferenceDefinition' - description: List of users who can view the document - allowedGroups: - type: array - items: - type: string - description: List of groups that can view the document - allowedGroupIntersections: - type: array - items: - $ref: '#/components/schemas/PermissionsGroupIntersectionDefinition' - description: List of allowed group intersections. This describes a permissions constraint of the form ((GroupA AND GroupB AND GroupC) OR (GroupX AND GroupY) OR ... - allowAnonymousAccess: - type: boolean - description: If true, then any Glean user can view the document - allowAllDatasourceUsersAccess: - type: boolean - description: If true, then any user who has an account in the datasource can view the document. - description: describes the access control details of the document - DocumentInteractionsDefinition: - type: object - properties: - numViews: - type: integer - numLikes: - type: integer - numComments: - type: integer - description: describes the interactions on the document - CheckDocumentAccessRequest: - type: object - properties: - datasource: - type: string - description: Datasource of document to check access for. - objectType: - type: string - description: Object type of document to check access for. - docId: - type: string - description: Glean Document ID to check access for. - userEmail: - type: string - description: Email of user to check access for. - required: - - datasource - - objectType - - docId - - userEmail - description: Describes the request body of the /checkdocumentaccess API call - CheckDocumentAccessResponse: - type: object - properties: - hasAccess: - type: boolean - description: If true, user has access to document for search - description: Describes the response body of the /checkdocumentaccess API call - CustomProperty: - type: object - properties: - name: - type: string - value: - description: Must be a string, a number (for INT properties), or an array of strings. A boolean is not valid. When OpenAPI Generator supports `oneOf`, we can semantically enforce this. - description: Describes the custom properties of the object. - DatasourceConfig: - $ref: '#/components/schemas/SharedDatasourceConfig' - GetDatasourceConfigRequest: - type: object - properties: - datasource: - type: string - description: Datasource name for which config is needed. - required: - - datasource - description: Describes the request body of the /getdatasourceconfig API call - DatasourceConfigList: - properties: - datasourceConfig: - type: array - items: - $ref: '#/components/schemas/SharedDatasourceConfig' - description: Datasource configuration. - required: - - datasourceConfig - description: List of datasource configurations. - RotateTokenResponse: - properties: - rawSecret: - type: string - description: New raw secret - createdAt: - type: integer - format: int64 - description: Unix timestamp in seconds when the new secret value is assigned to the token. The token needs to be rotated before `rotationPeriodMinutes` past the createdAt timestamp otherwise it would be rendered unusable. - rotationPeriodMinutes: - type: integer - format: int64 - description: Refers to the time period in minutes before which this token needs to be rotated. It is required to rotate the token within the specified `rotationPeriodMinutes` after each `/rotatetoken` call, otherwise the tokens would expire. Note that the token would still expire at `expiresAt` timestamp provided during token creation even if the token is being regularly rotated. `rotationPeriodMinutes` property is inherited from the parent token being rotated - description: Describes the response body of the /rotatetoken API call - IndexEmployeeRequest: - type: object - properties: - employee: - $ref: '#/components/schemas/EmployeeInfoDefinition' - description: Info about the employee - version: - type: integer - format: int64 - description: Version number for the employee object. If absent or 0 then no version checks are done - required: - - employee - description: Info about an employee and optional version for that info - IndexEmployeeListRequest: - type: object - properties: - employees: - type: array - items: - $ref: '#/components/schemas/IndexEmployeeRequest' - description: List of employee info and version. - description: Describes the request body of the /indexemployeelist API call - SocialNetworkDefinition: - type: object - properties: - name: - type: string - description: Possible values are "twitter", "linkedin". - profileName: - type: string - description: Human-readable profile name. - profileUrl: - type: string - description: Link to profile. - description: Employee's social network profile - AdditionalFieldDefinition: - type: object - properties: - key: - type: string - description: Key to reference this field, e.g. "languages". Note that the key should be all lowercase alphabetic characters with no numbers, spaces, hyphens or underscores. - value: - type: array - items: - type: object - description: Either a string or HypertextField. When OpenAPI Generator supports oneOf, we can semantically enforce this in the docs. - description: | - List of type string or HypertextField. - - HypertextField is defined as - ``` - { - anchor: string, // Anchor text for the hypertext field. - hyperlink: string, // URL for the hypertext field. - } - ``` - Example: ```{"anchor":"Glean","hyperlink":"https://glean.com"}``` - - When OpenAPI Generator supports oneOf, we will semantically enforce this in the docs. - - **Note**: If using the Python SDK to pass in a list of strings, the value may need to be a list of dictionaries. In that case, the key in that dictionary will be ignored. - Example: ```"languages": [{"lang":"English","lang":"Spanish",...}]```. In this case, the key "lang" will be ignored and can even be passed in as an empty string. - description: Additional information about the employee or team. - HypertextField: - type: object - properties: - anchor: - type: string - description: Anchor text for the hypertext field. - hyperlink: - type: string - description: URL for the hypertext field. - EmployeeInfoDefinition: - type: object - properties: - email: - type: string - description: The employee's email - firstName: - type: string - description: | - The first name of the employee. **Note**: The value cannot be empty - lastName: - type: string - description: | - The last name of the employee. **Note**: The value cannot be empty - preferredName: - type: string - description: The preferred name or nickname of the employee - id: - type: string - description: | - **[Advanced]** A unique universal internal identifier for the employee. This is solely used for understanding manager relationships along with `managerId`. - phoneNumber: - type: string - description: The employee's phone number. - location: - type: string - description: The employee's location (city/office name etc). - deprecated: true - x-glean-deprecated: - id: a7f6fbaa-0eaf-4c0c-a4f5-ab90347f73fd - introduced: "2026-02-05" - message: Field is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" - structuredLocation: - $ref: '#/components/schemas/StructuredLocation' - description: Detailed location with information about country, state, city etc. - title: - type: string - description: The employee's role title. - photoUrl: - type: string - format: uri - description: The employee's profile pic - businessUnit: - type: string - description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. - department: - type: string - description: An organizational unit where everyone has a similar task, e.g. `Engineering`. - datasourceProfiles: - type: array - items: - $ref: '#/components/schemas/DatasourceProfile' - description: The datasource profiles of the employee, e.g. `Slack`,`Github`. - teams: - type: array - items: - $ref: '#/components/schemas/EmployeeTeamInfo' - description: Info about the employee's team(s) - startDate: - type: string - format: date - description: The date when the employee started - endDate: - type: string - format: date - description: If a former employee, the last date of employment. - bio: - type: string - description: Short biography or mission statement of the employee. - pronoun: - type: string - description: She/her, He/his or other pronoun. - alsoKnownAs: - type: array - items: - type: string - description: Other names associated with the employee. - profileUrl: - type: string - description: Link to internal company person profile. - socialNetworks: - type: array - items: - $ref: '#/components/schemas/SocialNetworkDefinition' - description: List of social network profiles. - managerEmail: - type: string - description: The email of the employee's manager - managerId: - type: string - description: | - **[Advanced]** A unique universal internal identifier for the employee's manager. This is solely used in conjunction with `id`. - type: - type: string - description: The type of the employee, an enum of `FULL_TIME`, `CONTRACTOR`, `NON_EMPLOYEE` - default: FULL_TIME - relationships: - type: array - items: - $ref: '#/components/schemas/EntityRelationship' - description: List of unidirectional relationships with other employees. E.g. this employee (`A`) is a CHIEF_OF_STAFF to another employee (`B`); or this employee (`A`) is an EXECUTIVE_ASSISTANT of another employee (`C`). The mapping should be attached to `A`'s profile. - status: - type: string - description: The status of the employee, an enum of `CURRENT`, `FUTURE`, `EX` - default: CURRENT - additionalFields: - type: array - items: - $ref: '#/components/schemas/AdditionalFieldDefinition' - description: List of additional fields with more information about the employee. - required: - - department - - email - description: Describes employee info - EmployeeAndVersionDefinition: - type: object - properties: - employee: - $ref: '#/components/schemas/EmployeeInfoDefinition' - description: Info about the employee - version: - type: integer - format: int64 - description: Version number for the employee object. If absent or 0 then no version checks are done - required: - - info - description: describes info about an employee and optional version for that info - EmployeeTeamInfo: - type: object - properties: - id: - type: string - description: unique identifier for this team - name: - type: string - description: Team name - url: - type: string - format: uri - description: Link to internal company team page - description: Information about which team an employee belongs to - EntityRelationship: - type: object - properties: - name: - type: string - description: The title or type of relationship. Currently an enum of `CHIEF_OF_STAFF`, `EXECUTIVE_ASSISTANT` - email: - type: string - description: Email of the person with whom the relationship exists. Per the example above, either `B` or `C`'s email depending on the relationship. - required: - - name - - email - description: Describes a relationship edge between a source and destination entity - TeamMember: - type: object - properties: - email: - type: string - format: email - description: The member's email - relationship: - type: string - description: The member's relationship to the team, an enum of `MEMBER`, `MANAGER`, `LEAD`, `POINT_OF_CONTACT`, `OTHER` - default: MEMBER - join_date: - type: string - format: date - description: The member's start date - required: - - email - description: Information about a team's member - TeamInfoDefinition: - type: object - properties: - id: - type: string - description: The unique ID of the team - name: - type: string - description: Human-readable team name - description: - type: string - description: The description of this team - businessUnit: - type: string - description: Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. - department: - type: string - description: An organizational unit where everyone has a similar task, e.g. `Engineering`. - photoUrl: - type: string - format: uri - description: A link to the team's photo - externalLink: - type: string - format: uri - description: | - A link to an external team page. If set, team results will link to it. - emails: - type: array - items: - $ref: '#/components/schemas/TeamEmail' - description: The emails of the team - datasourceProfiles: - type: array - items: - $ref: '#/components/schemas/DatasourceProfile' - description: The datasource profiles of the team, e.g. `Slack`,`Github`. - members: - type: array - items: - $ref: '#/components/schemas/TeamMember' - description: The members of the team - additionalFields: - type: array - items: - $ref: '#/components/schemas/AdditionalFieldDefinition' - description: List of additional fields with more information about the team. - required: - - id - - members - - name - description: Information about an employee's team - IndexTeamRequest: - type: object - properties: - team: - $ref: '#/components/schemas/TeamInfoDefinition' - description: Info about the team - version: - type: integer - format: int64 - description: Version number for the team object. If absent or 0 then no version checks are done - required: - - team - description: Info about a team and optional version for that info - BulkIndexShortcutsRequest: - type: object - allOf: - - $ref: '#/components/schemas/BulkIndexRequest' - - type: object - properties: - shortcuts: - type: array - items: - $ref: '#/components/schemas/ExternalShortcut' - description: Batch of shortcuts information - required: - - shortcuts - description: Describes the request body of the /bulkindexshortcuts API call - UploadShortcutsRequest: - type: object - allOf: - - $ref: '#/components/schemas/BulkIndexRequest' - - type: object - properties: - shortcuts: - type: array - items: - $ref: '#/components/schemas/IndexingShortcut' - description: Batch of shortcuts information - required: - - shortcuts - description: Describes the request body of the /uploadshortcuts API call - DebugDatasourceStatusResponse: - type: object - properties: - documents: - type: object - properties: - bulkUploadHistory: - $ref: '#/components/schemas/BulkUploadHistoryEventList' - type: object - counts: - type: object - properties: - uploaded: - type: array - items: - $ref: '#/components/schemas/DatasourceObjectTypeDocumentCountEntry' - description: | - A list of object types and corresponding upload counts. Note: This data may be cached and could be up to 3 hours stale. - indexed: - type: array - items: - $ref: '#/components/schemas/DatasourceObjectTypeDocumentCountEntry' - description: The number of documents indexed, grouped by objectType - processingHistory: - $ref: '#/components/schemas/ProcessingHistoryEventList' - identity: - type: object - properties: - processingHistory: - $ref: '#/components/schemas/ProcessingHistoryEventList' - users: - $ref: '#/components/schemas/DebugDatasourceStatusIdentityResponseComponent' - groups: - $ref: '#/components/schemas/DebugDatasourceStatusIdentityResponseComponent' - memberships: - $ref: '#/components/schemas/DebugDatasourceStatusIdentityResponseComponent' - datasourceVisibility: - type: string - enum: - - ENABLED_FOR_ALL - - ENABLED_FOR_TEST_GROUP - - NOT_ENABLED - description: The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE - example: ENABLED_FOR_ALL - description: Describes the response body of the /debug/{datasource}/status API call - DebugDatasourceStatusIdentityResponseComponent: - type: object - properties: - bulkUploadHistory: - $ref: '#/components/schemas/BulkUploadHistoryEventList' - type: object - counts: - type: object - properties: - uploaded: - type: integer - description: The number of users/groups/memberships uploaded - example: 15 - DatasourceObjectTypeDocumentCountEntry: - type: object - properties: - objectType: - type: string - description: The object type of the document - example: Article - count: - type: integer - description: The number of documents of the corresponding objectType - example: 15 - BulkUploadHistoryEvent: - type: object - properties: - uploadId: - type: string - description: The unique ID of the upload - example: upload-id-content-1707403081 - startTime: - type: string - description: The start time of the upload in ISO 8601 format - example: "2021-08-06T17:58:01.000Z" - endTime: - type: string - description: The end time of the upload in ISO 8601 format, 'NA' if the upload is still active - example: "2021-08-06T18:58:01.000Z" - status: - type: string - enum: - - ACTIVE - - SUCCESSFUL - description: The status of the upload, an enum of ACTIVE, SUCCESSFUL - example: SUCCESSFUL - processingState: - type: string - enum: - - UNAVAILABLE - - UPLOAD STARTED - - UPLOAD IN PROGRESS - - UPLOAD COMPLETED - - DELETION PAUSED - - INDEXING COMPLETED - description: The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED - example: UPLOAD COMPLETED - description: Information about a successful bulk upload - BulkUploadHistoryEventList: - type: array - items: - $ref: '#/components/schemas/BulkUploadHistoryEvent' - description: Information about active and recent successful uploads for the datasource - DebugDocumentRequest: - type: object - properties: - objectType: - type: string - description: Object type of the document to get the status for. - example: Article - docId: - type: string - description: Glean Document ID within the datasource to get the status for. - example: art123 - required: - - objectType - - docId - description: Describes the request body of the /debug/{datasource}/document API call. - DebugDocumentResponse: - type: object - properties: - status: - $ref: '#/components/schemas/DocumentStatusResponse' - type: object - description: Upload and indexing status of the document - uploadedPermissions: - $ref: '#/components/schemas/DocumentPermissionsDefinition' - description: Describes the response body of the /debug/{datasource}/document API call - DebugDocumentsRequest: - type: object - properties: - debugDocuments: - type: array - items: - $ref: '#/components/schemas/DebugDocumentRequest' - description: Documents to fetch debug information for - required: - - debugDocuments - description: Describes the request body of the /debug/{datasource}/documents API call. - DebugDocumentsResponseItem: - type: object - properties: - docId: - type: string - description: Id of the document - objectType: - type: string - description: objectType of the document - debugInfo: - $ref: '#/components/schemas/DebugDocumentResponse' - type: object - description: Debug information of the document - description: Describes the response body of a single document in the /debug/{datasource}/documents API call - DebugDocumentsResponse: - type: object - properties: - documentStatuses: - type: array - items: - $ref: '#/components/schemas/DebugDocumentsResponseItem' - description: List of document ids/urls and their debug information - description: Describes the response body of a single document in the /debug/{datasource}/documents API call - DocumentStatusResponse: - type: object - properties: - uploadStatus: - type: string - description: Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN - example: UPLOADED - lastUploadedAt: - type: string - description: Time of last successful upload for the document, in ISO 8601 format - example: "2021-08-06T17:58:01.000Z" - indexingStatus: - type: string - description: Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN - example: INDEXED - lastIndexedAt: - type: string - description: Time of last successful indexing for the document, in ISO 8601 format - example: "2021-08-06T17:58:01.000Z" - permissionIdentityStatus: - type: string - description: Permission identity status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN (Always unknown if `identityDatasourceName` is set). Document visibility may be affected status is `NOT_UPLOADED`. - example: UPLOADED - description: Describes the document status response body - LifeCycleEvent: - type: object - properties: - event: - type: string - enum: - - UPLOADED - - INDEXED - - DELETION_REQUESTED - - DELETED - description: Type of event - example: INDEXED - timestamp: - type: string - description: Timestamp of the event - example: "2021-08-06T17:58:01.000Z" - ProcessingHistoryEvent: - type: object - properties: - startTime: - type: string - description: The start time of the processing in ISO 8601 format - example: "2021-08-06T17:58:01.000Z" - endTime: - type: string - description: The end time of the processing in ISO 8601 format, 'NA' if still in progress - example: "2021-08-06T18:58:01.000Z" - description: Processing history event for a datasource - ProcessingHistoryEventList: - type: array - items: - $ref: '#/components/schemas/ProcessingHistoryEvent' - description: Information about processing history for the datasource - DebugUserRequest: - type: object - properties: - email: - type: string - description: Email ID of the user to get the status for - example: u1@foo.com - required: - - email - description: Describes the request body of the /debug/{datasource}/user API call - DebugUserResponse: - type: object - properties: - status: - $ref: '#/components/schemas/UserStatusResponse' - type: object - description: Upload and indexing status of the user - uploadedGroups: - type: array - items: - $ref: '#/components/schemas/DatasourceGroupDefinition' - description: List of groups the user is a member of, as uploaded via permissions API. - description: Describes the response body of the /debug/{datasource}/user API call - UserStatusResponse: - type: object - properties: - isActiveUser: - type: boolean - description: Whether the user is active or not - example: true - uploadStatus: - $ref: '#/components/schemas/UploadStatusEnum' - lastUploadedAt: - type: string - description: Time of last successful upload for the user, in ISO 8601 format - example: "2021-08-06T17:58:01.000Z" - description: Describes the user status response body - UploadStatusEnum: - type: string - enum: - - UPLOADED - - NOT_UPLOADED - - STATUS_UNKNOWN - description: Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN - example: UPLOADED - DebugDocumentLifecycleRequest: - type: object - properties: - objectType: - type: string - description: Object type of the document to get lifecycle events for. - example: Article - docId: - type: string - description: Glean Document ID within the datasource to get lifecycle events for. - example: art123 - startDate: - type: string - description: The start date for events to be fetched. Cannot be more than 30 days (default 7 days) in the past. - example: "2025-05-01" - maxEvents: - type: integer - description: Max number of events to be fetched. Cannot be more than 100 (default 20). - example: 50 - required: - - objectType - - docId - description: Describes the request body of the /debug/{datasource}/document/events API call. - DebugDocumentLifecycleResponse: - type: object - properties: - lifeCycleEvents: - type: array - items: - $ref: '#/components/schemas/LifeCycleEvent' - description: List of lifecycle events corresponding to the document - description: Describes the response body of the /debug/{datasource}/document/events API call - CustomMetadataPutRequest: - type: object - properties: - customMetadata: - type: array - items: - $ref: '#/components/schemas/CustomProperty' - description: Array of custom metadata key-value pairs - required: - - customMetadata - description: Request body for adding or updating custom metadata on a document - CustomMetadataSchema: - type: object - properties: - metadataKeys: - type: array - items: - $ref: '#/components/schemas/CustomMetadataPropertyDefinition' - description: Array of metadata key definitions - required: - - metadataKeys - description: Schema for custom metadata containing metadata key definitions - SuccessResponse: - type: object - properties: - success: - type: boolean - description: Indicates if the operation was successful - default: true - description: Success response for custom metadata operations - ErrorInfoResponse: - type: object - properties: - error: - type: string - description: Error message describing what went wrong - message: - type: string - description: Additional details about the error - required: - - error - description: Error response for custom metadata operations - PropertyDefinition: - properties: - name: - type: string - description: The name of the property in the `DocumentMetadata` (e.g. 'createTime', 'updateTime', 'author', 'container'). In the future, this will support custom properties too. - displayLabel: - type: string - description: The user friendly label for the property. - displayLabelPlural: - type: string - description: The user friendly label for the property that will be used if a plural context. - propertyType: - type: string - enum: - - TEXT - - DATE - - INT - - USERID - - PICKLIST - - TEXTLIST - - MULTIPICKLIST - description: The type of custom property - this governs the search and faceting behavior. Note that MULTIPICKLIST is not yet supported. - uiOptions: - type: string - enum: - - NONE - - SEARCH_RESULT - - DOC_HOVERCARD - hideUiFacet: - type: boolean - description: If true then the property will not show up as a facet in the UI. - uiFacetOrder: - type: integer - description: Will be used to set the order of facets in the UI, if present. If set for one facet, must be set for all non-hidden UI facets. Must take on an integer value from 1 (shown at the top) to N (shown last), where N is the number of non-hidden UI facets. These facets will be ordered below the built-in "Type" and "Tag" operators. - skipIndexing: - type: boolean - description: If true then the property will not be indexed for retrieval and ranking. - group: - type: string - description: The unique identifier of the `PropertyGroup` to which this property belongs. - PropertyGroup: - properties: - name: - type: string - description: The unique identifier of the group. - displayLabel: - type: string - description: The user-friendly group label to display. - description: A grouping for multiple PropertyDefinition. Grouped properties will be displayed together in the UI. - ObjectDefinition: - properties: - name: - type: string - description: Unique identifier for this `DocumentMetadata.objectType`. If omitted, this definition is used as a default for all unmatched `DocumentMetadata.objectType`s in this datasource. - displayLabel: - type: string - description: The user-friendly name of the object for display. - docCategory: - type: string - enum: - - UNCATEGORIZED - - TICKETS - - CRM - - PUBLISHED_CONTENT - - COLLABORATIVE_CONTENT - - QUESTION_ANSWER - - MESSAGING - - CODE_REPOSITORY - - CHANGE_MANAGEMENT - - PEOPLE - - EMAIL - - SSO - - ATS - - KNOWLEDGE_HUB - - EXTERNAL_SHORTCUT - - ENTITY - - CALENDAR - - AGENTS - description: The document category of this object type. - propertyDefinitions: - type: array - items: - $ref: '#/components/schemas/PropertyDefinition' - propertyGroups: - type: array - items: - $ref: '#/components/schemas/PropertyGroup' - description: A list of `PropertyGroup`s belonging to this object type, which will group properties to be displayed together in the UI. - summarizable: - type: boolean - description: Whether or not the object is summarizable - description: The definition for an `DocumentMetadata.objectType` within a datasource. - CanonicalizingRegexType: - properties: - matchRegex: - type: string - description: Regular expression to match to an arbitrary string. - rewriteRegex: - type: string - description: Regular expression to transform into a canonical string. - description: Regular expression to apply to an arbitrary string to transform it into a canonical string. - SharedDatasourceConfigNoInstance: - type: object - properties: - name: - type: string - description: Unique identifier of datasource instance to which this config applies. - displayName: - type: string - description: The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. - datasourceCategory: - type: string - enum: - - UNCATEGORIZED - - TICKETS - - CRM - - PUBLISHED_CONTENT - - COLLABORATIVE_CONTENT - - QUESTION_ANSWER - - MESSAGING - - CODE_REPOSITORY - - CHANGE_MANAGEMENT - - PEOPLE - - EMAIL - - SSO - - ATS - - KNOWLEDGE_HUB - - EXTERNAL_SHORTCUT - - ENTITY - - CALENDAR - - AGENTS - description: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. - default: UNCATEGORIZED - urlRegex: - type: string - description: 'Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.**' - example: https://example-company.datasource.com/.* - iconUrl: - type: string - description: The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - objectDefinitions: - type: array - items: - $ref: '#/components/schemas/ObjectDefinition' - description: The list of top-level `objectType`s for the datasource. - suggestionText: - type: string - description: Example text for what to search for in this datasource - homeUrl: - type: string - description: The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. - crawlerSeedUrls: - type: array - items: - type: string - description: This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. - iconDarkUrl: - type: string - description: The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - hideBuiltInFacets: - type: array - items: + - UNSPECIFIED + - LOW + - MEDIUM + - HIGH + DlpIssueStatus: type: string + description: Status of a DLP issue. + x-include-enum-class-prefix: true enum: - - TYPE - - TAG - - AUTHOR - - OWNER - description: List of built-in facet types that should be hidden for the datasource. - canonicalizingURLRegex: - type: array - items: - $ref: '#/components/schemas/CanonicalizingRegexType' - description: A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. - canonicalizingTitleRegex: - type: array - items: - $ref: '#/components/schemas/CanonicalizingRegexType' - description: A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results - redlistTitleRegex: - type: string - description: A regex that identifies titles that should not be indexed - connectorType: - type: string - allOf: - - $ref: '#/components/schemas/ConnectorType' - deprecated: false - quicklinks: - type: array - items: - $ref: '#/components/schemas/Quicklink' - description: List of actions for this datasource instance that will show up in autocomplete and app card, e.g. "Create new issue" for jira - renderConfigPreset: - type: string - description: The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details - aliases: - type: array - items: - type: string - description: Aliases that can be used as `app` operator-values. - isOnPrem: - type: boolean - description: Whether or not this datasource is hosted on-premise. - trustUrlRegexForViewActivity: - type: boolean - description: True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. - default: true - includeUtmSource: - type: boolean - description: If true, a utm_source query param will be added to outbound links to this datasource within Glean. - stripFragmentInCanonicalUrl: - type: boolean - description: If true, the fragment part of the URL will be stripped when converting to a canonical url. - default: true - required: - - name - description: Structure describing shared config properties of a datasource with no multi-instance support. - CustomDatasourceConfig: - allOf: - - $ref: '#/components/schemas/SharedDatasourceConfigNoInstance' - - type: object - properties: - identityDatasourceName: - type: string - description: If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. - productAccessGroup: - type: string - description: If the datasource uses a specific product access group, then the name of that group. - isUserReferencedByEmail: - type: boolean - description: whether email is used to reference users in document ACLs and in group memberships. - isEntityDatasource: - type: boolean - description: True if this datasource is used to push custom entities. - default: false - isTestDatasource: - type: boolean - description: True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. - default: false - description: Structure describing config properties of a custom datasource - ShortcutProperties: - properties: - inputAlias: - type: string - description: link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. - description: - type: string - description: A short, plain text blurb to help people understand the intent of the shortcut. - destinationUrl: - type: string - format: url - description: destination URL for the shortcut. - createdBy: - type: string - description: Email of the user who created this shortcut. - createTime: - type: integer - format: int64 - description: The time the shortcut was created in epoch seconds. - updatedBy: - type: string - description: Email of the user who last updated this shortcut. - updateTime: - type: integer - format: int64 - description: The time the shortcut was updated in epoch seconds. - ExternalShortcut: - allOf: - - $ref: '#/components/schemas/ShortcutProperties' - - type: object - required: - - destinationUrl - - intermediateUrl - - createdBy - - inputAlias - properties: - title: - type: string - description: Title of the golink - intermediateUrl: - type: string - format: url - description: The URL from which the user is then redirected to the destination URL. - decayedVisitScore: - type: number - format: double - description: decayed visits score for ranking - editUrl: - type: string - format: url - description: The URL using which the user can access the edit page of the shortcut. - SharedDatasourceConfig: - allOf: - - $ref: '#/components/schemas/SharedDatasourceConfigNoInstance' - - type: object - properties: - datasourceName: - type: string - description: The (non-unique) name of the datasource of which this config is an instance, e.g. "jira". - instanceOnlyName: - type: string - description: The instance of the datasource for this particular config, e.g. "onprem". - instanceDescription: - type: string - description: A human readable string identifying this instance as compared to its peers, e.g. "github.com/askscio" or "github.askscio.com" - description: Structure describing shared config properties of the datasource (including multi-instance support) - IndexingShortcut: - allOf: - - $ref: '#/components/schemas/ShortcutProperties' - - type: object - required: - - destinationUrl - - createdBy - - inputAlias - properties: - unlisted: - type: boolean - description: Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author and admins only. - urlTemplate: - type: string - description: For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. - SensitiveInfoType: - properties: - likelihoodThreshold: - type: string - enum: - - LIKELY - - VERY_LIKELY - - POSSIBLE - - UNLIKELY - - VERY_UNLIKELY - deprecated: true - x-glean-deprecated: - - id: d45039ec-d6f6-47ba-93b7-ab2307b07f84 - introduced: "2026-02-05" - kind: property - message: Field is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" - infoType: - type: string - description: Text representation of an info-type to scan for. - TimeRange: - properties: - startTime: - type: string - format: date-time - description: start time of the time range, applicable for the CUSTOM type. - endTime: - type: string - format: date-time - description: end time of the time range, applicable for the CUSTOM type. - lastNDaysValue: - type: integer - format: int64 - description: The number of days to look back from the current time, applicable for the LAST_N_DAYS type. - InputOptions: - properties: - urlGreenlist: - type: array - items: - type: string - description: list of url regex matching documents excluded from report - deprecated: true - x-glean-deprecated: - id: e022aaa5-56e6-4b57-bca3-b11943da76a0 - introduced: "2026-02-05" - message: Field is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" - datasourcesType: - type: string - enum: - - ALL - - CUSTOM - description: The types of datasource for which to run the report/policy. - datasources: - type: array - items: - type: string - description: List of datasources to consider for report. DEPRECATED - use datasourceInstances instead. - deprecated: true - x-glean-deprecated: - id: 97e35970-e0ed-4248-be13-2af8c22e7894 - introduced: "2026-02-05" - message: Use datasourceInstances instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use datasourceInstances instead" - datasourceInstances: - type: array - items: - type: string - description: List of datasource instances to consider for report/policy. - timePeriodType: - type: string - enum: - - ALL_TIME - - PAST_YEAR - - PAST_DAY - - CUSTOM - - LAST_N_DAYS - description: Type of time period for which to run the report/policy. PAST_DAY is deprecated. - customTimeRange: - $ref: '#/components/schemas/TimeRange' - subsetDocIdsToScan: - type: array - items: - type: string - description: Subset of document IDs to scan. If empty, all documents matching other scope criteria will be scanned. - description: Controls which data-sources and what time-range to include in scans. - SharingOptions: - properties: - enabled: - type: boolean - deprecated: true - x-glean-deprecated: - id: e9260be6-209b-4ce2-a4b3-f7f22879dd86 - introduced: "2026-02-05" - message: Field is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" - threshold: - type: integer - description: The minimum number of users the document is shared with. - thresholdEnabled: - type: boolean - description: Documents will be filtered based on how many people have access to it. - anyoneWithLinkEnabled: - type: boolean - deprecated: true - x-glean-deprecated: - id: 30646ced-e0db-43ef-8412-64a67c5d0f53 - introduced: "2026-02-05" - message: Field is deprecated - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated" - anyoneInternalEnabled: - type: boolean - description: Only users within the organization can access the document. - anonymousAccessEnabled: - type: boolean - description: Anyone on the internet can access the document. - userAccessEnabled: - type: boolean - description: Enable user access check - userIds: - type: array - items: - type: string - description: Any one of the specified users can access the document. - description: Controls how "shared" a document must be to get picked for scans. - ExternalSharingOptions: - allOf: - - description: DEPRECATED - use `broadSharingOptions` instead. - - $ref: '#/components/schemas/SharingOptions' - - type: object - properties: - domainAccessEnabled: - type: boolean - deprecated: true - x-glean-deprecated: - id: 7c9e4a1d-3f8b-4e2c-9a5d-6b0f1c8e2d4a - introduced: "2026-02-05" - message: Use broadSharingOptions instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead" - HotwordProximity: - properties: - windowBefore: - type: integer - windowAfter: - type: integer - Hotword: - properties: - regex: - type: string - proximity: - $ref: '#/components/schemas/HotwordProximity' - SensitiveExpression: - properties: - expression: - type: string - description: Sensitive word, phrase, or regular expression. - hotwords: - type: array - items: - $ref: '#/components/schemas/Hotword' - description: Zero to three proximate regular expressions necessary to consider an expression as sensitive content. - CustomSensitiveRuleType: - type: string - enum: - - REGEX - - TERM - - INFO_TYPE - description: Type of the custom sensitive rule. - CustomSensitiveRule: - properties: - id: - type: string - description: Identifier for the custom sensitive expression. - value: - type: string - description: The value of the custom sensitive rule. For REGEX type, this is the regex pattern; for TERM type, it is the term to match; and for INFO_TYPE type, it refers to predefined categories of sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available options. - type: - $ref: '#/components/schemas/CustomSensitiveRuleType' - likelihoodThreshold: - type: string - enum: - - LIKELY - - VERY_LIKELY - - POSSIBLE - - UNLIKELY - - VERY_UNLIKELY - description: Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type. - CustomSensitiveExpression: - properties: - id: - type: string - description: Identifier for the custom sensitive expression. - keyword: - $ref: '#/components/schemas/CustomSensitiveRule' - description: The keyword to match against. - evaluationExpression: - type: string - description: The expression to evaluate the keyword match. - SensitiveContentOptions: - properties: - sensitiveInfoTypes: - type: array - items: - $ref: '#/components/schemas/SensitiveInfoType' - description: DEPRECATED - use 'customSensitiveExpressions' instead. - deprecated: true - x-glean-deprecated: - id: 3497cb1c-f7aa-42d8-81b8-309c3adeed84 - introduced: "2026-02-05" - message: Use customSensitiveExpressions instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead" - sensitiveTerms: - type: array - items: - $ref: '#/components/schemas/SensitiveExpression' - description: DEPRECATED - use 'customSensitiveExpressions' instead. - deprecated: true - x-glean-deprecated: - id: b0713b37-472e-4c29-80ba-6f5d6f2b449c - introduced: "2026-02-05" - message: Use customSensitiveExpressions instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead" - sensitiveRegexes: - type: array - items: - $ref: '#/components/schemas/SensitiveExpression' - description: DEPRECATED - use 'customSensitiveExpressions' instead. - deprecated: true - x-glean-deprecated: - id: a26e1920-36b6-4c0f-981f-57b09a9ebce3 - introduced: "2026-02-05" - message: Use customSensitiveExpressions instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead" - customSensitiveExpressions: - type: array - items: - $ref: '#/components/schemas/CustomSensitiveExpression' - description: list of custom sensitive expressions to consider as sensitive content - description: Options for defining sensitive content within scanned documents. - DlpPersonMetadata: - properties: - firstName: - type: string - description: The first name of the person - email: - type: string - description: The user's primary email address - DlpPerson: - properties: - name: - type: string - description: The display name. - obfuscatedId: - type: string - description: An opaque identifier that can be used to request metadata for a Person. - metadata: - $ref: '#/components/schemas/DlpPersonMetadata' - required: - - name - - obfuscatedId - description: Details about the person who created this report/policy. - AllowlistOptions: - properties: - terms: - type: array - items: - type: string - description: list of words and phrases to consider as whitelisted content - description: Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. - DlpConfig: - properties: - version: - type: integer - format: int64 - description: Synonymous with report/policy id. - sensitiveInfoTypes: - type: array - items: - $ref: '#/components/schemas/SensitiveInfoType' - description: DEPRECATED - use `sensitiveContentOptions` instead. - deprecated: true - x-glean-deprecated: - id: 60d6d182-e9d0-448d-af75-137f68bbdcbf - introduced: "2026-02-05" - message: Use sensitiveContentOptions instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead" - inputOptions: - $ref: '#/components/schemas/InputOptions' - description: Options for documents to include or exclude in a report - externalSharingOptions: - $ref: '#/components/schemas/ExternalSharingOptions' - description: DEPRECATED - use `broadSharingOptions` instead. - deprecated: true - x-glean-deprecated: - id: 6484ec17-a133-4176-b2ce-28e25b0e9065 - introduced: "2026-02-05" - message: Use broadSharingOptions instead - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead" - broadSharingOptions: - $ref: '#/components/schemas/SharingOptions' - description: Options for defining documents to scan for sensitive content. - sensitiveContentOptions: - $ref: '#/components/schemas/SensitiveContentOptions' - description: Options for defining sensitive content within scanned documents. - reportName: - type: string - frequency: - type: string - description: Interval between scans. - createdBy: - $ref: '#/components/schemas/DlpPerson' - description: Person who created this report/policy. - createdAt: - type: string - format: iso-date-time - description: Timestamp at which this configuration was created. - redactQuote: - type: boolean - description: redact quote in findings of the report - autoHideDocs: - type: boolean - description: auto hide documents with findings in the report - allowlistOptions: - $ref: '#/components/schemas/AllowlistOptions' - description: Options for defining whitelisting content within scanned documents - description: Detailed configuration of what documents and sensitive content will be scanned. - DlpFrequency: - type: string - enum: - - ONCE - - DAILY - - WEEKLY - - CONTINUOUS - - NONE - description: Interval between scans. DAILY is deprecated. - x-include-enum-class-prefix: true - DlpReportStatus: - type: string - enum: - - ACTIVE - - INACTIVE - - CANCELLED - - NONE - description: The status of the policy/report. Only ACTIVE status will be picked for scans. - x-include-enum-class-prefix: true - DlpReport: - properties: - id: - type: string - name: - type: string - config: - $ref: '#/components/schemas/DlpConfig' - description: All details of the policy that is needed for a scan. - frequency: - $ref: '#/components/schemas/DlpFrequency' - description: The interval between scans. - status: - $ref: '#/components/schemas/DlpReportStatus' - description: The status of the policy. - createdBy: - $ref: '#/components/schemas/DlpPerson' - description: Person who created this report. - createdAt: - type: string - format: iso-date-time - description: Timestamp at which the policy was created. - lastUpdatedAt: - type: string - format: iso-date-time - description: Timestamp at which the policy was last updated. - autoHideDocs: - type: boolean - description: Auto hide documents with findings in the policy. - lastScanStatus: - type: string - enum: - - PENDING - - SUCCESS - - FAILURE - - CANCELLED - - CANCELLING - - ACTIVE - lastScanStartTime: - type: string - format: iso-date-time - description: The timestamp at which the report's last run/scan began. - updatedBy: - $ref: '#/components/schemas/DlpPerson' - description: Person who last updated this report. - description: Full policy information that will be used for scans. - GetDlpReportResponse: - properties: - report: - $ref: '#/components/schemas/DlpReport' - UpdateDlpReportRequest: - properties: - config: - $ref: '#/components/schemas/DlpConfig' - description: The new configuration the policy will follow if provided. - frequency: - $ref: '#/components/schemas/DlpFrequency' - description: The new frequency the policy will follow if provided. - status: - $ref: '#/components/schemas/DlpReportStatus' - description: The new status the policy will be updated to if provided. - autoHideDocs: - type: boolean - description: The new autoHideDoc boolean the policy will be updated to if provided. - reportName: - type: string - description: The new name of the policy if provided. - DlpSimpleResult: - type: string - enum: - - SUCCESS - - FAILURE - UpdateDlpReportResponse: - properties: - result: - $ref: '#/components/schemas/DlpSimpleResult' - ListDlpReportsResponse: - properties: - reports: - type: array - items: - $ref: '#/components/schemas/DlpReport' - CreateDlpReportRequest: - properties: - name: - type: string - description: Name of the policy being created. - config: - $ref: '#/components/schemas/DlpConfig' - description: Details on the configuration used in the scans. - frequency: - $ref: '#/components/schemas/DlpFrequency' - description: Interval between scans. - autoHideDocs: - type: boolean - description: Controls whether the policy should hide documents with violations. - CreateDlpReportResponse: - properties: - report: - $ref: '#/components/schemas/DlpReport' - UpdateDlpConfigRequest: - properties: - config: - $ref: '#/components/schemas/DlpConfig' - frequency: - type: string - description: Only "ONCE" is supported for reports. - UpdateDlpConfigResponse: - properties: - result: - $ref: '#/components/schemas/DlpSimpleResult' - reportId: - type: string - description: The id of the report that was just created and run. - ReportStatusResponse: - properties: - status: - type: string - enum: - - PENDING - - SUCCESS - - FAILURE - - CANCELLED - - CANCELLING - - ACTIVE - startTime: - type: string - format: iso-date-time - description: The timestamp at which the report's run/scan began. - DocumentVisibilityOverride: - properties: - docId: - type: string - override: - type: string - enum: - - NONE - - HIDE_FROM_ALL - - HIDE_FROM_GROUPS - - HIDE_FROM_ALL_EXCEPT_OWNER - description: The visibility-override state of the document. - GetDocumentVisibilityOverridesResponse: - properties: - visibilityOverrides: - type: array - items: - $ref: '#/components/schemas/DocumentVisibilityOverride' - UpdateDocumentVisibilityOverridesRequest: - properties: - visibilityOverrides: - type: array - items: - $ref: '#/components/schemas/DocumentVisibilityOverride' - DocumentVisibilityUpdateResult: - allOf: - - $ref: '#/components/schemas/DocumentVisibilityOverride' - - type: object - properties: - success: - type: boolean - description: Whether this document was successfully set to its desired visibility state. - UpdateDocumentVisibilityOverridesResponse: - properties: - results: - type: array - items: - $ref: '#/components/schemas/DocumentVisibilityUpdateResult' - description: The documents and whether their visibility was successfully updated. - DlpSeverity: - type: string - enum: - - UNSPECIFIED - - LOW - - MEDIUM - - HIGH - description: Severity levels for DLP findings and analyses. - x-include-enum-class-prefix: true - DlpIssueStatus: - type: string - enum: - - OPEN - - CLOSED - - IN_PROGRESS - - RESOLVED - description: Status of a DLP issue. - x-include-enum-class-prefix: true - TimeRangeFilter: - properties: - timePeriodType: - type: string - enum: - - PAST_DAY - - PAST_WEEK - - PAST_MONTH - - PAST_YEAR - - CUSTOM - description: The type of time period for which to filter findings. - customTimeRange: - $ref: '#/components/schemas/TimeRange' - DlpFindingFilter: - properties: - infoType: - type: string - regexId: - type: string - reportId: - type: string - datasource: - type: string - visibility: - type: string - documentIds: - type: array - items: - type: string - severity: - $ref: '#/components/schemas/DlpSeverity' - documentSeverity: - type: array - items: - $ref: '#/components/schemas/DlpSeverity' - statuses: - type: array - items: - $ref: '#/components/schemas/DlpIssueStatus' - timeRange: - $ref: '#/components/schemas/TimeRangeFilter' - archived: - type: boolean - DlpIssueFilter: - properties: - searchText: - type: string - description: Text to search for in issue fields. - statuses: - type: array - items: - $ref: '#/components/schemas/DlpIssueStatus' - description: Filter by one or more issue statuses. - assigneeId: - type: string - description: Filter by assignee user ID. - infoType: - type: string - regexId: - type: string - reportIds: - type: array - items: - type: string - description: Filter by one or more report/policy IDs. - docId: - type: string - datasource: - type: string - visibility: - type: string - severities: - type: array - items: - $ref: '#/components/schemas/DlpSeverity' - description: Filter by one or more severity levels. - timeRange: - $ref: '#/components/schemas/TimeRangeFilter' - description: Filter for DLP issues. Includes document-level filters and issue-specific filters. - ExportInfo: - properties: - createdBy: - $ref: '#/components/schemas/DlpPerson' - description: person who triggered this export - startTime: - type: string - format: iso-date-time - description: Timestamp at which this export started. - endTime: - type: string - format: iso-date-time - description: Timestamp at which this export completed. - exportId: - type: string - description: The ID of the export - fileName: - type: string - description: The name of the file to export the findings to - exportType: - type: string - enum: - - FINDINGS - - DOCUMENTS - - ISSUES - description: The type of export to perform - filter: - $ref: '#/components/schemas/DlpFindingFilter' - description: The filters used to export the findings. Set for FINDINGS and DOCUMENTS exports. - issueFilter: - $ref: '#/components/schemas/DlpIssueFilter' - description: The filters used for ISSUES exports. - status: - type: string - enum: - - PENDING - - COMPLETED - - FAILED - description: The status of the export - exportSize: - type: integer - format: int64 - description: The size of the exported file in bytes - ListDlpFindingsExportsResponse: - properties: - exports: - type: array - items: - $ref: '#/components/schemas/ExportInfo' - DlpExportFindingsRequest: - properties: - exportType: - type: string - enum: - - FINDINGS - - DOCUMENTS - - ISSUES - description: The type of export to perform - filter: - $ref: '#/components/schemas/DlpFindingFilter' - issueFilter: - $ref: '#/components/schemas/DlpIssueFilter' - description: Filter for ISSUE-level exports. Used when exportType is ISSUES. - fileName: - type: string - description: The name of the file to export the findings to - fieldScope: - type: string - enum: - - ALL - - EXCLUDE_SENSITIVE - - CUSTOM - description: Controls which fields to include in the export - fieldsToExclude: - type: array - items: - type: string - description: List of field names to exclude from the export - ConfigurationValue: - type: object - properties: - value: - type: string - description: The configuration value as a string. Only one of value or valueList should be populated. - valueList: - type: array - items: + - OPEN + - CLOSED + - IN_PROGRESS + - RESOLVED + TimeRangeFilter: + properties: + timePeriodType: + type: string + description: The type of time period for which to filter findings. + enum: + - PAST_DAY + - PAST_WEEK + - PAST_MONTH + - PAST_YEAR + - CUSTOM + customTimeRange: + $ref: "#/components/schemas/TimeRange" + DlpFindingFilter: + properties: + infoType: + type: string + regexId: + type: string + reportId: + type: string + datasource: + type: string + visibility: + type: string + documentIds: + type: array + items: + type: string + severity: + $ref: "#/components/schemas/DlpSeverity" + documentSeverity: + type: array + items: + $ref: "#/components/schemas/DlpSeverity" + statuses: + type: array + items: + $ref: "#/components/schemas/DlpIssueStatus" + timeRange: + $ref: "#/components/schemas/TimeRangeFilter" + archived: + type: boolean + DlpIssueFilter: + description: Filter for DLP issues. Includes document-level filters and issue-specific filters. + properties: + searchText: + type: string + description: Text to search for in issue fields. + statuses: + type: array + items: + $ref: "#/components/schemas/DlpIssueStatus" + description: Filter by one or more issue statuses. + assigneeId: + type: string + description: Filter by assignee user ID. + infoType: + type: string + regexId: + type: string + reportIds: + type: array + items: + type: string + description: Filter by one or more report/policy IDs. + docId: + type: string + datasource: + type: string + visibility: + type: string + severities: + type: array + items: + $ref: "#/components/schemas/DlpSeverity" + description: Filter by one or more severity levels. + timeRange: + $ref: "#/components/schemas/TimeRangeFilter" + ExportInfo: + properties: + createdBy: + description: person who triggered this export + $ref: "#/components/schemas/DlpPerson" + startTime: + description: Timestamp at which this export started. + type: string + format: iso-date-time + endTime: + description: Timestamp at which this export completed. + type: string + format: iso-date-time + exportId: + type: string + description: The ID of the export + fileName: + type: string + description: The name of the file to export the findings to + exportType: + type: string + description: The type of export to perform + enum: + - FINDINGS + - DOCUMENTS + - ISSUES + filter: + $ref: "#/components/schemas/DlpFindingFilter" + description: The filters used to export the findings. Set for FINDINGS and DOCUMENTS exports. + issueFilter: + $ref: "#/components/schemas/DlpIssueFilter" + description: The filters used for ISSUES exports. + status: + type: string + description: The status of the export + enum: + - PENDING + - COMPLETED + - FAILED + exportSize: + type: integer + format: int64 + description: The size of the exported file in bytes + ListDlpFindingsExportsResponse: + properties: + exports: + type: array + items: + $ref: "#/components/schemas/ExportInfo" + DlpExportFindingsRequest: + properties: + exportType: + type: string + description: The type of export to perform + enum: + - FINDINGS + - DOCUMENTS + - ISSUES + filter: + $ref: "#/components/schemas/DlpFindingFilter" + issueFilter: + $ref: "#/components/schemas/DlpIssueFilter" + description: Filter for ISSUE-level exports. Used when exportType is ISSUES. + fileName: + type: string + description: The name of the file to export the findings to + fieldScope: + type: string + description: Controls which fields to include in the export + enum: + - ALL + - EXCLUDE_SENSITIVE + - CUSTOM + fieldsToExclude: + type: array + items: + type: string + description: List of field names to exclude from the export + ConfigurationValue: + description: A single configuration value, either a scalar or a list + type: object + properties: + value: + description: The configuration value as a string. Only one of value or valueList should be populated. + type: string + valueList: + description: The configuration value as a list of strings. Only one of value or valueList should be populated. + type: array + items: + type: string + ConfigurationValues: + description: A map from configuration key names to their values + type: object + additionalProperties: + $ref: "#/components/schemas/ConfigurationValue" + DatasourceInstanceConfiguration: + description: Configuration for a datasource instance + type: object + required: + - values + properties: + values: + $ref: "#/components/schemas/ConfigurationValues" + DatasourceConfigurationResponse: + description: | + The greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist are included. + type: object + required: + - configuration + properties: + configuration: + $ref: "#/components/schemas/DatasourceInstanceConfiguration" + UpdateDatasourceConfigurationRequest: + description: | + Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set. + type: object + required: + - configuration + properties: + configuration: + $ref: "#/components/schemas/DatasourceInstanceConfiguration" + DatasourceCredentialStatus: + description: | + 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. type: string - description: The configuration value as a list of strings. Only one of value or valueList should be populated. - description: A single configuration value, either a scalar or a list - ConfigurationValues: - type: object - additionalProperties: - $ref: '#/components/schemas/ConfigurationValue' - description: A map from configuration key names to their values - DatasourceInstanceConfiguration: - type: object - properties: - values: - $ref: '#/components/schemas/ConfigurationValues' - required: - - values - description: Configuration for a datasource instance - DatasourceConfigurationResponse: - type: object - properties: - configuration: - $ref: '#/components/schemas/DatasourceInstanceConfiguration' - required: - - configuration - description: | - The greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist are included. - UpdateDatasourceConfigurationRequest: - type: object - properties: - configuration: - $ref: '#/components/schemas/DatasourceInstanceConfiguration' - required: - - configuration - description: | - Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set. - DatasourceCredentialStatus: - type: string - enum: - - VALID - - VALID_WITH_WARNINGS - - VALIDATING - - INVALID - - MISSING - description: | - 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. - DatasourceCredentialStatusResponse: - type: object - properties: - status: - $ref: '#/components/schemas/DatasourceCredentialStatus' - lastRotatedAt: - type: string - format: date-time - description: When the credentials were last rotated. Omitted when not known. - expiresAt: - type: string - format: date-time - description: | - When the active credentials expire. Omitted when not known or not applicable to this credential type. - message: - type: string - description: Optional human-readable detail about the current credential status. - required: - - status - description: Status of the credentials currently installed for a datasource instance. - RotateDatasourceCredentialsRequest: - type: object - properties: - credentials: - $ref: '#/components/schemas/DatasourceInstanceConfiguration' - required: - - credentials - description: | - Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. - `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. - ChatRequestStream: - required: - - messages - properties: - saveChat: - type: boolean - description: >- - Save the current interaction as a Chat for the user to access and potentially continue later. - chatId: - type: string - description: >- - The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. - messages: - type: array - description: >- - A list of chat messages, from most recent to least recent. It can be assumed that the first chat message in the list is the user's most recent query. - items: - $ref: '#/components/schemas/ChatMessage' - agentConfig: - $ref: '#/components/schemas/AgentConfig' - description: Describes the agent that will execute the request. - inclusions: - $ref: '#/components/schemas/ChatRestrictionFilters' - description: >- - A list of filters which only allows chat to access certain content. - exclusions: - $ref: '#/components/schemas/ChatRestrictionFilters' - description: >- - A list of filters which disallows chat from accessing certain content. If content is in both inclusions and exclusions, it'll be excluded. - timeoutMillis: - type: integer - description: >- - Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. - example: 30000 - applicationId: - type: string - description: >- - The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used. - 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. - default: true - CustomMetadataPropertyDefinition: - type: object - description: The definition for a key within a Custom Metadata schema. Only the fields applicable to Custom Metadata are exposed. - properties: - name: - type: string - description: The name of the metadata key. - propertyType: - type: string - enum: - - TEXT - - PICKLIST - - TEXTLIST - - MULTIPICKLIST - description: The type of metadata key. This governs the search and faceting behavior. - skipIndexing: - type: boolean - description: If true then the property will not be indexed for retrieval and ranking. - required: - - name - - propertyType - parameters: - locale: - name: locale - in: query - description: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. - required: false - schema: - type: string - timezoneOffset: - name: timezoneOffset - in: query - description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. - schema: - type: integer - datasourceId: - name: datasourceId - in: path - description: The datasource type identifier (e.g. o365sharepoint) - required: true - schema: - type: string - example: o365sharepoint - instanceId: - name: instanceId - in: path - description: The datasource instance identifier - required: true - schema: - type: string - example: o365sharepoint_abc123 - datasourceInstanceId: - name: datasourceInstanceId - in: path - description: The full datasource instance identifier (e.g. o365sharepoint_abc123) - required: true - schema: - type: string - example: o365sharepoint_abc123 - responses: - SuccessResponse: - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessResponse' - BadRequestError: - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorInfoResponse' - UnauthorizedError: - description: Not Authorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorInfoResponse' - NotFoundError: - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorInfoResponse' - TooManyRequestsError: - description: Too Many Requests - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorInfoResponse' - InternalServerError: - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorInfoResponse' -x-tagGroups: - - name: Search & Generative AI - tags: - - Chat - - Search - - Summarize - - Tools - - name: Connected Content - tags: - - Calendar - - Documents - - Entities - - Messages - - name: User Generated Content - tags: - - Announcements - - Answers - - Collections - - Displayable Lists - - Images - - Pins - - Shortcuts - - Verification - - name: General - tags: - - Activity - - Authentication - - Insights - - User + enum: + - VALID + - VALID_WITH_WARNINGS + - VALIDATING + - INVALID + - MISSING + DatasourceCredentialStatusResponse: + description: Status of the credentials currently installed for a datasource instance. + type: object + required: + - status + properties: + status: + $ref: "#/components/schemas/DatasourceCredentialStatus" + lastRotatedAt: + description: When the credentials were last rotated. Omitted when not known. + type: string + format: date-time + expiresAt: + description: | + When the active credentials expire. Omitted when not known or not applicable to this credential type. + type: string + format: date-time + message: + description: Optional human-readable detail about the current credential status. + type: string + RotateDatasourceCredentialsRequest: + description: | + Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. + `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. + type: object + required: + - credentials + properties: + credentials: + $ref: "#/components/schemas/DatasourceInstanceConfiguration" + ChatRequestStream: + required: + - messages + properties: + saveChat: + type: boolean + description: >- + Save the current interaction as a Chat for the user to access and potentially continue later. + chatId: + type: string + description: >- + The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. + messages: + type: array + description: >- + A list of chat messages, from most recent to least recent. It can be assumed that the first chat message in the list is the user's most recent query. + items: + $ref: '#/components/schemas/ChatMessage' + agentConfig: + $ref: '#/components/schemas/AgentConfig' + description: Describes the agent that will execute the request. + inclusions: + $ref: '#/components/schemas/ChatRestrictionFilters' + description: >- + A list of filters which only allows chat to access certain content. + exclusions: + $ref: '#/components/schemas/ChatRestrictionFilters' + description: >- + A list of filters which disallows chat from accessing certain content. If content is in both inclusions and exclusions, it'll be excluded. + timeoutMillis: + type: integer + description: >- + Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. + example: 30000 + applicationId: + type: string + description: >- + The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used. + 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. + default: true + CustomMetadataPropertyDefinition: + type: object + description: The definition for a key within a Custom Metadata schema. Only the fields applicable to Custom Metadata are exposed. + properties: + name: + type: string + description: The name of the metadata key. + propertyType: + type: string + enum: + - TEXT + - PICKLIST + - TEXTLIST + - MULTIPICKLIST + description: The type of metadata key. This governs the search and faceting behavior. + skipIndexing: + type: boolean + description: If true then the property will not be indexed for retrieval and ranking. + required: + - name + - propertyType + responses: + SuccessResponse: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessResponse" + BadRequestError: + description: Bad Request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfoResponse" + UnauthorizedError: + description: Not Authorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfoResponse" + NotFoundError: + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfoResponse" + TooManyRequestsError: + description: Too Many Requests + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfoResponse" + InternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInfoResponse" + parameters: + locale: + name: locale + in: query + description: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + required: false + schema: + type: string + timezoneOffset: + name: timezoneOffset + in: query + description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + schema: + type: integer + datasourceId: + name: datasourceId + in: path + description: The datasource type identifier (e.g. o365sharepoint) + required: true + schema: + type: string + example: o365sharepoint + instanceId: + name: instanceId + in: path + description: The datasource instance identifier + required: true + schema: + type: string + example: o365sharepoint_abc123 + datasourceInstanceId: + name: datasourceInstanceId + in: path + description: The full datasource instance identifier (e.g. o365sharepoint_abc123) + required: true + schema: + type: string + example: o365sharepoint_abc123 tags: - - name: Datasources - description: Manage datasources. - - name: Documents - description: Index documents from a datasource. - - name: People - description: Index employee people data. - - name: Permissions - description: Manage users, groups and membership. - - name: Authentication - description: Manage indexing API tokens. + - name: Datasources + description: Manage datasources. + - name: Documents + description: Index documents from a datasource. + - name: People + description: Index employee people data. + - name: Permissions + description: Manage users, groups and membership. + - name: Authentication + description: Manage indexing API tokens. +x-tagGroups: + - name: Search & Generative AI + tags: + - Chat + - Search + - Summarize + - Tools + - name: Connected Content + tags: + - Calendar + - Documents + - Entities + - Messages + - name: User Generated Content + tags: + - Announcements + - Answers + - Collections + - Displayable Lists + - Images + - Pins + - Shortcuts + - Verification + - name: General + tags: + - Activity + - Authentication + - Insights + - User diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8e73db0c..99d024c5 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.771.0 +speakeasyVersion: 1.784.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:847b1f126f78c86bb63c1c27b6053ba6a9afe8855aab3e82d1f7f71501a5e840 - sourceBlobDigest: sha256:b685acc261c79f1c7579b236eaff1ea63982eb1f4be4c318bd6c9a24998c6132 + sourceRevisionDigest: sha256:6046b9884a23e4dc74981de80523388de33aadb6eeb9532f9db7879046e5a479 + sourceBlobDigest: sha256:9bbf8e6c0a488883f14f29348a31bf047e215487f3553b39d77267a46a5e5b8d tags: - latest Glean-OAS: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:847b1f126f78c86bb63c1c27b6053ba6a9afe8855aab3e82d1f7f71501a5e840 - sourceBlobDigest: sha256:b685acc261c79f1c7579b236eaff1ea63982eb1f4be4c318bd6c9a24998c6132 + sourceRevisionDigest: sha256:6046b9884a23e4dc74981de80523388de33aadb6eeb9532f9db7879046e5a479 + sourceBlobDigest: sha256:9bbf8e6c0a488883f14f29348a31bf047e215487f3553b39d77267a46a5e5b8d codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:23fd3d90cd31a167fd68d0b445256a33d9ed6f54ac66a8602d421692ecf9aa78 + codeSamplesRevisionDigest: sha256:e7986a33af64c6ac98803edc669175023f6a308f7135a730ef2e63c2256d7434 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 9c671da9..c02f261b 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.glean.api-client:glean-api-client:0.13.1' +implementation 'com.glean.api-client:glean-api-client:0.13.2' ``` Maven: @@ -75,7 +75,7 @@ Maven: com.glean.api-client glean-api-client - 0.13.1 + 0.13.2 ``` @@ -410,6 +410,7 @@ For more information on obtaining the appropriate token type, please contact you ### [Agents](docs/sdks/agents/README.md) +* [createAgent](docs/sdks/agents/README.md#createagent) - Create an agent * [editAgent](docs/sdks/agents/README.md#editagent) - Edit an agent ### [Authentication](docs/sdks/authentication/README.md) @@ -745,10 +746,10 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`GleanError`](./src/main/java/models/errors/GleanError.java)**: -* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 9 of 129 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 5 of 129 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 129 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 129 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 9 of 130 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 5 of 130 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 130 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 130 methods.* diff --git a/RELEASES.md b/RELEASES.md index 1a5841db..c3bb8bed 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -748,4 +748,14 @@ Based on: ### Generated - [java v0.13.1] . ### Releases -- [Maven Central v0.13.1] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.13.1 - . \ No newline at end of file +- [Maven Central v0.13.1] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.13.1 - . + +## 2026-06-19 18:38:18 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.784.0 (2.911.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.13.2] . +### Releases +- [Maven Central v0.13.2] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.13.2 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3815c3c2..c5cbe897 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,6 @@ plugins { id 'signing' // V2 publishing plugin (Sonatype Central Portal) id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3' - id "io.spring.dependency-management" version "1.1.6" apply false } compileJava.options.encoding = "UTF-8" @@ -85,47 +84,6 @@ dependencies { api 'org.reactivestreams:reactive-streams:1.0.4' } -ext { - springBootVersion = '2.7.18' -} - -subprojects { - if (name in [ - 'glean-api-client-spring-boot-autoconfigure', - 'glean-api-client-spring-boot-starter' - ]) { - // Ensure subprojects use the same group and version as root project - group = rootProject.group - version = rootProject.version - - apply { - plugin "java-library" - plugin "io.spring.dependency-management" - plugin "maven-publish" - plugin "signing" - plugin "cl.franciscosolis.sonatype-central-upload" - } - dependencyManagement { - imports { - mavenBom "org.springframework.boot:spring-boot-dependencies:${rootProject.springBootVersion}" - } - } - repositories { - mavenCentral() - } - java { - withSourcesJar() - withJavadocJar() - } - tasks.withType(JavaCompile).configureEach { - options.release = 11 - } - - // Apply publishing configuration to all subprojects - they'll check for publishingConfig internally - apply from: rootProject.file('publishing.gradle') - } -} - ext { publishingConfig = [ groupId: group, diff --git a/docs/models/components/AllowlistOptions.md b/docs/models/components/AllowlistOptions.md index f64ba1b0..8aad3b75 100644 --- a/docs/models/components/AllowlistOptions.md +++ b/docs/models/components/AllowlistOptions.md @@ -1,10 +1,11 @@ # AllowlistOptions -Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. +Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `terms` | List\<*String*> | :heavy_minus_sign: | list of words and phrases to consider as whitelisted content | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `terms` | List\<*String*> | :heavy_minus_sign: | list of words and phrases to consider as whitelisted content | +| `regexes` | List\<*String*> | :heavy_minus_sign: | list of regular expressions whose matches are considered whitelisted content | \ No newline at end of file diff --git a/docs/models/components/CreateWorkflowRequest.md b/docs/models/components/CreateWorkflowRequest.md new file mode 100644 index 00000000..9f5ba126 --- /dev/null +++ b/docs/models/components/CreateWorkflowRequest.md @@ -0,0 +1,10 @@ +# CreateWorkflowRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the workflow. | +| `transient_` | *Optional\* | :heavy_minus_sign: | Used to create a transient workflow. | +| `parentWorkflowId` | *Optional\* | :heavy_minus_sign: | id of the parent workflow for transient workflows | \ No newline at end of file diff --git a/docs/models/components/DlpConfig.md b/docs/models/components/DlpConfig.md index 805d41b5..072c39c8 100644 --- a/docs/models/components/DlpConfig.md +++ b/docs/models/components/DlpConfig.md @@ -5,18 +5,18 @@ Detailed configuration of what documents and sensitive content will be scanned. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *Optional\* | :heavy_minus_sign: | Synonymous with report/policy id. | -| ~~`sensitiveInfoTypes`~~ | List\<[SensitiveInfoType](../../models/components/SensitiveInfoType.md)> | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead.

DEPRECATED - use `sensitiveContentOptions` instead. | -| `inputOptions` | [Optional\](../../models/components/InputOptions.md) | :heavy_minus_sign: | Controls which data-sources and what time-range to include in scans. | -| ~~`externalSharingOptions`~~ | [Optional\](../../models/components/ExternalSharingOptions.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead. | -| `broadSharingOptions` | [Optional\](../../models/components/SharingOptions.md) | :heavy_minus_sign: | Controls how "shared" a document must be to get picked for scans. | -| `sensitiveContentOptions` | [Optional\](../../models/components/SensitiveContentOptions.md) | :heavy_minus_sign: | Options for defining sensitive content within scanned documents. | -| `reportName` | *Optional\* | :heavy_minus_sign: | N/A | -| `frequency` | *Optional\* | :heavy_minus_sign: | Interval between scans. | -| `createdBy` | [Optional\](../../models/components/DlpPerson.md) | :heavy_minus_sign: | Details about the person who created this report/policy. | -| `createdAt` | *Optional\* | :heavy_minus_sign: | Timestamp at which this configuration was created. | -| `redactQuote` | *Optional\* | :heavy_minus_sign: | redact quote in findings of the report | -| `autoHideDocs` | *Optional\* | :heavy_minus_sign: | auto hide documents with findings in the report | -| `allowlistOptions` | [Optional\](../../models/components/AllowlistOptions.md) | :heavy_minus_sign: | Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *Optional\* | :heavy_minus_sign: | Synonymous with report/policy id. | +| ~~`sensitiveInfoTypes`~~ | List\<[SensitiveInfoType](../../models/components/SensitiveInfoType.md)> | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead.

DEPRECATED - use `sensitiveContentOptions` instead. | +| `inputOptions` | [Optional\](../../models/components/InputOptions.md) | :heavy_minus_sign: | Controls which data-sources and what time-range to include in scans. | +| ~~`externalSharingOptions`~~ | [Optional\](../../models/components/ExternalSharingOptions.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead. | +| `broadSharingOptions` | [Optional\](../../models/components/SharingOptions.md) | :heavy_minus_sign: | Controls how "shared" a document must be to get picked for scans. | +| `sensitiveContentOptions` | [Optional\](../../models/components/SensitiveContentOptions.md) | :heavy_minus_sign: | Options for defining sensitive content within scanned documents. | +| `reportName` | *Optional\* | :heavy_minus_sign: | N/A | +| `frequency` | *Optional\* | :heavy_minus_sign: | Interval between scans. | +| `createdBy` | [Optional\](../../models/components/DlpPerson.md) | :heavy_minus_sign: | Details about the person who created this report/policy. | +| `createdAt` | *Optional\* | :heavy_minus_sign: | Timestamp at which this configuration was created. | +| `redactQuote` | *Optional\* | :heavy_minus_sign: | redact quote in findings of the report | +| `autoHideDocs` | *Optional\* | :heavy_minus_sign: | auto hide documents with findings in the report | +| `allowlistOptions` | [Optional\](../../models/components/AllowlistOptions.md) | :heavy_minus_sign: | Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. | \ No newline at end of file diff --git a/docs/models/components/FeedRequestCategory.md b/docs/models/components/FeedRequestCategory.md index 848e24b7..a369cfa0 100644 --- a/docs/models/components/FeedRequestCategory.md +++ b/docs/models/components/FeedRequestCategory.md @@ -45,6 +45,7 @@ FeedRequestCategory value = FeedRequestCategory.DOCUMENT_SUGGESTION; | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | | `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | +| `CARD_STACK_PROMO` | CARD_STACK_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/components/FeedResult.md b/docs/models/components/FeedResult.md index afba3e38..fe54d018 100644 --- a/docs/models/components/FeedResult.md +++ b/docs/models/components/FeedResult.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `category` | [FeedResultCategory](../../models/components/FeedResultCategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | -| `primaryEntry` | [FeedEntry](../../models/components/FeedEntry.md) | :heavy_check_mark: | N/A | -| `secondaryEntries` | List\<[FeedEntry](../../models/components/FeedEntry.md)> | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | -| `rank` | *Optional\* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `category` | [FeedResultCategory](../../models/components/FeedResultCategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | +| `primaryEntry` | [FeedEntry](../../models/components/FeedEntry.md) | :heavy_check_mark: | N/A | +| `secondaryEntries` | List\<[FeedEntry](../../models/components/FeedEntry.md)> | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | +| `rank` | *Optional\* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | +| `placementReason` | [Optional\](../../models/components/PlacementReason.md) | :heavy_minus_sign: | Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. | \ No newline at end of file diff --git a/docs/models/components/FeedResultCategory.md b/docs/models/components/FeedResultCategory.md index 8292458e..b958da24 100644 --- a/docs/models/components/FeedResultCategory.md +++ b/docs/models/components/FeedResultCategory.md @@ -50,6 +50,7 @@ FeedResultCategory custom = FeedResultCategory.of("custom_value"); | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | | `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | +| `CARD_STACK_PROMO` | CARD_STACK_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/components/GroupType.md b/docs/models/components/GroupType.md index 2cb4bd09..8b607f80 100644 --- a/docs/models/components/GroupType.md +++ b/docs/models/components/GroupType.md @@ -16,13 +16,14 @@ GroupType custom = GroupType.of("custom_value"); ## Values -| Name | Value | -| ---------------- | ---------------- | -| `DEPARTMENT` | DEPARTMENT | -| `ALL` | ALL | -| `TEAM` | TEAM | -| `JOB_TITLE` | JOB_TITLE | -| `ROLE_TYPE` | ROLE_TYPE | -| `LOCATION` | LOCATION | -| `REGION` | REGION | -| `EXTERNAL_GROUP` | EXTERNAL_GROUP | \ No newline at end of file +| Name | Value | +| --------------------- | --------------------- | +| `DEPARTMENT` | DEPARTMENT | +| `ALL` | ALL | +| `TEAM` | TEAM | +| `JOB_TITLE` | JOB_TITLE | +| `ROLE_TYPE` | ROLE_TYPE | +| `LOCATION` | LOCATION | +| `REGION` | REGION | +| `EXTERNAL_GROUP` | EXTERNAL_GROUP | +| `COLLECTION_AUDIENCE` | COLLECTION_AUDIENCE | \ No newline at end of file diff --git a/docs/models/components/JustificationType.md b/docs/models/components/JustificationType.md index 2fd22ddf..0a207469 100644 --- a/docs/models/components/JustificationType.md +++ b/docs/models/components/JustificationType.md @@ -63,6 +63,7 @@ JustificationType custom = JustificationType.of("custom_value"); | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | | `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | +| `CARD_STACK_PROMO` | CARD_STACK_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/components/PlacementReason.md b/docs/models/components/PlacementReason.md new file mode 100644 index 00000000..73d960cf --- /dev/null +++ b/docs/models/components/PlacementReason.md @@ -0,0 +1,22 @@ +# PlacementReason + +Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlacementReason; + +PlacementReason value = PlacementReason.ORGANIC; + +// Open enum: use .of() to create instances from custom string values +PlacementReason custom = PlacementReason.of("custom_value"); +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `ORGANIC` | ORGANIC | +| `PROMO` | PROMO | \ No newline at end of file diff --git a/docs/models/operations/CreateAgentRequest.md b/docs/models/operations/CreateAgentRequest.md new file mode 100644 index 00000000..e8b5e916 --- /dev/null +++ b/docs/models/operations/CreateAgentRequest.md @@ -0,0 +1,10 @@ +# CreateAgentRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `locale` | *Optional\* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | +| `timezoneOffset` | *Optional\* | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | +| `createWorkflowRequest` | [CreateWorkflowRequest](../../models/components/CreateWorkflowRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateAgentResponse.md b/docs/models/operations/CreateAgentResponse.md new file mode 100644 index 00000000..05fa443a --- /dev/null +++ b/docs/models/operations/CreateAgentResponse.md @@ -0,0 +1,11 @@ +# CreateAgentResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `workflowResult` | [Optional\](../../models/components/WorkflowResult.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index c47e91f5..1fe959f7 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -4,8 +4,62 @@ ### Available Operations +* [createAgent](#createagent) - Create an agent * [editAgent](#editagent) - Edit an agent +## createAgent + +Create an agent. + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.components.CreateWorkflowRequest; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + CreateAgentResponse res = sdk.agents().createAgent() + .createWorkflowRequest(CreateWorkflowRequest.builder() + .build()) + .call(); + + if (res.workflowResult().isPresent()) { + System.out.println(res.workflowResult().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `locale` | *Optional\* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | +| `timezoneOffset` | *Optional\* | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | +| `createWorkflowRequest` | [CreateWorkflowRequest](../../models/components/CreateWorkflowRequest.md) | :heavy_check_mark: | N/A | + +### Response + +**[CreateAgentResponse](../../models/operations/CreateAgentResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models/errors/APIException | 4XX, 5XX | \*/\* | + ## editAgent Creates a draft or publishes an [agent](https://developers.glean.com/agents/agents-api). Use `isDraft=true` to save a draft, or `isDraft=false` (or omit) to publish immediately. Only draft and publish modes are supported. diff --git a/gradle.properties b/gradle.properties index f6a8718a..0b215eeb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.13.1 +version=0.13.2 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/settings.gradle b/settings.gradle index 0326ca67..5228fb0c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,12 +9,6 @@ rootProject.name = 'glean-api-client' -include 'glean-api-client-spring-boot-autoconfigure' -include 'glean-api-client-spring-boot-starter' - -project(':glean-api-client-spring-boot-autoconfigure').projectDir = file('spring/glean-api-client-spring-boot-autoconfigure') -project(':glean-api-client-spring-boot-starter').projectDir = file('spring/glean-api-client-spring-boot-starter') - // Apply additional settings if the file exists if (file('settings-extra.gradle').exists()) { apply from: 'settings-extra.gradle' diff --git a/spring/glean-api-client-spring-boot-autoconfigure/build.gradle b/spring/glean-api-client-spring-boot-autoconfigure/build.gradle deleted file mode 100644 index 3bbefc4f..00000000 --- a/spring/glean-api-client-spring-boot-autoconfigure/build.gradle +++ /dev/null @@ -1,35 +0,0 @@ -description = 'glean-api-client Spring Boot Auto Configuration' - -// Publishing configuration overrides -ext { - publishingConfig = [ - groupId: rootProject.group, - artifactId: 'glean-api-client-spring-boot-autoconfigure', - version: rootProject.version, - name: 'Glean Java SDK - Spring Boot Auto Configuration', - description: 'Spring Boot auto-configuration for the Glean Java SDK.', - ] -} - -dependencies { - api project(':') - implementation 'org.springframework.boot:spring-boot-autoconfigure' - annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' -} - -test { - useJUnitPlatform() -} - -jar { - dependsOn 'generatePomFileForMavenPublication' - archiveBaseName = 'glean-api-client-spring-boot-autoconfigure' - into("META-INF/maven/com.glean.api-client/glean-api-client-spring-boot-autoconfigure") { - from(layout.buildDirectory.file("pom.xml")) { - // Only include if it exists to avoid build ordering issues - duplicatesStrategy = DuplicatesStrategy.INCLUDE - } - } -} \ No newline at end of file diff --git a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/ConditionalOnPropertyPrefix.java b/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/ConditionalOnPropertyPrefix.java deleted file mode 100644 index f18ce057..00000000 --- a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/ConditionalOnPropertyPrefix.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: c17b99382f55 - */ -package com.glean.api_client.glean_api_client; - -import org.springframework.context.annotation.Conditional; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Conditional annotation that matches when any properties exist under the specified prefix. - * This is useful for conditionally creating beans only when configuration properties - * are present under a specific prefix. - * - *

Example usage: - *

- * @Bean
- * @ConditionalOnPropertyPrefix(prefix = "myapp.security")
- * public SecuritySource securitySource() {
- *     // This bean will only be created if properties like myapp.security.* exist
- * }
- * 
- */ -@Target({ ElementType.TYPE, ElementType.METHOD }) -@Retention(RetentionPolicy.RUNTIME) -@Documented -@Conditional(OnPropertyPrefixCondition.class) -public @interface ConditionalOnPropertyPrefix { - - /** - * The property prefix to check for. Properties starting with this prefix - * (followed by a dot) will be considered when determining if the condition matches. - * - * @return the property prefix - */ - String prefix(); -} \ No newline at end of file diff --git a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfig.java b/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfig.java deleted file mode 100644 index f9dfd608..00000000 --- a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfig.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: dc219279f3d6 - */ -package com.glean.api_client.glean_api_client; - -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import java.util.concurrent.TimeUnit; - -import com.glean.api_client.glean_api_client.utils.BackoffStrategy; -import com.glean.api_client.glean_api_client.utils.HTTPClient; -import com.glean.api_client.glean_api_client.utils.RetryConfig; -import com.glean.api_client.glean_api_client.utils.SpeakeasyHTTPClient; -import java.lang.IllegalStateException; -import java.lang.String; -import java.lang.System; -import java.util.Optional; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.function.Consumer; - - -/** - * Spring Boot Auto Configuration for glean-api-client SDK - * This configuration class automatically configures the glean-api-client SDK - * when Spring Boot detects it on the classpath. - */ -@AutoConfiguration -@ConditionalOnClass(Glean.class) -@EnableConfigurationProperties(GleanApiClientAutoConfigProperties.class) -public class GleanApiClientAutoConfig { - - /** - * Constructor. - */ - public GleanApiClientAutoConfig() { - } - - /** - * Creates a RetryConfig bean from properties if retry is enabled. - * - * @param properties the configuration properties - * @return A configured RetryConfig instance - */ - @Bean - @ConditionalOnMissingBean - @ConditionalOnProperty(prefix = "gleanapiclient.retry-config", name = "strategy") - public RetryConfig retryConfig(GleanApiClientAutoConfigProperties properties) { - GleanApiClientAutoConfigProperties.RetryConfig retryProps = properties.getRetryConfig(); - - if (RetryConfig.Strategy.BACKOFF.equals(retryProps.getStrategy())) { - GleanApiClientAutoConfigProperties.RetryConfig.Backoff backoff = retryProps.getBackoff(); - return RetryConfig.builder() - .backoff( - BackoffStrategy.builder() - .initialInterval(backoff.getInitialInterval().toMillis(), TimeUnit.MILLISECONDS) - .maxInterval(backoff.getMaxInterval().toMillis(), TimeUnit.MILLISECONDS) - .maxElapsedTime(backoff.getMaxElapsedTime().toMillis(), TimeUnit.MILLISECONDS) - .baseFactor(backoff.getBaseFactor()) - .jitterFactor(backoff.getJitterFactor()) - .retryConnectError(backoff.isRetryConnectError()) - .retryReadTimeoutError(backoff.isRetryReadTimeoutError()) - .build() - ) - .build(); - } - - // Default retry config for other strategies - return RetryConfig.builder().build(); - } - /** - * Creates a {@code Consumer} bean for HTTP debug logging if none exists. - * This logger is used by the SpeakeasyHTTPClient for debug output when debug logging is enabled. - * By default, it logs to {@code System.out}, but can be customized by providing your own {@code Consumer} bean. - * - * @return A {@code Consumer} that logs messages to {@code System.out} - */ - @Bean - @ConditionalOnMissingBean - public Consumer httpLogger() { - return System.out::println; - } - /** - * Creates an HTTPClient bean if none exists. - * - * @param properties the configuration properties - * @param httpLogger the logger for HTTP debug output - * @return A configured HTTPClient instance - */ - @Bean - @ConditionalOnMissingBean - public HTTPClient httpClient(GleanApiClientAutoConfigProperties properties, Consumer httpLogger) { - GleanApiClientAutoConfigProperties.HttpClient httpClientProps = properties.getHttpClient(); - - // Configure the static logger - SpeakeasyHTTPClient.setLogger(httpLogger); - - if (httpClientProps != null) { - // Configure debug logging - SpeakeasyHTTPClient.setDebugLogging(httpClientProps.isEnableDebugLogging()); - - // Configure redacted headers - if (httpClientProps.getRedactedHeaders() != null && !httpClientProps.getRedactedHeaders().isEmpty()) { - SpeakeasyHTTPClient.setRedactedHeaders(httpClientProps.getRedactedHeaders()); - } - } - - return new SpeakeasyHTTPClient(); - } - /** - * Creates a SecuritySource bean if none exists and security properties are configured. - * - * @param properties the configuration properties - * @return A configured SecuritySource instance - */ - @Bean - @ConditionalOnMissingBean - @ConditionalOnPropertyPrefix(prefix = "gleanapiclient.security") - public SecuritySource securitySource(GleanApiClientAutoConfigProperties properties) {GleanApiClientAutoConfigProperties.Security securityProps = properties.getSecurity(); - com.glean.api_client.glean_api_client.models.components.Security.Builder securityBuilder = com.glean.api_client.glean_api_client.models.components.Security.builder(); - boolean hasAnySecurityConfiguration = false; - // Build APIToken security from direct properties (primitive value) - if (securityProps.getAPIToken() != null) { - securityBuilder.apiToken(securityProps.getAPIToken()); - hasAnySecurityConfiguration = true; - } - - if (!hasAnySecurityConfiguration) { - throw new IllegalStateException("Security configuration is present but no security options are configured. " + - "Please configure at least one security option in your application properties."); - } - - return SecuritySource.of(securityBuilder.build()); - } - - /** - * Creates the SDKConfiguration bean as the single source of truth for all SDK configuration. - * - * @param properties the configuration properties - * @param httpClient the HTTP client bean - * @param hooks the hooks bean - * @param asyncHooks the async hooks bean - * @param securitySource the security source bean (optional) - * @param retryConfig the retry config bean (optional) - * @return A configured SDKConfiguration instance - */ - @Bean - @ConditionalOnMissingBean - public SDKConfiguration sdkConfiguration( - GleanApiClientAutoConfigProperties properties, - HTTPClient httpClient, - com.glean.api_client.glean_api_client.utils.Hooks hooks, - com.glean.api_client.glean_api_client.utils.AsyncHooks asyncHooks, - SecuritySource securitySource, - Optional retryConfig) { - - SDKConfiguration sdkConfiguration = new SDKConfiguration(); - - sdkConfiguration.setClient(httpClient); - - sdkConfiguration.setHooks(hooks); - sdkConfiguration.setAsyncHooks(asyncHooks); - sdkConfiguration.setSecuritySource(securitySource); - - if (properties.getServerUrl() != null) { - sdkConfiguration.setServerUrl(properties.getServerUrl()); - } - sdkConfiguration.setServerIdx(properties.getServerIdx()); - - sdkConfiguration.setRetryConfig(retryConfig); - - return sdkConfiguration; - } - - /** - * Creates the main SDK bean using the configured SDKConfiguration. - * - * @param sdkConfiguration the configured SDKConfiguration bean - * @return A configured Glean instance - */ - @Bean - @ConditionalOnMissingBean - public Glean glean(SDKConfiguration sdkConfiguration) { - return new Glean(sdkConfiguration); - } - - /** - * Creates an AsyncHooks bean if none exists. - * - * @return A configured AsyncHooks instance - */ - @Bean - @ConditionalOnMissingBean - public com.glean.api_client.glean_api_client.utils.AsyncHooks asyncHooks() { - return new com.glean.api_client.glean_api_client.utils.AsyncHooks(); - } - - /** - * Creates a ScheduledExecutorService for async retry operations if none exists. - * - * @return A configured ScheduledExecutorService instance - */ - @Bean - @ConditionalOnMissingBean - public ScheduledExecutorService retryScheduler() { - return Executors.newSingleThreadScheduledExecutor(); - } - - /** - * Creates a Hooks configuration bean if none exists. - * - * @return A configured Hooks instance - */ - @Bean - @ConditionalOnMissingBean - public com.glean.api_client.glean_api_client.utils.Hooks hooks() { - return new com.glean.api_client.glean_api_client.utils.Hooks(); - } - /** - * Creates a Client sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Client instance - */ - @Bean - @ConditionalOnMissingBean - public Client client(Glean glean) { - return glean.client(); - } - /** - * Creates a Authentication sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Authentication instance - */ - @Bean - @ConditionalOnMissingBean - public Authentication authentication(Glean glean) { - return glean.authentication(); - } - /** - * Creates a Chat sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Chat instance - */ - @Bean - @ConditionalOnMissingBean - public Chat chat(Glean glean) { - return glean.chat(); - } - /** - * Creates a Agents sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Agents instance - */ - @Bean - @ConditionalOnMissingBean - public Agents agents(Glean glean) { - return glean.agents(); - } - /** - * Creates a Entities sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Entities instance - */ - @Bean - @ConditionalOnMissingBean - public Entities entities(Glean glean) { - return glean.entities(); - } - /** - * Creates a Tools sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Tools instance - */ - @Bean - @ConditionalOnMissingBean - public Tools tools(Glean glean) { - return glean.tools(); - } - /** - * Creates a Indexing sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Indexing instance - */ - @Bean - @ConditionalOnMissingBean - public Indexing indexing(Glean glean) { - return glean.indexing(); - } - /** - * Creates a Troubleshooting sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Troubleshooting instance - */ - @Bean - @ConditionalOnMissingBean - public Troubleshooting troubleshooting(Glean glean) { - return glean.troubleshooting(); - } - /** - * Creates a Governance sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Governance instance - */ - @Bean - @ConditionalOnMissingBean - public Governance governance(Glean glean) { - return glean.governance(); - } - /** - * Creates a Datasources sub-SDK bean if none exists. - * - * @param glean the main SDK instance - * @return A configured Datasources instance - */ - @Bean - @ConditionalOnMissingBean - public Datasources datasources(Glean glean) { - return glean.datasources(); - } - - /** - * Creates the async SDK bean if none exists. - * - * @param glean the main SDK instance - * @param sdkConfiguration the configured SDKConfiguration bean - * @return A configured AsyncGlean instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncGlean asyncGlean(Glean glean, SDKConfiguration sdkConfiguration) { - return new AsyncGlean(glean, sdkConfiguration); - } - /** - * Creates an AsyncClient sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncClient instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncClient asyncClient(AsyncGlean asyncGlean) { - return asyncGlean.client(); - } - /** - * Creates an AsyncAuthentication sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncAuthentication instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncAuthentication asyncAuthentication(AsyncGlean asyncGlean) { - return asyncGlean.authentication(); - } - /** - * Creates an AsyncChat sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncChat instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncChat asyncChat(AsyncGlean asyncGlean) { - return asyncGlean.chat(); - } - /** - * Creates an AsyncAgents sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncAgents instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncAgents asyncAgents(AsyncGlean asyncGlean) { - return asyncGlean.agents(); - } - /** - * Creates an AsyncEntities sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncEntities instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncEntities asyncEntities(AsyncGlean asyncGlean) { - return asyncGlean.entities(); - } - /** - * Creates an AsyncTools sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncTools instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncTools asyncTools(AsyncGlean asyncGlean) { - return asyncGlean.tools(); - } - /** - * Creates an AsyncIndexing sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncIndexing instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncIndexing asyncIndexing(AsyncGlean asyncGlean) { - return asyncGlean.indexing(); - } - /** - * Creates an AsyncTroubleshooting sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncTroubleshooting instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncTroubleshooting asyncTroubleshooting(AsyncGlean asyncGlean) { - return asyncGlean.troubleshooting(); - } - /** - * Creates an AsyncGovernance sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncGovernance instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncGovernance asyncGovernance(AsyncGlean asyncGlean) { - return asyncGlean.governance(); - } - /** - * Creates an AsyncDatasources sub-SDK bean if none exists. - * - * @param asyncGlean the async SDK instance - * @return A configured AsyncDatasources instance - */ - @Bean - @ConditionalOnMissingBean - public AsyncDatasources asyncDatasources(AsyncGlean asyncGlean) { - return asyncGlean.datasources(); - } -} \ No newline at end of file diff --git a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfigProperties.java b/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfigProperties.java deleted file mode 100644 index ccfade08..00000000 --- a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfigProperties.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 5111ca066791 - */ -package com.glean.api_client.glean_api_client; - -import org.springframework.boot.context.properties.ConfigurationProperties; - -import java.time.Duration; -import java.lang.String; -import java.util.Collection; -import java.util.Set; - - -/** - * Spring Boot Configuration Properties for glean-api-client SDK - */ -@ConfigurationProperties(prefix = "gleanapiclient") -public class GleanApiClientAutoConfigProperties { - - /** - * Constructor. - */ - public GleanApiClientAutoConfigProperties() { - } - - /** - * The base URL for the API server. If not specified, the SDK will use the default server URL. - */ - private String serverUrl; - - /** - * Configuration for retry behavior when API calls fail due to transient errors. - */ - private RetryConfig retryConfig = new RetryConfig(); - - /** - * HTTP client configuration for API requests. - */ - private HttpClient httpClient = new HttpClient(); - /** - * The index of the server to use from the list of available servers (0-based). Defaults to the first server. - */ - private int serverIdx = 0; - /** - * Server variable configuration for parameterized server URLs defined in the OpenAPI specification. - */ - private ServerVariables serverVariables = new ServerVariables(); - /** - * Security configuration for API authentication. - */ - private Security security = new Security(); - - /** - * Gets the base URL for the API server. - * - * @return the base URL for the API server - */ - public String getServerUrl() { - return serverUrl; - } - - /** - * Sets the base URL for the API server. - * - * @param serverUrl the base URL for the API server - */ - public void setServerUrl(String serverUrl) { - this.serverUrl = serverUrl; - } - - /** - * Gets the retry configuration for API calls that fail due to transient errors. - * - * @return the retry configuration - */ - public RetryConfig getRetryConfig() { - return retryConfig; - } - - /** - * Sets the retry configuration for API calls that fail due to transient errors. - * - * @param retryConfig the retry configuration to use - */ - public void setRetryConfig(RetryConfig retryConfig) { - this.retryConfig = retryConfig; - } - - /** - * Gets the HTTP client configuration for API requests. - * - * @return the HTTP client configuration - */ - public HttpClient getHttpClient() { - return httpClient; - } - - /** - * Sets the HTTP client configuration for API requests. - * - * @param httpClient the HTTP client configuration to use - */ - public void setHttpClient(HttpClient httpClient) { - this.httpClient = httpClient; - } - /** - * Gets the index of the server to use from the list of available servers (0-based). - * - * @return the server index - */ - public int getServerIdx() { - return serverIdx; - } - - /** - * Sets the index of the server to use from the list of available servers (0-based). - * - * @param serverIdx the server index to use - */ - public void setServerIdx(int serverIdx) { - this.serverIdx = serverIdx; - } - /** - * Gets the server variable configuration for parameterized server URLs. - * - * @return the server variables configuration - */ - public ServerVariables getServerVariables() { - return serverVariables; - } - - /** - * Sets the server variable configuration for parameterized server URLs. - * - * @param serverVariables the server variables configuration to use - */ - public void setServerVariables(ServerVariables serverVariables) { - this.serverVariables = serverVariables; - } - /** - * Gets the security configuration for API authentication. - * - * @return the security configuration - */ - public Security getSecurity() { - return security; - } - - /** - * Sets the security configuration for API authentication. - * - * @param security the security configuration to use - */ - public void setSecurity(Security security) { - this.security = security; - } - - /** - * Retry configuration properties - */ - public static class RetryConfig { - - /** - * Constructor. - */ - public RetryConfig() { - } - - /** - * The retry strategy to use for failed requests. - */ - private com.glean.api_client.glean_api_client.utils.RetryConfig.Strategy strategy; - - /** - * Configuration for exponential backoff retry strategy. Only used when strategy is set to BACKOFF. - */ - private Backoff backoff = new Backoff(); - - /** - * Gets the retry strategy to use for failed requests. - * - * @return the retry strategy - */ - public com.glean.api_client.glean_api_client.utils.RetryConfig.Strategy getStrategy() { - return strategy; - } - - /** - * Sets the retry strategy to use for failed requests. - * - * @param strategy the retry strategy to use - */ - public void setStrategy(com.glean.api_client.glean_api_client.utils.RetryConfig.Strategy strategy) { - this.strategy = strategy; - } - - /** - * Gets the backoff configuration for exponential backoff retry strategy. - * - * @return the backoff configuration - */ - public Backoff getBackoff() { - return backoff; - } - - /** - * Sets the backoff configuration for exponential backoff retry strategy. - * - * @param backoff the backoff configuration to use - */ - public void setBackoff(Backoff backoff) { - this.backoff = backoff; - } - - /** - * Backoff retry configuration matching BackoffStrategy fields - */ - public static class Backoff { - - /** - * Constructor. - */ - public Backoff() { - } - - /** - * The initial delay before the first retry attempt. Supports duration formats like "500ms", "1s", "2m". - */ - private Duration initialInterval = Duration.ofMillis(500); - - /** - * The maximum delay between retry attempts. The backoff will not exceed this value. - */ - private Duration maxInterval = Duration.ofSeconds(60); - - /** - * The maximum total time to spend on all retry attempts. Retries will stop after this duration. - */ - private Duration maxElapsedTime = Duration.ofHours(1); - - /** - * The multiplier for exponential backoff. Each retry delay is multiplied by this factor (e.g., 1.5 means 50% increase). - */ - private double baseFactor = 1.5; - - /** - * Random jitter factor to avoid thundering herd problems. Value between 0.0 (no jitter) and 1.0 (full jitter). - */ - private double jitterFactor = 0.5; - - /** - * Whether to retry requests that fail due to connection errors (e.g., connection refused, timeout). - */ - private boolean retryConnectError = false; - - /** - * Whether to retry requests that fail due to read timeout errors (server doesn't respond within timeout). - */ - private boolean retryReadTimeoutError = false; - - /** - * Gets the initial delay before the first retry attempt. - * - * @return the initial delay duration - */ - public Duration getInitialInterval() { - return initialInterval; - } - - /** - * Sets the initial delay before the first retry attempt. - * - * @param initialInterval the initial delay duration - */ - public void setInitialInterval(Duration initialInterval) { - this.initialInterval = initialInterval; - } - - /** - * Gets the maximum delay between retry attempts. - * - * @return the maximum delay duration - */ - public Duration getMaxInterval() { - return maxInterval; - } - - /** - * Sets the maximum delay between retry attempts. - * - * @param maxInterval the maximum delay duration - */ - public void setMaxInterval(Duration maxInterval) { - this.maxInterval = maxInterval; - } - - /** - * Gets the maximum total time to spend on all retry attempts. - * - * @return the maximum elapsed time duration - */ - public Duration getMaxElapsedTime() { - return maxElapsedTime; - } - - /** - * Sets the maximum total time to spend on all retry attempts. - * - * @param maxElapsedTime the maximum elapsed time duration - */ - public void setMaxElapsedTime(Duration maxElapsedTime) { - this.maxElapsedTime = maxElapsedTime; - } - - /** - * Gets the multiplier for exponential backoff. - * - * @return the base factor for exponential backoff - */ - public double getBaseFactor() { - return baseFactor; - } - - /** - * Sets the multiplier for exponential backoff. - * - * @param baseFactor the base factor for exponential backoff - */ - public void setBaseFactor(double baseFactor) { - this.baseFactor = baseFactor; - } - - /** - * Gets the random jitter factor to avoid thundering herd problems. - * - * @return the jitter factor (0.0 to 1.0) - */ - public double getJitterFactor() { - return jitterFactor; - } - - /** - * Sets the random jitter factor to avoid thundering herd problems. - * - * @param jitterFactor the jitter factor (0.0 to 1.0) - */ - public void setJitterFactor(double jitterFactor) { - this.jitterFactor = jitterFactor; - } - - /** - * Gets whether to retry requests that fail due to connection errors. - * - * @return true if connection errors should be retried, false otherwise - */ - public boolean isRetryConnectError() { - return retryConnectError; - } - - /** - * Sets whether to retry requests that fail due to connection errors. - * - * @param retryConnectError true to retry connection errors, false otherwise - */ - public void setRetryConnectError(boolean retryConnectError) { - this.retryConnectError = retryConnectError; - } - - /** - * Gets whether to retry requests that fail due to read timeout errors. - * - * @return true if read timeout errors should be retried, false otherwise - */ - public boolean isRetryReadTimeoutError() { - return retryReadTimeoutError; - } - - /** - * Sets whether to retry requests that fail due to read timeout errors. - * - * @param retryReadTimeoutError true to retry read timeout errors, false otherwise - */ - public void setRetryReadTimeoutError(boolean retryReadTimeoutError) { - this.retryReadTimeoutError = retryReadTimeoutError; - } - } - } - - /** - * HTTP client configuration properties - */ - public static class HttpClient { - - /** - * Constructor. - */ - public HttpClient() { - } - - /** - * Whether to enable debug logging for HTTP requests and responses, including JSON body content. - */ - private boolean enableDebugLogging = false; - - /** - * Collection of header names (case-insensitive) whose values will be redacted in debug logs. - * By default, Authorization and X-API-KEY headers are redacted for security. - */ - private Collection redactedHeaders = Set.of("Authorization", "X-API-KEY"); - - /** - * Gets whether debug logging is enabled for HTTP requests and responses. - * - * @return true if debug logging is enabled, false otherwise - */ - public boolean isEnableDebugLogging() { - return enableDebugLogging; - } - - /** - * Sets whether to enable debug logging for HTTP requests and responses. - * - * @param enableDebugLogging true to enable debug logging, false otherwise - */ - public void setEnableDebugLogging(boolean enableDebugLogging) { - this.enableDebugLogging = enableDebugLogging; - } - - /** - * Gets the collection of header names whose values will be redacted in debug logs. - * - * @return the collection of header names to redact - */ - public Collection getRedactedHeaders() { - return redactedHeaders; - } - - /** - * Sets the collection of header names whose values will be redacted in debug logs. - * - * @param redactedHeaders the collection of header names to redact - */ - public void setRedactedHeaders(Collection redactedHeaders) { - this.redactedHeaders = redactedHeaders; - } - } - - /** - * Server variables configuration properties - */ - public static class ServerVariables { - - /** - * Constructor. - */ - public ServerVariables() { - } - - /** - * The instance name (typically the email domain without the TLD) that determines the deployment - * backend. - */ - private String instance = "instance-name"; - - /** - * Gets the instance server variable for URL substitution. - * - * @return the instance value - */ - public String getInstance() { - return instance; - } - - /** - * Sets the instance server variable for URL substitution. - * - * @param instance the instance value to use - */ - public void setInstance(String instance) { - this.instance = instance; - } - } - - /** - * Security configuration properties - */ - public static class Security { - - /** - * Constructor. - */ - public Security() { - } - /** - * APIToken for authentication. - */ - private String apiToken; - - /** - * Gets the APIToken value. - * - * @return the APIToken value - */ - public String getAPIToken() { - return apiToken; - } - - /** - * Sets the APIToken value. - * - * @param apiToken the APIToken value to use - */ - public void setAPIToken(String apiToken) { - this.apiToken = apiToken; - } - } -} \ No newline at end of file diff --git a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/OnPropertyPrefixCondition.java b/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/OnPropertyPrefixCondition.java deleted file mode 100644 index c5bf1eef..00000000 --- a/spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/OnPropertyPrefixCondition.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 269180435615 - */ -package com.glean.api_client.glean_api_client; - -import org.springframework.boot.autoconfigure.condition.ConditionMessage; -import org.springframework.boot.autoconfigure.condition.ConditionOutcome; -import org.springframework.boot.autoconfigure.condition.SpringBootCondition; -import org.springframework.boot.context.properties.bind.Binder; -import org.springframework.context.annotation.ConditionContext; -import org.springframework.core.type.AnnotatedTypeMetadata; -import org.springframework.core.env.Environment; - -import java.util.Map; - -/** - * Custom condition that checks if any properties exist under a given prefix. - * This is used to conditionally create beans only when configuration properties - * are present under a specific prefix. - */ -public class OnPropertyPrefixCondition extends SpringBootCondition { - - /** - * Default constructor for OnPropertyPrefixCondition. - */ - public OnPropertyPrefixCondition() { - // Default constructor - } - - @Override - public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { - Map attributes = metadata.getAnnotationAttributes(ConditionalOnPropertyPrefix.class.getName()); - if (attributes == null) { - return ConditionOutcome.noMatch("@ConditionalOnPropertyPrefix annotation not found"); - } - - String prefix = (String) attributes.get("prefix"); - if (prefix == null || prefix.isEmpty()) { - return ConditionOutcome.noMatch("Property prefix is empty"); - } - - Environment environment = context.getEnvironment(); - - // Check if any properties exist under the given prefix - boolean hasPropertiesUnderPrefix = hasPropertiesWithPrefix(environment, prefix); - - ConditionMessage.Builder message = ConditionMessage.forCondition(ConditionalOnPropertyPrefix.class, prefix); - - if (hasPropertiesUnderPrefix) { - return ConditionOutcome.match(message.found("properties").items(prefix + ".*")); - } else { - return ConditionOutcome.noMatch(message.didNotFind("properties").items(prefix + ".*")); - } - } - - private boolean hasPropertiesWithPrefix(Environment environment, String prefix) { - try { - // Use Spring Boot's Binder to check if any properties exist under the prefix - Binder binder = Binder.get(environment); - - // Try to bind to a Map to see if any properties exist under the prefix - return binder.bind(prefix, Map.class).isBound(); - } catch (Exception e) { - // If we can't determine, assume no properties exist - return false; - } - } -} \ No newline at end of file diff --git a/spring/glean-api-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring/glean-api-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 5b50a32f..00000000 --- a/spring/glean-api-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.glean.api_client.glean_api_client.GleanApiClientAutoConfig \ No newline at end of file diff --git a/spring/glean-api-client-spring-boot-starter/build.gradle b/spring/glean-api-client-spring-boot-starter/build.gradle deleted file mode 100644 index 35125984..00000000 --- a/spring/glean-api-client-spring-boot-starter/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -description = 'glean-api-client Spring Boot Starter' - -// Publishing configuration overrides -ext { - publishingConfig = [ - groupId: rootProject.group, - artifactId: 'glean-api-client-spring-boot-starter', - version: rootProject.version, - name: 'Glean Java SDK - Spring Boot Starter', - description: 'Spring Boot starter for the Glean Java SDK.', - ] -} - -dependencies { - api project(':') - api project(':glean-api-client-spring-boot-autoconfigure') - api "org.springframework.boot:spring-boot-starter:${rootProject.springBootVersion}" -} - -jar { - dependsOn 'generatePomFileForMavenPublication' - archiveBaseName = 'glean-api-client-spring-boot-starter' - into("META-INF/maven/com.glean.api-client/glean-api-client-spring-boot-starter") { - from(layout.buildDirectory.file("pom.xml")) { - // Only include if it exists to avoid build ordering issues - duplicatesStrategy = DuplicatesStrategy.INCLUDE - } - } -} \ No newline at end of file diff --git a/src/main/java/com/glean/api_client/glean_api_client/Agents.java b/src/main/java/com/glean/api_client/glean_api_client/Agents.java index 42ff73f8..bc56c524 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Agents.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Agents.java @@ -6,10 +6,15 @@ import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import com.glean.api_client.glean_api_client.models.components.CreateWorkflowRequest; import com.glean.api_client.glean_api_client.models.components.EditWorkflowRequest; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentRequest; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentResponse; import com.glean.api_client.glean_api_client.models.operations.EditAgentRequest; import com.glean.api_client.glean_api_client.models.operations.EditAgentRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.EditAgentResponse; +import com.glean.api_client.glean_api_client.operations.CreateAgent; import com.glean.api_client.glean_api_client.operations.EditAgent; import com.glean.api_client.glean_api_client.utils.Headers; import java.lang.Long; @@ -36,6 +41,56 @@ public AsyncAgents async() { return asyncSDK; } + /** + * Create an agent + * + *

Create an agent. + * + * @return The call builder + */ + public CreateAgentRequestBuilder createAgent() { + return new CreateAgentRequestBuilder(sdkConfiguration); + } + + /** + * Create an agent + * + *

Create an agent. + * + * @param createWorkflowRequest + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public CreateAgentResponse createAgent(CreateWorkflowRequest createWorkflowRequest) { + return createAgent(Optional.empty(), Optional.empty(), createWorkflowRequest); + } + + /** + * Create an agent + * + *

Create an agent. + * + * @param locale The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + * @param timezoneOffset The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + * @param createWorkflowRequest + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public CreateAgentResponse createAgent( + Optional locale, Optional timezoneOffset, + CreateWorkflowRequest createWorkflowRequest) { + CreateAgentRequest request = + CreateAgentRequest + .builder() + .locale(locale) + .timezoneOffset(timezoneOffset) + .createWorkflowRequest(createWorkflowRequest) + .build(); + RequestOperation operation + = new CreateAgent.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * Edit an agent * diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncAgents.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncAgents.java index dd04fd0e..fa11a40b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/AsyncAgents.java +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncAgents.java @@ -6,10 +6,15 @@ import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; +import com.glean.api_client.glean_api_client.models.components.CreateWorkflowRequest; import com.glean.api_client.glean_api_client.models.components.EditWorkflowRequest; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentRequest; import com.glean.api_client.glean_api_client.models.operations.EditAgentRequest; +import com.glean.api_client.glean_api_client.models.operations.async.CreateAgentRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.CreateAgentResponse; import com.glean.api_client.glean_api_client.models.operations.async.EditAgentRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.EditAgentResponse; +import com.glean.api_client.glean_api_client.operations.CreateAgent; import com.glean.api_client.glean_api_client.operations.EditAgent; import com.glean.api_client.glean_api_client.utils.Headers; import java.lang.Long; @@ -38,6 +43,56 @@ public Agents sync() { } + /** + * Create an agent + * + *

Create an agent. + * + * @return The async call builder + */ + public CreateAgentRequestBuilder createAgent() { + return new CreateAgentRequestBuilder(sdkConfiguration); + } + + /** + * Create an agent + * + *

Create an agent. + * + * @param createWorkflowRequest + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture createAgent(CreateWorkflowRequest createWorkflowRequest) { + return createAgent(Optional.empty(), Optional.empty(), createWorkflowRequest); + } + + /** + * Create an agent + * + *

Create an agent. + * + * @param locale The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + * @param timezoneOffset The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + * @param createWorkflowRequest + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture createAgent( + Optional locale, Optional timezoneOffset, + CreateWorkflowRequest createWorkflowRequest) { + CreateAgentRequest request = + CreateAgentRequest + .builder() + .locale(locale) + .timezoneOffset(timezoneOffset) + .createWorkflowRequest(createWorkflowRequest) + .build(); + AsyncRequestOperation operation + = new CreateAgent.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + /** * Edit an agent * diff --git a/src/main/java/com/glean/api_client/glean_api_client/Glean.java b/src/main/java/com/glean/api_client/glean_api_client/Glean.java index 7df143d9..6daa8699 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Glean.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Glean.java @@ -305,7 +305,7 @@ public static Builder builder() { return new Builder(); } - public Glean(SDKConfiguration sdkConfiguration) { + private Glean(SDKConfiguration sdkConfiguration) { sdkConfiguration.initialize(); this.client = new Client(sdkConfiguration); this.authentication = new Authentication(sdkConfiguration); diff --git a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java index 85a9705d..01a82e37 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java +++ b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java @@ -25,8 +25,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.9.0"; - public static final String SDK_VERSION = "0.13.1"; - public static final String GEN_VERSION = "2.893.0"; + public static final String SDK_VERSION = "0.13.2"; + public static final String GEN_VERSION = "2.911.0"; private static final String BASE_PACKAGE = "com.glean.api_client.glean_api_client"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java index 7763b5d9..6d0df2f2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java @@ -19,8 +19,8 @@ /** * AllowlistOptions * - *

Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a - * term in the allow-list, it will not be counted as a violation. + *

Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly + * matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. */ public class AllowlistOptions { /** @@ -30,15 +30,25 @@ public class AllowlistOptions { @JsonProperty("terms") private Optional> terms; + /** + * list of regular expressions whose matches are considered whitelisted content + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("regexes") + private Optional> regexes; + @JsonCreator public AllowlistOptions( - @JsonProperty("terms") Optional> terms) { + @JsonProperty("terms") Optional> terms, + @JsonProperty("regexes") Optional> regexes) { Utils.checkNotNull(terms, "terms"); + Utils.checkNotNull(regexes, "regexes"); this.terms = terms; + this.regexes = regexes; } public AllowlistOptions() { - this(Optional.empty()); + this(Optional.empty(), Optional.empty()); } /** @@ -50,6 +60,15 @@ public Optional> terms() { return (Optional>) terms; } + /** + * list of regular expressions whose matches are considered whitelisted content + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> regexes() { + return (Optional>) regexes; + } + public static Builder builder() { return new Builder(); } @@ -74,6 +93,25 @@ public AllowlistOptions withTerms(Optional> terms) { return this; } + /** + * list of regular expressions whose matches are considered whitelisted content + */ + public AllowlistOptions withRegexes(List regexes) { + Utils.checkNotNull(regexes, "regexes"); + this.regexes = Optional.ofNullable(regexes); + return this; + } + + + /** + * list of regular expressions whose matches are considered whitelisted content + */ + public AllowlistOptions withRegexes(Optional> regexes) { + Utils.checkNotNull(regexes, "regexes"); + this.regexes = regexes; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -84,19 +122,21 @@ public boolean equals(java.lang.Object o) { } AllowlistOptions other = (AllowlistOptions) o; return - Utils.enhancedDeepEquals(this.terms, other.terms); + Utils.enhancedDeepEquals(this.terms, other.terms) && + Utils.enhancedDeepEquals(this.regexes, other.regexes); } @Override public int hashCode() { return Utils.enhancedHash( - terms); + terms, regexes); } @Override public String toString() { return Utils.toString(AllowlistOptions.class, - "terms", terms); + "terms", terms, + "regexes", regexes); } @SuppressWarnings("UnusedReturnValue") @@ -104,6 +144,8 @@ public final static class Builder { private Optional> terms = Optional.empty(); + private Optional> regexes = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -127,10 +169,29 @@ public Builder terms(Optional> terms) { return this; } + + /** + * list of regular expressions whose matches are considered whitelisted content + */ + public Builder regexes(List regexes) { + Utils.checkNotNull(regexes, "regexes"); + this.regexes = Optional.ofNullable(regexes); + return this; + } + + /** + * list of regular expressions whose matches are considered whitelisted content + */ + public Builder regexes(Optional> regexes) { + Utils.checkNotNull(regexes, "regexes"); + this.regexes = regexes; + return this; + } + public AllowlistOptions build() { return new AllowlistOptions( - terms); + terms, regexes); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateWorkflowRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateWorkflowRequest.java new file mode 100644 index 00000000..1b1c289f --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateWorkflowRequest.java @@ -0,0 +1,250 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5787c28d8983 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class CreateWorkflowRequest { + /** + * The name of the workflow. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + /** + * Used to create a transient workflow. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transient") + private Optional transient_; + + /** + * id of the parent workflow for transient workflows + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parentWorkflowId") + private Optional parentWorkflowId; + + @JsonCreator + public CreateWorkflowRequest( + @JsonProperty("name") Optional name, + @JsonProperty("transient") Optional transient_, + @JsonProperty("parentWorkflowId") Optional parentWorkflowId) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(transient_, "transient_"); + Utils.checkNotNull(parentWorkflowId, "parentWorkflowId"); + this.name = name; + this.transient_ = transient_; + this.parentWorkflowId = parentWorkflowId; + } + + public CreateWorkflowRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The name of the workflow. + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * Used to create a transient workflow. + */ + @JsonIgnore + public Optional transient_() { + return transient_; + } + + /** + * id of the parent workflow for transient workflows + */ + @JsonIgnore + public Optional parentWorkflowId() { + return parentWorkflowId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The name of the workflow. + */ + public CreateWorkflowRequest withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * The name of the workflow. + */ + public CreateWorkflowRequest withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * Used to create a transient workflow. + */ + public CreateWorkflowRequest withTransient(boolean transient_) { + Utils.checkNotNull(transient_, "transient_"); + this.transient_ = Optional.ofNullable(transient_); + return this; + } + + + /** + * Used to create a transient workflow. + */ + public CreateWorkflowRequest withTransient(Optional transient_) { + Utils.checkNotNull(transient_, "transient_"); + this.transient_ = transient_; + return this; + } + + /** + * id of the parent workflow for transient workflows + */ + public CreateWorkflowRequest withParentWorkflowId(String parentWorkflowId) { + Utils.checkNotNull(parentWorkflowId, "parentWorkflowId"); + this.parentWorkflowId = Optional.ofNullable(parentWorkflowId); + return this; + } + + + /** + * id of the parent workflow for transient workflows + */ + public CreateWorkflowRequest withParentWorkflowId(Optional parentWorkflowId) { + Utils.checkNotNull(parentWorkflowId, "parentWorkflowId"); + this.parentWorkflowId = parentWorkflowId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWorkflowRequest other = (CreateWorkflowRequest) o; + return + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.transient_, other.transient_) && + Utils.enhancedDeepEquals(this.parentWorkflowId, other.parentWorkflowId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + name, transient_, parentWorkflowId); + } + + @Override + public String toString() { + return Utils.toString(CreateWorkflowRequest.class, + "name", name, + "transient_", transient_, + "parentWorkflowId", parentWorkflowId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional name = Optional.empty(); + + private Optional transient_ = Optional.empty(); + + private Optional parentWorkflowId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The name of the workflow. + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the workflow. + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * Used to create a transient workflow. + */ + public Builder transient_(boolean transient_) { + Utils.checkNotNull(transient_, "transient_"); + this.transient_ = Optional.ofNullable(transient_); + return this; + } + + /** + * Used to create a transient workflow. + */ + public Builder transient_(Optional transient_) { + Utils.checkNotNull(transient_, "transient_"); + this.transient_ = transient_; + return this; + } + + + /** + * id of the parent workflow for transient workflows + */ + public Builder parentWorkflowId(String parentWorkflowId) { + Utils.checkNotNull(parentWorkflowId, "parentWorkflowId"); + this.parentWorkflowId = Optional.ofNullable(parentWorkflowId); + return this; + } + + /** + * id of the parent workflow for transient workflows + */ + public Builder parentWorkflowId(Optional parentWorkflowId) { + Utils.checkNotNull(parentWorkflowId, "parentWorkflowId"); + this.parentWorkflowId = parentWorkflowId; + return this; + } + + public CreateWorkflowRequest build() { + + return new CreateWorkflowRequest( + name, transient_, parentWorkflowId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java index 5bf70eee..036873e4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java @@ -472,7 +472,6 @@ public Optional redlistTitleRegex() { return redlistTitleRegex; } - @SuppressWarnings("unchecked") @JsonIgnore public Optional connectorType() { @@ -883,7 +882,6 @@ public CustomDatasourceConfig withRedlistTitleRegex(Optional redlistTitl return this; } - public CustomDatasourceConfig withConnectorType(CustomDatasourceConfigConnectorType connectorType) { Utils.checkNotNull(connectorType, "connectorType"); this.connectorType = Optional.ofNullable(connectorType); @@ -891,7 +889,6 @@ public CustomDatasourceConfig withConnectorType(CustomDatasourceConfigConnectorT } - public CustomDatasourceConfig withConnectorType(Optional connectorType) { Utils.checkNotNull(connectorType, "connectorType"); this.connectorType = connectorType; @@ -1584,14 +1581,12 @@ public Builder redlistTitleRegex(Optional redlistTitleRegex) { } - public Builder connectorType(CustomDatasourceConfigConnectorType connectorType) { Utils.checkNotNull(connectorType, "connectorType"); this.connectorType = Optional.ofNullable(connectorType); return this; } - public Builder connectorType(Optional connectorType) { Utils.checkNotNull(connectorType, "connectorType"); this.connectorType = connectorType; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java index 85dce0df..a76da10f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java @@ -113,8 +113,8 @@ public class DlpConfig { private Optional autoHideDocs; /** - * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a - * term in the allow-list, it will not be counted as a violation. + * Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly + * matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("allowlistOptions") @@ -276,8 +276,8 @@ public Optional autoHideDocs() { } /** - * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a - * term in the allow-list, it will not be counted as a violation. + * Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly + * matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -523,8 +523,8 @@ public DlpConfig withAutoHideDocs(Optional autoHideDocs) { } /** - * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a - * term in the allow-list, it will not be counted as a violation. + * Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly + * matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. */ public DlpConfig withAllowlistOptions(AllowlistOptions allowlistOptions) { Utils.checkNotNull(allowlistOptions, "allowlistOptions"); @@ -534,8 +534,8 @@ public DlpConfig withAllowlistOptions(AllowlistOptions allowlistOptions) { /** - * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a - * term in the allow-list, it will not be counted as a violation. + * Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly + * matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. */ public DlpConfig withAllowlistOptions(Optional allowlistOptions) { Utils.checkNotNull(allowlistOptions, "allowlistOptions"); @@ -865,8 +865,8 @@ public Builder autoHideDocs(Optional autoHideDocs) { /** - * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a - * term in the allow-list, it will not be counted as a violation. + * Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly + * matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. */ public Builder allowlistOptions(AllowlistOptions allowlistOptions) { Utils.checkNotNull(allowlistOptions, "allowlistOptions"); @@ -875,8 +875,8 @@ public Builder allowlistOptions(AllowlistOptions allowlistOptions) { } /** - * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a - * term in the allow-list, it will not be counted as a violation. + * Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly + * matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. */ public Builder allowlistOptions(Optional allowlistOptions) { Utils.checkNotNull(allowlistOptions, "allowlistOptions"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java index f0d7c120..5a820ad3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java @@ -42,6 +42,7 @@ public enum FeedRequestCategory { MID_DAY_CATCH_UP("MID_DAY_CATCH_UP"), QUERY_SUGGESTION("QUERY_SUGGESTION"), COWORK_CUJ_PROMO("COWORK_CUJ_PROMO"), + CARD_STACK_PROMO("CARD_STACK_PROMO"), WEEKLY_MEETINGS("WEEKLY_MEETINGS"), FOLLOW_UP("FOLLOW_UP"), MILESTONE_TIMELINE_CHECK("MILESTONE_TIMELINE_CHECK"), diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java index d48710af..32750e39 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java @@ -43,27 +43,38 @@ public class FeedResult { @JsonProperty("rank") private Optional rank; + /** + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. + * PROMO means the card was inserted by the homepage cards promo framework. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("placementReason") + private Optional placementReason; + @JsonCreator public FeedResult( @JsonProperty("category") FeedResultCategory category, @JsonProperty("primaryEntry") FeedEntry primaryEntry, @JsonProperty("secondaryEntries") Optional> secondaryEntries, - @JsonProperty("rank") Optional rank) { + @JsonProperty("rank") Optional rank, + @JsonProperty("placementReason") Optional placementReason) { Utils.checkNotNull(category, "category"); Utils.checkNotNull(primaryEntry, "primaryEntry"); Utils.checkNotNull(secondaryEntries, "secondaryEntries"); Utils.checkNotNull(rank, "rank"); + Utils.checkNotNull(placementReason, "placementReason"); this.category = category; this.primaryEntry = primaryEntry; this.secondaryEntries = secondaryEntries; this.rank = rank; + this.placementReason = placementReason; } public FeedResult( FeedResultCategory category, FeedEntry primaryEntry) { this(category, primaryEntry, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -96,6 +107,16 @@ public Optional rank() { return rank; } + /** + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. + * PROMO means the card was inserted by the homepage cards promo framework. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional placementReason() { + return (Optional) placementReason; + } + public static Builder builder() { return new Builder(); } @@ -154,6 +175,27 @@ public FeedResult withRank(Optional rank) { return this; } + /** + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. + * PROMO means the card was inserted by the homepage cards promo framework. + */ + public FeedResult withPlacementReason(PlacementReason placementReason) { + Utils.checkNotNull(placementReason, "placementReason"); + this.placementReason = Optional.ofNullable(placementReason); + return this; + } + + + /** + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. + * PROMO means the card was inserted by the homepage cards promo framework. + */ + public FeedResult withPlacementReason(Optional placementReason) { + Utils.checkNotNull(placementReason, "placementReason"); + this.placementReason = placementReason; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -167,14 +209,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.category, other.category) && Utils.enhancedDeepEquals(this.primaryEntry, other.primaryEntry) && Utils.enhancedDeepEquals(this.secondaryEntries, other.secondaryEntries) && - Utils.enhancedDeepEquals(this.rank, other.rank); + Utils.enhancedDeepEquals(this.rank, other.rank) && + Utils.enhancedDeepEquals(this.placementReason, other.placementReason); } @Override public int hashCode() { return Utils.enhancedHash( category, primaryEntry, secondaryEntries, - rank); + rank, placementReason); } @Override @@ -183,7 +226,8 @@ public String toString() { "category", category, "primaryEntry", primaryEntry, "secondaryEntries", secondaryEntries, - "rank", rank); + "rank", rank, + "placementReason", placementReason); } @SuppressWarnings("UnusedReturnValue") @@ -197,6 +241,8 @@ public final static class Builder { private Optional rank = Optional.empty(); + private Optional placementReason = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -256,11 +302,32 @@ public Builder rank(Optional rank) { return this; } + + /** + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. + * PROMO means the card was inserted by the homepage cards promo framework. + */ + public Builder placementReason(PlacementReason placementReason) { + Utils.checkNotNull(placementReason, "placementReason"); + this.placementReason = Optional.ofNullable(placementReason); + return this; + } + + /** + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. + * PROMO means the card was inserted by the homepage cards promo framework. + */ + public Builder placementReason(Optional placementReason) { + Utils.checkNotNull(placementReason, "placementReason"); + this.placementReason = placementReason; + return this; + } + public FeedResult build() { return new FeedResult( category, primaryEntry, secondaryEntries, - rank); + rank, placementReason); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java index 3a0dbce9..d6293d33 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java @@ -58,6 +58,7 @@ public class FeedResultCategory { public static final FeedResultCategory MID_DAY_CATCH_UP = new FeedResultCategory("MID_DAY_CATCH_UP"); public static final FeedResultCategory QUERY_SUGGESTION = new FeedResultCategory("QUERY_SUGGESTION"); public static final FeedResultCategory COWORK_CUJ_PROMO = new FeedResultCategory("COWORK_CUJ_PROMO"); + public static final FeedResultCategory CARD_STACK_PROMO = new FeedResultCategory("CARD_STACK_PROMO"); public static final FeedResultCategory WEEKLY_MEETINGS = new FeedResultCategory("WEEKLY_MEETINGS"); public static final FeedResultCategory FOLLOW_UP = new FeedResultCategory("FOLLOW_UP"); public static final FeedResultCategory MILESTONE_TIMELINE_CHECK = new FeedResultCategory("MILESTONE_TIMELINE_CHECK"); @@ -172,6 +173,7 @@ private static final Map createValuesMap() { map.put("MID_DAY_CATCH_UP", MID_DAY_CATCH_UP); map.put("QUERY_SUGGESTION", QUERY_SUGGESTION); map.put("COWORK_CUJ_PROMO", COWORK_CUJ_PROMO); + map.put("CARD_STACK_PROMO", CARD_STACK_PROMO); map.put("WEEKLY_MEETINGS", WEEKLY_MEETINGS); map.put("FOLLOW_UP", FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", MILESTONE_TIMELINE_CHECK); @@ -218,6 +220,7 @@ private static final Map createEnumsMap() { map.put("MID_DAY_CATCH_UP", FeedResultCategoryEnum.MID_DAY_CATCH_UP); map.put("QUERY_SUGGESTION", FeedResultCategoryEnum.QUERY_SUGGESTION); map.put("COWORK_CUJ_PROMO", FeedResultCategoryEnum.COWORK_CUJ_PROMO); + map.put("CARD_STACK_PROMO", FeedResultCategoryEnum.CARD_STACK_PROMO); map.put("WEEKLY_MEETINGS", FeedResultCategoryEnum.WEEKLY_MEETINGS); map.put("FOLLOW_UP", FeedResultCategoryEnum.FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", FeedResultCategoryEnum.MILESTONE_TIMELINE_CHECK); @@ -265,6 +268,7 @@ public enum FeedResultCategoryEnum { MID_DAY_CATCH_UP("MID_DAY_CATCH_UP"), QUERY_SUGGESTION("QUERY_SUGGESTION"), COWORK_CUJ_PROMO("COWORK_CUJ_PROMO"), + CARD_STACK_PROMO("CARD_STACK_PROMO"), WEEKLY_MEETINGS("WEEKLY_MEETINGS"), FOLLOW_UP("FOLLOW_UP"), MILESTONE_TIMELINE_CHECK("MILESTONE_TIMELINE_CHECK"), diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GroupType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GroupType.java index 31925868..bb3a832d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GroupType.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GroupType.java @@ -34,6 +34,7 @@ public class GroupType { public static final GroupType LOCATION = new GroupType("LOCATION"); public static final GroupType REGION = new GroupType("REGION"); public static final GroupType EXTERNAL_GROUP = new GroupType("EXTERNAL_GROUP"); + public static final GroupType COLLECTION_AUDIENCE = new GroupType("COLLECTION_AUDIENCE"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -115,6 +116,7 @@ private static final Map createValuesMap() { map.put("LOCATION", LOCATION); map.put("REGION", REGION); map.put("EXTERNAL_GROUP", EXTERNAL_GROUP); + map.put("COLLECTION_AUDIENCE", COLLECTION_AUDIENCE); return map; } @@ -128,6 +130,7 @@ private static final Map createEnumsMap() { map.put("LOCATION", GroupTypeEnum.LOCATION); map.put("REGION", GroupTypeEnum.REGION); map.put("EXTERNAL_GROUP", GroupTypeEnum.EXTERNAL_GROUP); + map.put("COLLECTION_AUDIENCE", GroupTypeEnum.COLLECTION_AUDIENCE); return map; } @@ -141,7 +144,8 @@ public enum GroupTypeEnum { ROLE_TYPE("ROLE_TYPE"), LOCATION("LOCATION"), REGION("REGION"), - EXTERNAL_GROUP("EXTERNAL_GROUP"),; + EXTERNAL_GROUP("EXTERNAL_GROUP"), + COLLECTION_AUDIENCE("COLLECTION_AUDIENCE"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java index dd0e56fa..1ecff28c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java @@ -71,6 +71,7 @@ public class JustificationType { public static final JustificationType MID_DAY_CATCH_UP = new JustificationType("MID_DAY_CATCH_UP"); public static final JustificationType QUERY_SUGGESTION = new JustificationType("QUERY_SUGGESTION"); public static final JustificationType COWORK_CUJ_PROMO = new JustificationType("COWORK_CUJ_PROMO"); + public static final JustificationType CARD_STACK_PROMO = new JustificationType("CARD_STACK_PROMO"); public static final JustificationType WEEKLY_MEETINGS = new JustificationType("WEEKLY_MEETINGS"); public static final JustificationType FOLLOW_UP = new JustificationType("FOLLOW_UP"); public static final JustificationType MILESTONE_TIMELINE_CHECK = new JustificationType("MILESTONE_TIMELINE_CHECK"); @@ -198,6 +199,7 @@ private static final Map createValuesMap() { map.put("MID_DAY_CATCH_UP", MID_DAY_CATCH_UP); map.put("QUERY_SUGGESTION", QUERY_SUGGESTION); map.put("COWORK_CUJ_PROMO", COWORK_CUJ_PROMO); + map.put("CARD_STACK_PROMO", CARD_STACK_PROMO); map.put("WEEKLY_MEETINGS", WEEKLY_MEETINGS); map.put("FOLLOW_UP", FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", MILESTONE_TIMELINE_CHECK); @@ -257,6 +259,7 @@ private static final Map createEnumsMap() { map.put("MID_DAY_CATCH_UP", JustificationTypeEnum.MID_DAY_CATCH_UP); map.put("QUERY_SUGGESTION", JustificationTypeEnum.QUERY_SUGGESTION); map.put("COWORK_CUJ_PROMO", JustificationTypeEnum.COWORK_CUJ_PROMO); + map.put("CARD_STACK_PROMO", JustificationTypeEnum.CARD_STACK_PROMO); map.put("WEEKLY_MEETINGS", JustificationTypeEnum.WEEKLY_MEETINGS); map.put("FOLLOW_UP", JustificationTypeEnum.FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", JustificationTypeEnum.MILESTONE_TIMELINE_CHECK); @@ -317,6 +320,7 @@ public enum JustificationTypeEnum { MID_DAY_CATCH_UP("MID_DAY_CATCH_UP"), QUERY_SUGGESTION("QUERY_SUGGESTION"), COWORK_CUJ_PROMO("COWORK_CUJ_PROMO"), + CARD_STACK_PROMO("CARD_STACK_PROMO"), WEEKLY_MEETINGS("WEEKLY_MEETINGS"), FOLLOW_UP("FOLLOW_UP"), MILESTONE_TIMELINE_CHECK("MILESTONE_TIMELINE_CHECK"), diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlacementReason.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlacementReason.java new file mode 100644 index 00000000..e50763a3 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlacementReason.java @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 37484b3af112 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * PlacementReason + * + *

Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. + * PROMO means the card was inserted by the homepage cards promo framework. + */ +public class PlacementReason { + + public static final PlacementReason ORGANIC = new PlacementReason("ORGANIC"); + public static final PlacementReason PROMO = new PlacementReason("PROMO"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private PlacementReason(String value) { + this.value = value; + } + + /** + * Returns a PlacementReason with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as PlacementReason + */ + @JsonCreator + public static PlacementReason of(String value) { + synchronized (PlacementReason.class) { + return values.computeIfAbsent(value, v -> new PlacementReason(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PlacementReason other = (PlacementReason) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "PlacementReason [value=" + value + "]"; + } + + // return an array just like an enum + public static PlacementReason[] values() { + synchronized (PlacementReason.class) { + return values.values().toArray(new PlacementReason[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("ORGANIC", ORGANIC); + map.put("PROMO", PROMO); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("ORGANIC", PlacementReasonEnum.ORGANIC); + map.put("PROMO", PlacementReasonEnum.PROMO); + return map; + } + + + public enum PlacementReasonEnum { + + ORGANIC("ORGANIC"), + PROMO("PROMO"),; + + private final String value; + + private PlacementReasonEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequest.java new file mode 100644 index 00000000..cc0d6fff --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequest.java @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 177d8e375f2b + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.CreateWorkflowRequest; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class CreateAgentRequest { + /** + * The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the + * `Accept-Language` will be used. + * + *

If not present or not supported, defaults to the closest match or `en`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=locale") + private Optional locale; + + /** + * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours + * behind UTC. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timezoneOffset") + private Optional timezoneOffset; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private CreateWorkflowRequest createWorkflowRequest; + + @JsonCreator + public CreateAgentRequest( + Optional locale, + Optional timezoneOffset, + CreateWorkflowRequest createWorkflowRequest) { + Utils.checkNotNull(locale, "locale"); + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + Utils.checkNotNull(createWorkflowRequest, "createWorkflowRequest"); + this.locale = locale; + this.timezoneOffset = timezoneOffset; + this.createWorkflowRequest = createWorkflowRequest; + } + + public CreateAgentRequest( + CreateWorkflowRequest createWorkflowRequest) { + this(Optional.empty(), Optional.empty(), createWorkflowRequest); + } + + /** + * The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the + * `Accept-Language` will be used. + * + *

If not present or not supported, defaults to the closest match or `en`. + */ + @JsonIgnore + public Optional locale() { + return locale; + } + + /** + * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours + * behind UTC. + */ + @JsonIgnore + public Optional timezoneOffset() { + return timezoneOffset; + } + + @JsonIgnore + public CreateWorkflowRequest createWorkflowRequest() { + return createWorkflowRequest; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the + * `Accept-Language` will be used. + * + *

If not present or not supported, defaults to the closest match or `en`. + */ + public CreateAgentRequest withLocale(String locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = Optional.ofNullable(locale); + return this; + } + + + /** + * The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the + * `Accept-Language` will be used. + * + *

If not present or not supported, defaults to the closest match or `en`. + */ + public CreateAgentRequest withLocale(Optional locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = locale; + return this; + } + + /** + * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours + * behind UTC. + */ + public CreateAgentRequest withTimezoneOffset(long timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = Optional.ofNullable(timezoneOffset); + return this; + } + + + /** + * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours + * behind UTC. + */ + public CreateAgentRequest withTimezoneOffset(Optional timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = timezoneOffset; + return this; + } + + public CreateAgentRequest withCreateWorkflowRequest(CreateWorkflowRequest createWorkflowRequest) { + Utils.checkNotNull(createWorkflowRequest, "createWorkflowRequest"); + this.createWorkflowRequest = createWorkflowRequest; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAgentRequest other = (CreateAgentRequest) o; + return + Utils.enhancedDeepEquals(this.locale, other.locale) && + Utils.enhancedDeepEquals(this.timezoneOffset, other.timezoneOffset) && + Utils.enhancedDeepEquals(this.createWorkflowRequest, other.createWorkflowRequest); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + locale, timezoneOffset, createWorkflowRequest); + } + + @Override + public String toString() { + return Utils.toString(CreateAgentRequest.class, + "locale", locale, + "timezoneOffset", timezoneOffset, + "createWorkflowRequest", createWorkflowRequest); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional locale = Optional.empty(); + + private Optional timezoneOffset = Optional.empty(); + + private CreateWorkflowRequest createWorkflowRequest; + + private Builder() { + // force use of static builder() method + } + + + /** + * The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the + * `Accept-Language` will be used. + * + *

If not present or not supported, defaults to the closest match or `en`. + */ + public Builder locale(String locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = Optional.ofNullable(locale); + return this; + } + + /** + * The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the + * `Accept-Language` will be used. + * + *

If not present or not supported, defaults to the closest match or `en`. + */ + public Builder locale(Optional locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = locale; + return this; + } + + + /** + * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours + * behind UTC. + */ + public Builder timezoneOffset(long timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = Optional.ofNullable(timezoneOffset); + return this; + } + + /** + * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours + * behind UTC. + */ + public Builder timezoneOffset(Optional timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = timezoneOffset; + return this; + } + + + public Builder createWorkflowRequest(CreateWorkflowRequest createWorkflowRequest) { + Utils.checkNotNull(createWorkflowRequest, "createWorkflowRequest"); + this.createWorkflowRequest = createWorkflowRequest; + return this; + } + + public CreateAgentRequest build() { + + return new CreateAgentRequest( + locale, timezoneOffset, createWorkflowRequest); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequestBuilder.java new file mode 100644 index 00000000..5b139437 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentRequestBuilder.java @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7b7da64e250d + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.components.CreateWorkflowRequest; +import com.glean.api_client.glean_api_client.operations.CreateAgent; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + +public class CreateAgentRequestBuilder { + + private Optional locale = Optional.empty(); + private Optional timezoneOffset = Optional.empty(); + private CreateWorkflowRequest createWorkflowRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public CreateAgentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateAgentRequestBuilder locale(String locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = Optional.of(locale); + return this; + } + + public CreateAgentRequestBuilder locale(Optional locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = locale; + return this; + } + + public CreateAgentRequestBuilder timezoneOffset(long timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = Optional.of(timezoneOffset); + return this; + } + + public CreateAgentRequestBuilder timezoneOffset(Optional timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = timezoneOffset; + return this; + } + + public CreateAgentRequestBuilder createWorkflowRequest(CreateWorkflowRequest createWorkflowRequest) { + Utils.checkNotNull(createWorkflowRequest, "createWorkflowRequest"); + this.createWorkflowRequest = createWorkflowRequest; + return this; + } + + + private CreateAgentRequest buildRequest() { + + CreateAgentRequest request = new CreateAgentRequest(locale, + timezoneOffset, + createWorkflowRequest); + + return request; + } + + public CreateAgentResponse call() { + + RequestOperation operation + = new CreateAgent.Sync(sdkConfiguration, _headers); + CreateAgentRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentResponse.java new file mode 100644 index 00000000..f8bb1d83 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAgentResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8d1ea0305afe + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.WorkflowResult; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class CreateAgentResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Success + */ + private Optional workflowResult; + + @JsonCreator + public CreateAgentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional workflowResult) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(workflowResult, "workflowResult"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.workflowResult = workflowResult; + } + + public CreateAgentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional workflowResult() { + return (Optional) workflowResult; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateAgentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateAgentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateAgentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public CreateAgentResponse withWorkflowResult(WorkflowResult workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = Optional.ofNullable(workflowResult); + return this; + } + + + /** + * Success + */ + public CreateAgentResponse withWorkflowResult(Optional workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = workflowResult; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAgentResponse other = (CreateAgentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.workflowResult, other.workflowResult); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + workflowResult); + } + + @Override + public String toString() { + return Utils.toString(CreateAgentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "workflowResult", workflowResult); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional workflowResult = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Success + */ + public Builder workflowResult(WorkflowResult workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = Optional.ofNullable(workflowResult); + return this; + } + + /** + * Success + */ + public Builder workflowResult(Optional workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = workflowResult; + return this; + } + + public CreateAgentResponse build() { + + return new CreateAgentResponse( + contentType, statusCode, rawResponse, + workflowResult); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentRequestBuilder.java new file mode 100644 index 00000000..7d2e9a9c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3c6b45f64178 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.components.CreateWorkflowRequest; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentRequest; +import com.glean.api_client.glean_api_client.operations.CreateAgent; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class CreateAgentRequestBuilder { + + private Optional locale = Optional.empty(); + private Optional timezoneOffset = Optional.empty(); + private CreateWorkflowRequest createWorkflowRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public CreateAgentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateAgentRequestBuilder locale(String locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = Optional.of(locale); + return this; + } + + public CreateAgentRequestBuilder locale(Optional locale) { + Utils.checkNotNull(locale, "locale"); + this.locale = locale; + return this; + } + + public CreateAgentRequestBuilder timezoneOffset(long timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = Optional.of(timezoneOffset); + return this; + } + + public CreateAgentRequestBuilder timezoneOffset(Optional timezoneOffset) { + Utils.checkNotNull(timezoneOffset, "timezoneOffset"); + this.timezoneOffset = timezoneOffset; + return this; + } + + public CreateAgentRequestBuilder createWorkflowRequest(CreateWorkflowRequest createWorkflowRequest) { + Utils.checkNotNull(createWorkflowRequest, "createWorkflowRequest"); + this.createWorkflowRequest = createWorkflowRequest; + return this; + } + + + private CreateAgentRequest buildRequest() { + + CreateAgentRequest request = new CreateAgentRequest(locale, + timezoneOffset, + createWorkflowRequest); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new CreateAgent.Async(sdkConfiguration, _headers); + CreateAgentRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentResponse.java new file mode 100644 index 00000000..91c283e2 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/CreateAgentResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3d342a42df89 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.WorkflowResult; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class CreateAgentResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Success + */ + private Optional workflowResult; + + @JsonCreator + public CreateAgentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional workflowResult) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(workflowResult, "workflowResult"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.workflowResult = workflowResult; + } + + public CreateAgentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional workflowResult() { + return (Optional) workflowResult; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateAgentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateAgentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateAgentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public CreateAgentResponse withWorkflowResult(WorkflowResult workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = Optional.ofNullable(workflowResult); + return this; + } + + + /** + * Success + */ + public CreateAgentResponse withWorkflowResult(Optional workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = workflowResult; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAgentResponse other = (CreateAgentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.workflowResult, other.workflowResult); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + workflowResult); + } + + @Override + public String toString() { + return Utils.toString(CreateAgentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "workflowResult", workflowResult); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional workflowResult = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Success + */ + public Builder workflowResult(WorkflowResult workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = Optional.ofNullable(workflowResult); + return this; + } + + /** + * Success + */ + public Builder workflowResult(Optional workflowResult) { + Utils.checkNotNull(workflowResult, "workflowResult"); + this.workflowResult = workflowResult; + return this; + } + + public CreateAgentResponse build() { + + return new CreateAgentResponse( + contentType, statusCode, rawResponse, + workflowResult); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/CreateAgent.java b/src/main/java/com/glean/api_client/glean_api_client/operations/CreateAgent.java new file mode 100644 index 00000000..17a52b03 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/CreateAgent.java @@ -0,0 +1,266 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7aa85409b860 + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.components.WorkflowResult; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentRequest; +import com.glean.api_client.glean_api_client.models.operations.CreateAgentResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.SerializedBody; +import com.glean.api_client.glean_api_client.utils.Utils.JsonShape; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class CreateAgent { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createAgent", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createAgent", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createAgent", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/rest/api/v1/agents"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "createWorkflowRequest", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(CreateAgentRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateAgentRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreateAgentRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public CreateAgentResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateAgentResponse.Builder resBuilder = + CreateAgentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateAgentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withWorkflowResult(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(CreateAgentRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateAgentRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(CreateAgentRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.CreateAgentResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.CreateAgentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.CreateAgentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withWorkflowResult); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/AsyncRetries.java b/src/main/java/com/glean/api_client/glean_api_client/utils/AsyncRetries.java index 3a5ada8f..00be540c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/AsyncRetries.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/AsyncRetries.java @@ -99,6 +99,15 @@ private boolean shouldRetryIOException(Throwable e, BackoffStrategy backoff) { } private static long retryAfterMs(HttpResponse response) { + String retryAfterMs = response.headers().firstValue("retry-after-ms").orElse(null); + if (retryAfterMs != null && !retryAfterMs.isEmpty()) { + try { + long milliseconds = Long.parseLong(retryAfterMs); + return milliseconds < 0 ? 0 : milliseconds; + } catch (NumberFormatException ignored) { + } + } + String retryAfter = response.headers().firstValue("retry-after").orElse(null); if (retryAfter == null || retryAfter.isEmpty()) { return 0; @@ -153,7 +162,7 @@ private void maybeRetry(Supplier>> task, String reason = e instanceof AsyncRetryableException ? "status " + ((AsyncRetryableException) e).response().statusCode() : e.getClass().getSimpleName(); - logger.trace("Async retrying due to {} - waiting {}ms before attempt {}", intervalMs, state.count() + 1); + logger.trace("Async retrying due to {} - waiting {}ms before attempt {}", reason, intervalMs, state.count() + 1); } scheduler.schedule( diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/Retries.java b/src/main/java/com/glean/api_client/glean_api_client/utils/Retries.java index eaa2c640..04a70348 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/Retries.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/Retries.java @@ -100,6 +100,15 @@ private HttpResponse getResponse(boolean retryConnectError, boolean } private static long retryAfterMs(HttpResponse response) { + String retryAfterMs = response.headers().firstValue("retry-after-ms").orElse(null); + if (retryAfterMs != null && !retryAfterMs.isEmpty()) { + try { + long milliseconds = Long.parseLong(retryAfterMs); + return milliseconds < 0 ? 0 : milliseconds; + } catch (NumberFormatException ignored) { + } + } + String retryAfter = response.headers().firstValue("retry-after").orElse(null); if (retryAfter == null || retryAfter.isEmpty()) { return 0; diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/StreamingParser.java b/src/main/java/com/glean/api_client/glean_api_client/utils/StreamingParser.java index 84b2ff5b..7744b81c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/StreamingParser.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/StreamingParser.java @@ -177,18 +177,25 @@ private static class JsonLContentProcessor implements StreamContentProcessor eventId = Optional.empty(); + // Scan state preserved across reads; offsets stay valid because the + // parser compacts and resets this state after each boundary. + private int scanPos = 0; + private int lineStart = 0; + // A trailing CR may complete to CRLF on the next read; in that case + // the LF belongs to the same line ending, not a new empty line. + private boolean pendingCRLF = false; + @Override public BoundaryInfo findBoundary(byte[] data, int limit) { - int lineStart = 0, i = lineStart; + int i = scanPos; + if (pendingCRLF) { + pendingCRLF = false; + if (i < limit && data[i] == LF && i == lineStart) { + lineStart = i + 1; + i = i + 1; + } + } while (i < limit) { for (byte[] pattern : BOUNDARY_PATTERNS) { if (matchesPattern(data, i, limit, pattern)) { @@ -230,8 +252,14 @@ public BoundaryInfo findBoundary(byte[] data, int limit) { boundStart--; } int boundLength = (lineStart - boundStart) + pattern.length; + scanPos = 0; + lineStart = 0; + pendingCRLF = false; return new BoundaryInfo(boundStart, boundLength); } + if (pattern.length == 1 && data[i] == CR && i == limit - 1) { + pendingCRLF = true; + } lineStart = i + pattern.length; i = lineStart - 1; break; @@ -239,6 +267,7 @@ public BoundaryInfo findBoundary(byte[] data, int limit) { } i++; } + scanPos = i; return new BoundaryInfo(-1, 0); } From e7eca6b854ae61db7acfb536af0e0b93bb76eb0f Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 18:44:09 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow