Use this API to execute GitLab Query Language (GLQL) queries programmatically. GLQL provides a simplified query language to search and filter GitLab resources such as issues, merge requests, and epics across projects and groups.
The group or project must allow access to its data. For private groups and projects, you must authenticate with a personal access token that has the appropriate permissions.
Execute a GLQL query
POST /api/v4/glql
Executes a GLQL query to search and filter GitLab resources.
Request body (application/json)
| Property | Type | Description |
|---|---|---|
after | String | Cursor for forward pagination.end from previous response to fetch the next page |
glql_Required | String | The full GLQL code block containing YAML configuration and query |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
429 | Too Many Requests | — |
500 | Internal server error | — |
Retrieve the GLQL schema
GET /api/v4/glql/schema
Retrieves the GLQL schema: data sources with their filter, display and sort fields, the operator, value kind and reference type vocabularies, the available functions, and the display types a query can be rendered as.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
500 | Internal server error | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesGlqlData
| Property | Type | Description |
|---|---|---|
count | Integer | Number of found items Example: 42 |
nodes | Array of arrays | The list of found items Example: [] |
page | APIEntities | Pagination information |
APIEntitiesGlqlField
| Property | Type | Description |
|---|---|---|
field | String | Base field name.duration),key is the alias (for example,p50).keyExample: title |
key | String | Unique field key Example: title |
label | String | Human- Example: Title |
name | String | Underlying name of field,key,created and createdExample: title |
parameters | Object | Resolved parameter metadata for parameterised fields, Example: {"granularity": |
type | String | Field classification.dimension or metric for analytics mode fields,Example: dimension |
APIEntitiesGlqlPageInfo
| Property | Type | Description |
|---|---|---|
end | String | Cursor for the last item Example: ey |
has | Boolean | Whether there are more items Example: true |
has | Boolean | Whether there are previous items Example: false |
start | String | Cursor for the first item Example: ey |
APIEntitiesGlqlResult
| Property | Type | Description |
|---|---|---|
data | APIEntities | Query result data containing count, |
error | String | Error message if query failed |
fields | Array of APIEntities | Field definitions for the query results |
success | Boolean | Example:true |