GLQL data sources

GLQL can query the following data sources:

Data source Standard mode Analytics mode type values Description
Work items check-sm No Issue, Incident, TestCase, Requirement, Task, Ticket, Objective, KeyResult, Epic Issues, epics, and other work item types. Default when type is omitted.
Merge requests check-sm check-sm MergeRequest Code review and merge workflow.
Pipelines check-sm check-sm Pipeline CI/CD pipelines.
Jobs check-sm No Job CI/CD jobs within pipelines.
Projects check-sm No Project Projects within a namespace.
AI usage events No check-sm AiUsageEvent Aggregated GitLab Duo usage event analytics.
Code suggestions No check-sm CodeSuggestion Aggregated GitLab Duo Code Suggestions analytics.
Contributions No check-sm Contribution Aggregated contribution activity analytics.

Each data source has its own set of supported fields for filtering, display, and sorting.

Specify the data source in your query by using the type field. For example, type = Issue or type = MergeRequest. For data sources that support multiple types, use the in operator to query across types. For example, type in (Issue, Task).

Scopes

Each data source requires a scope to define where to query data from. The allowed scopes vary by data source and are documented on each data source page.

Define the scope in your query. For example:

query: type = issue and project = "gitlab-org/gitlab"

If you don’t specify a scope, GLQL infers it from where the query is embedded:

  • In a project context (such as an issue or merge request description), GLQL uses the current project.
  • In a group context (such as an epic description), GLQL uses the current group.