gitlab
gitlab
GitLab REST API v4 — projects, issues, merge requests, pipelines, CI/CD, and code search
Coverage
13% (52 of ~400 endpoints)
Focus: projects, issues, merge requests, branches, commits, pipelines, jobs, releases, groups, users, repository files, labels, milestones, search
Missing: deploy tokens, container registry, packages, wikis, snippets, epics, environments, cluster agents, protected branches, webhooks, project hooks
Tools (75)
GET list_projects List all visible projects. Use membership=true to limit to projects the user is a member of, owned=true for owned projects. GET get_project Get a single project by ID or URL-encoded path (e.g., 'my-group%2Fmy-project'). POST create_project Create a new project. Requires name or path. PUT update_project Update a project. Only include fields you want to change. DELETE delete_project Delete a project. Requires owner or admin access. GET list_group_projects List projects in a group. Use include_subgroups to include nested group projects. GET list_issues List all issues visible to the authenticated user. Use scope to filter by created_by_me, assigned_to_me, or all. GET list_project_issues List issues for a specific project. GET list_group_issues List issues for a group. GET get_project_issue Get a single project issue by its internal ID (iid). POST create_issue Create a new issue in a project. PUT update_issue Update an issue. Use state_event 'close' or 'reopen' to change state. At least one field required. DELETE delete_issue Delete a project issue. Requires Planner/Owner role or issue author (GitLab 18.10+). GET list_merge_requests List all merge requests visible to the authenticated user. GET list_project_merge_requests List merge requests for a specific project. GET list_group_merge_requests List merge requests for a group. GET get_merge_request Get a single merge request by its internal ID. POST create_merge_request Create a new merge request. source_branch and target_branch must be different. Duplicate source/target pairs are rejected. PUT update_merge_request Update a merge request. Use state_event 'close' or 'reopen' to change state. PUT merge_merge_request Accept and merge a merge request. Optionally squash commits or set a custom merge commit message. POST approve_merge_request Approve a merge request. Optionally verify HEAD SHA to ensure reviewing the correct version. PUT rebase_merge_request Rebase a merge request's source branch onto the target branch. GET list_branches List repository branches. Use search for substring matching or regex for pattern matching. GET get_branch Get a single branch including its latest commit and protection status. POST create_branch Create a new branch from a ref (branch name, tag, or commit SHA). DELETE delete_branch Delete a branch. Cannot delete the default or protected branches. DELETE delete_merged_branches Delete all branches that have been merged into the default branch. Returns 202 Accepted. GET list_commits List commits in a repository. Filter by branch/tag (ref_name), file path, author, or date range. GET get_commit Get a single commit by SHA, branch name, or tag name. Includes author info, message, and parent SHAs. GET get_commit_diff Get the diff of a commit showing file changes with unified diff content. GET list_pipelines List pipelines for a project. Child pipelines are not included by default. GET get_pipeline Get a single pipeline by ID. GET get_latest_pipeline Get the latest pipeline for a ref. Defaults to the default branch. POST create_pipeline Trigger a new pipeline on a branch or tag. Note: singular 'pipeline' in path, not 'pipelines'. POST retry_pipeline Retry all failed jobs in a pipeline. POST cancel_pipeline Cancel a running pipeline and all its running jobs. DELETE delete_pipeline Delete a pipeline. Deletes builds, logs, artifacts, and triggers. Cannot be undone. GET get_pipeline_variables Get variables for a pipeline. GET get_pipeline_test_report Get the test report for a pipeline. GET list_project_jobs List jobs for a project. Supports both offset and keyset pagination. GET list_pipeline_jobs List jobs for a pipeline. Retried jobs are excluded by default; use include_retried=true to include them. GET get_job Get a single job by ID. GET get_job_log Get the log (trace) output of a job. Returns plain text, not JSON. POST retry_job Retry a single job. POST cancel_job Cancel a running or pending job. POST play_job Trigger a manual job. GET list_releases List releases for a project, sorted by released_at descending. GET get_release Get a single release by its associated tag name. POST create_release Create a release. If the tag does not exist, ref is required to create it. PUT update_release Update a release. Only name, description, milestones, and released_at can be changed. DELETE delete_release Delete a release. The associated Git tag is preserved. Requires Maintainer access. GET list_groups List visible groups. Without authentication, only public groups are returned. GET get_group Get details of a group by ID or URL-encoded path. GET list_subgroups List direct subgroups of a group. POST create_group Create a new group. Requires name and path. GET get_current_user Get the currently authenticated user's profile. GET list_users List all users. Admins see extended fields. Use search to find by name, username, or email. GET get_user Get a single user by ID. Admins see extended fields including sign-in history. GET get_file Get file metadata and base64-encoded content. The file_path must be URL-encoded (slashes as %2F). GET get_file_raw Get raw (unencoded) file content. Returns the file directly, not JSON. POST create_file Create a new file in the repository. Creates a commit. PUT update_file Update an existing file in the repository. Creates a commit. DELETE delete_file Delete a file from the repository. Creates a commit. GET list_labels List all labels for a project. GET get_label Get a single label by ID or title. POST create_label Create a new label. Color must be a 6-digit hex with '#' prefix (e.g., '#FF0000') or a CSS color name. PUT update_label Update a label. At least new_name or color is required. DELETE delete_label Delete a label from the project. GET list_milestones List all milestones for a project. GET get_milestone Get a single milestone by ID. POST create_milestone Create a new milestone. Dates use YYYY-MM-DD format. PUT update_milestone Update a milestone. Use state_event 'close' or 'activate' to change state. GET search_global Search across the entire GitLab instance. Scope determines what to search: projects, issues, merge_requests, milestones, snippet_titles, users, wiki_blobs, commits, blobs, notes. GET search_group Search within a group. Same scopes as global search. GET search_project Search within a project. Scopes: issues, merge_requests, milestones, users, wiki_blobs, commits, blobs, notes. Use ref to search a specific branch/tag. Setup
- Navigate to GitLab → User Settings → Access Tokens
- Enter a name (e.g. 'ToolMesh') and optional expiration date
- Select scope: api (full access) or read_api (read-only)
- Click 'Create personal access token' and copy the token (starts with glpat-)
Environment variable: CREDENTIAL_GITLAB_TOKEN
For self-hosted GitLab, replace the URL with your instance address. SaaS users use https://gitlab.com/api/v4
Install
Add to your backends.yaml:
- name: gitlab
transport: rest
dadl: /app/dadl/gitlab.dadl
url: "https://your-gitlab.example.com/api/v4"
Set the credential:
CREDENTIAL_GITLAB_TOKEN=your-token-here