Knowledge Graph
Use the Harness CLI to explore the Knowledge Graph schema and run HQL (Harness Query Language) queries against your Harness entity graph at runtime.
The Knowledge Graph exposes the Harness entity graph schema and provides HQL (Harness Query Language), a graph query language for querying entities and their relationships at runtime.
Before you begin
Harness CLI installed and authenticated: Go to Install and upgrade and Authenticate to set up the CLI.
Explore the schema
List all entity types in the knowledge graph:
harness list kg:type
harness get kg:type platform:projectDiscover which types support queries and how they relate to each other:
harness list kg:queryable_type
harness list kg:related_type platform:project
harness list kg:connection platform:projectHere is the platform:project serves as the <type_id>.
Run HQL queries
HQL lets you traverse the entity graph and retrieve structured results from your Harness account.
Run a query:
Validate a query without executing it:
Get a step-by-step explanation of how the query engine will process a query:
Print the full HQL grammar reference:
Run harness execute hql:grammar to see the complete HQL syntax, supported entity types, field names, and filter operators.
Next steps
Go to Supported resources and actions to view the full Knowledge Graph resource matrix.
Go to Global flags and output to learn about output formats and pagination.
Last updated
Was this helpful?