GraphQL API resources

This documentation is self-generated based on GitLab current GraphQL schema.

The API can be explored using the interactive GraphQL explorer. Developers can also generate a machine-readable GraphQL schema in IDL and JSON formats.

Each table below documents a GraphQL type. Types match loosely to models, but not all fields and methods on a model are available via GraphQL.

caution
Fields that are deprecated are marked with . Items (fields, enums, etc) that have been removed according to our deprecation process can be found in Removed Items.

Query type

The Query type contains the API’s top-level entry points for all executable queries.

Query.abuseReport

Find an abuse report.

Introduced in GitLab 16.3. Status: Experiment.

Returns AbuseReport.

Arguments

Name Type Description
id AbuseReportID! ID of the abuse report.

Query.abuseReportLabels

Abuse report labels.

Introduced in GitLab 16.3. Status: Experiment.

Returns LabelConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
searchTerm String Search term to find labels with.

Query.addOnPurchase

Retrieve the active add-on purchase. This query can be used in GitLab SaaS and self-managed environments.

Introduced in GitLab 16.7. Status: Experiment.

Returns AddOnPurchase.

Arguments

Name Type Description
addOnType GitlabSubscriptionsAddOnType! Type of add-on for the add-on purchase.
namespaceId NamespaceID ID of namespace that the add-on was purchased for.

Query.aiMessages

Find GitLab Duo Chat messages.

Introduced in GitLab 16.1. Status: Experiment.

Returns AiMessageConnection!.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
agentVersionId AiAgentVersionID Global ID of the agent to answer the chat.
requestIds [ID!] Array of request IDs to fetch.
roles [AiMessageRole!] Array of roles to fetch.

Query.auditEventDefinitions

Definitions for all audit events available on the instance.

Returns AuditEventDefinitionConnection!.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Query.auditEventsInstanceAmazonS3Configurations

Instance-level Amazon S3 configurations for audit events.

Returns InstanceAmazonS3ConfigurationTypeConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Query.auditEventsInstanceStreamingDestinations

Instance-level external audit event streaming destinations.

Introduced in GitLab 16.11. Status: Experiment.

Returns InstanceAuditEventStreamingDestinationConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Query.boardList

Find an issue board list.

Returns BoardList.

Arguments

Name Type Description
id ListID! Global ID of the list.
issueFilters BoardIssueInput Filters applied when getting issue metadata in the board list.

Query.ciApplicationSettings

CI related settings that apply to the entire instance.

Returns CiApplicationSettings.

Query.ciCatalogResource

A single CI/CD Catalog resource visible to an authorized user.

Introduced in GitLab 16.1. Status: Experiment.

Returns CiCatalogResource.

Arguments

Name Type Description
fullPath ID CI/CD Catalog resource full path.
id CiCatalogResourceID CI/CD Catalog resource global ID.

Query.ciCatalogResources

All CI/CD Catalog resources under a common namespace, visible to an authorized user.

Introduced in GitLab 15.11. Status: Experiment.

Returns CiCatalogResourceConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
scope CiCatalogResourceScope Scope of the returned catalog resources.
search String Search term to filter the catalog resources by name or description.
sort CiCatalogResourceSort Sort catalog resources by given criteria.

Query.ciConfig

Linted and processed contents of a CI config. Should not be requested more than once per request.

Returns CiConfig.

Arguments

Name Type Description
content String! Contents of .gitlab-ci.yml.
dryRun Boolean Run pipeline creation simulation, or only do static check.
projectPath ID! Project of the CI config.
sha String Sha for the pipeline.
skipVerifyProjectSha Boolean Introduced in GitLab 16.5. Status: Experiment. If the provided sha is found in the project’s repository but is not associated with a Git reference (a detached commit), the verification fails and a validation error is returned. Otherwise, verification passes, even if the sha is invalid. Set to true to skip this verification process.

Query.ciMinutesUsage

Compute usage data for a namespace.

Returns CiMinutesNamespaceMonthlyUsageConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
date Date Date for which to retrieve the usage data, should be the first day of a month.
namespaceId NamespaceID Global ID of the Namespace for the monthly compute usage.

Query.ciPipelineStage

Stage belonging to a CI pipeline.

Returns CiStage.

Arguments

Name Type Description
id CiStageID! Global ID of the CI stage.

Query.ciQueueingHistory

Time taken for CI jobs to be picked up by runner by percentile.

Introduced in GitLab 16.4. Status: Experiment.

Returns QueueingDelayHistory.

Arguments

Name Type Description
fromTime Time Start of the requested time frame. Defaults to three hours ago.
runnerType CiRunnerType Filter jobs by the type of runner that executed them.
toTime Time End of the requested time frame. Defaults to the current time.

Query.ciVariables

List of the instance’s CI/CD variables.

Returns CiInstanceVariableConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
sort CiVariableSort Sort order of results.

Query.containerRepository

Find a container repository.

Returns ContainerRepositoryDetails.

Arguments

Name Type Description
id ContainerRepositoryID! Global ID of the container repository.

Query.currentLicense

Fields related to the current license.

Returns CurrentLicense.

Query.currentUser

Get information about current user.

Returns CurrentUser.

Query.designManagement

Fields related to design management.

Returns DesignManagement!.

Query.devopsAdoptionEnabledNamespaces

Get configured DevOps adoption namespaces. Status: Beta. This endpoint is subject to change without notice.

Returns DevopsAdoptionEnabledNamespaceConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
displayNamespaceId NamespaceID Filter by display namespace.

Query.echo

Testing endpoint to validate the API with.

Returns String!.

Arguments

Name Type Description
text String! Text to echo back.

Query.epicBoardList

Returns EpicList.

Arguments

Name Type Description
epicFilters EpicFilters Filters applied when getting epic metadata in the epic board list.
id BoardsEpicListID! Global ID of the list.

Query.explainVulnerabilityPrompt

GitLab Duo Vulnerability explanation prompt for a specified vulnerability.

Introduced in GitLab 16.2. Status: Experiment.

Returns ExplainVulnerabilityPrompt.

Arguments

Name Type Description
vulnerabilityId VulnerabilityID! Vulnerability to generate a prompt for.

Query.frecentGroups

A user’s frecently visited groups.

Returns [Group!].

Query.frecentProjects

A user’s frecently visited projects.

Returns [Project!].

Query.geoNode

Find a Geo node.

Returns GeoNode.

Arguments

Name Type Description
name String Name of the Geo node. Defaults to the current Geo node name.

Query.gitpodEnabled

Whether Gitpod is enabled in application settings.

Returns Boolean.

Query.googleCloudArtifactRegistryRepositoryArtifact

Details about an artifact in the Google Artifact Registry.

Introduced in GitLab 16.10. Status: Experiment.

Returns GoogleCloudArtifactRegistryArtifactDetails.

Arguments

Name Type Description
googleCloudProjectId String! ID of the Google Cloud project.
image String! Name of the image in the Google Artifact Registry.
location String! Location of the Artifact Registry repository.
projectPath ID! Full project path.
repository String! Repository on the Google Artifact Registry.

Query.group

Find a group.

Returns Group.

Arguments

Name Type Description
fullPath ID! Full path of the group. For example, gitlab-org/gitlab-foss.

Query.groups

Find groups.

Returns GroupConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
search String Search query for group name or group full path.
sort String Sort order of results. Format: <field_name>_<sort_direction>, for example: id_desc or name_asc.

Query.instanceExternalAuditEventDestinations

Instance level external audit event destinations.

Returns InstanceExternalAuditEventDestinationConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Query.instanceGoogleCloudLoggingConfigurations

Instance level google cloud logging configurations.

Returns InstanceGoogleCloudLoggingConfigurationTypeConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Query.instanceSecurityDashboard

Fields related to Instance Security Dashboard.

Returns InstanceSecurityDashboard.

Query.issue

Find an issue.

Returns Issue.

Arguments

Name Type Description
id IssueID! Global ID of the issue.

Query.issues

Find issues visible to the current user. At least one filter must be provided.

Introduced in GitLab 15.6. Status: Experiment.

Returns IssueConnection.

This field returns a connection. It accepts the four standard pagination arguments: before: String, after: String, first: Int, and last: Int.

Arguments

Name Type Description
assigneeId String ID of a user assigne