GitLab
GitLab is a DevOps platform for hosting Git repositories, managing issues and merge requests, and running CI/CD pipelines.
ingestr supports GitLab as a source through its REST API.
URI format
The URI format for GitLab is as follows:
gitlab://?access_token=<access_token>URI parameters:
access_token(required): A GitLab personal access token used to authenticate with the REST API.base_url(optional): The API base URL for self-managed GitLab instances, including the/api/v4suffix (e.g.https://gitlab.example.com/api/v4). Defaults tohttps://gitlab.com/api/v4.
Setting up a GitLab Integration
To connect to GitLab, you need a personal access token (PAT).
- Log in to GitLab.
- Select your avatar in the upper-right corner → Edit profile.
- In the left sidebar, select Access → Personal access tokens.
- From the Generate token dropdown, select Legacy token.
- Enter a token name and an expiration date, then select the
read_apiscope (sufficient for read-only ingestion). - Select Generate token and copy the value (starts with
glpat-).
For details, see the GitLab personal access tokens documentation.
Once you have your access token, let's say it is glpat-1234, here is a sample command that copies issues from GitLab into a DuckDB database:
ingestr ingest \
--source-uri 'gitlab://?access_token=glpat-1234' \
--source-table 'issues' \
--dest-uri duckdb:///gitlab.duckdb \
--dest-table 'dest.issues'Tables
GitLab source allows ingesting the following resources into separate tables:
| Table | PK | Inc Key | Inc Strategy | Details |
|---|---|---|---|---|
projects | id | updated_at | merge | Projects the token is a member of (membership=true). Scoped to the run interval via updated_after/updated_before. |
groups | id | – | replace | Groups the token is a member of. Full reload on each run. |
users | id | – | replace | Users visible to the token. Full reload on each run. See the note below before using on gitlab.com. |
issues | id | updated_at | merge | Issues the authenticated user created or is assigned to. Scoped to the run interval via updated_after/updated_before. |
merge_requests | id | updated_at | merge | Merge requests the authenticated user created or is assigned to. Scoped to the run interval via updated_after/updated_before. |
Use these as the --source-table parameter in the ingestr ingest command.
Note: GitLab objects carry both a global
idand a project-scopediid. ingestr keys on the globalid. Nested fields such aslabels,assignees, andreferencesare preserved as JSON, anddescriptionfields remain Markdown strings.
Warning —
userson gitlab.com: a regular token has no personal scoping on the/usersendpoint, so ongitlab.comit returns the entire public user directory and the connector will page through all of it. This table is intended for self-managed / Dedicated instances with an admin token, where/usersreturns that instance's own user list.
Incremental loads
projects, issues, and merge_requests support incremental loading. Provide --interval-start (and optionally --interval-end) and ingestr pushes them to the GitLab API as updated_after/updated_before, fetching only records updated within the window and merging them on id.
ingestr ingest \
--source-uri 'gitlab://?access_token=glpat-1234' \
--source-table 'merge_requests' \
--dest-uri duckdb:///gitlab.duckdb \
--dest-table 'dest.merge_requests' \
--interval-start '2026-01-01'