GitLab
Connect & Ingest data from GitLab
GitLab is a DevOps platform that provides version control, CI/CD, and project management. The Sling GitLab connector extracts data from the GitLab REST API v4, supporting projects, groups, issues, merge requests, commits, pipelines, and more. It works with both GitLab.com (SaaS) and self-hosted instances.
CLI Pro Required: APIs require a CLI Pro token or Platform Plan.
Setup
The following credentials and inputs are accepted:
Secrets:
personal_access_token(required) -> Your GitLab Personal Access Token
Inputs (optional):
base_url(optional) -> GitLab API base URL (default:https://gitlab.com/api/v4). Set this for self-hosted instances.anchor_date(optional) -> The starting date for historical data extraction (default: 1 year ago). Format:YYYY-MM-DD
Getting Your Personal Access Token
Log in to your GitLab instance
Navigate to User Settings > Access Tokens (or go to
/-/user_settings/personal_access_tokens)Enter a token name (e.g., "Sling Integration")
Set an expiration date
Select the read_api scope (minimum required)
Click Create personal access token
Copy the generated token immediately — it won't be shown again
Using sling conns
sling connsHere are examples of setting a connection named GITLAB. We must provide the type=api property:
Environment Variable
See here to learn more about the .env.sling file.
Sling Env File YAML
See here to learn more about the sling env.yaml file.
For self-hosted GitLab instances:
With anchor date for historical data:
Replication
Here's an example replication configuration to sync GitLab data to a PostgreSQL database:
Incremental sync example:
Endpoints
projects
Projects accessible by the authenticated user
Yes
groups
Groups accessible by the authenticated user
No
project_issues
Issues for each project
Yes
project_merge_requests
Merge requests for each project
Yes
project_commits
Repository commits for each project
Yes
project_pipelines
CI/CD pipelines for each project
Yes
deployments
Deployments for each project
Yes
project_jobs
CI/CD jobs for each project
No
branches
Repository branches for each project
No
tags
Repository tags for each project
No
project_milestones
Milestones for each project
No
project_members
Members of each project
No
releases
Releases for each project
No
project_labels
Labels for each project
No
environments
Environments for each project
No
group_milestones
Milestones for each group
No
group_labels
Labels for each group
No
group_members
Members of each group
No
To discover available endpoints:
Notes
The connector only extracts projects where the authenticated user has membership.
Rate limiting is set to 5 requests/second with concurrency of 3 to respect GitLab's API limits.
The connector automatically retries on 429 (rate limit) and 5xx (server error) responses.
For self-hosted instances, ensure the API v4 is enabled and accessible.
If you are facing issues connecting, please reach out to us at [email protected], on discord or open a Github Issue here.
Last updated
Was this helpful?