Skip to content

Execute a GLQL query

POST
/api/v4/glql

Executes a GLQL query to search and filter GitLab resources.

Media type application/json
object
glql_yaml
required

The full GLQL code block containing YAML configuration and query

string
nullable
after

Cursor for forward pagination. Use the endCursor from previous response to fetch the next page

string
nullable
Example generated
{
"glql_yaml": "example",
"after": "example"
}

OK

Media type application/json
object
data

Query result data containing count, nodes, and pagination info

object
count

Number of found items

integer
nodes

The list of found items

Array<array>
pageInfo

Pagination information

object
endCursor

Cursor for the last item

string
hasNextPage

Whether there are more items

boolean
hasPreviousPage

Whether there are previous items

boolean
startCursor

Cursor for the first item

string
error

Error message if query failed

string
fields

Field definitions for the query results

Array<object>
object
key

Unique field key

string
label

Human-readable field label

string
name

Underlying name of field, often the same as key, but it may be different if one type of field has multiple possible keys. Example created and createdAt

string
success
boolean
Example
{
"data": {
"count": 42,
"nodes": [],
"pageInfo": {
"endCursor": "eyJpZCI6IjE3In0",
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "eyJpZCI6IjE3In0"
}
},
"fields": [
{
"key": "title",
"label": "Title",
"name": "title"
}
],
"success": true
}

Bad request

Unauthorized

Forbidden

Too Many Requests

Internal server error