glean-api
glean api
PREREQUISITE: Read
../glean-shared/SKILL.mdfor auth, global flags, and security rules.
Make a raw authenticated HTTP request to any Glean REST API endpoint.
glean api [flags]
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--dry-run |
boolean | false | Same as --preview |
--input |
string | Path to a JSON file to use as request body | |
--method |
GET | POST | PUT | DELETE | PATCH | GET | HTTP method |
--no-color |
boolean | false | Disable colorized output |
--preview |
boolean | false | Print request details without sending |
--raw |
boolean | false | Print raw response without syntax highlighting |
--raw-field |
string | JSON request body as a string |
Examples
glean api search --method POST --raw-field '{"query":"test"}' --no-color | jq .results
Discovering Commands
# Show machine-readable schema for this command
glean schema api
# List all available commands
glean schema | jq '.commands'
More from gleanwork/glean-cli
glean-cli-search
Search across company knowledge with the Glean CLI. Use when finding documents, policies, engineering docs, or any information across enterprise data sources.
41glean-cli-chat
Chat with Glean Assistant from the command line. Use when asking questions, summarizing documents, or getting AI-powered answers about company knowledge.
36glean-cli-documents
Retrieve, summarize, and inspect documents indexed by Glean. Use when getting document content, summaries, permissions, or metadata by URL.
35glean-cli
Glean CLI: access company knowledge, search documents, chat with Glean Assistant, look up people, and manage enterprise content. Use when the user asks about internal docs, company information, people, policies, or enterprise data.
32glean-cli-messages
Retrieve indexed messages from Slack, Teams, and other messaging platforms via Glean. Use when searching for or reading specific messages.
27glean-cli-entities
Look up people, teams, and custom entities in Glean. Use when finding employees, org structure, team members, or expertise.
26