GitLab - Read resources
Overview
The following tables list the resources of the GitLab - Read
Snap, grouped by GitLab area. For each resource, they show:
- Scope: Which of Project ID or path and Group ID or path the resource needs. Optional means that the Snap reads at project, group, or instance level depending on what you enter.
- Operations: List (both item fields empty), Get by ID (Item ID or path set), and Get by name (only Item name set).
- Item ID and Item name: What to enter in each field.
- Required filters and notes: Filters that the resource cannot work without, and tier or version requirements.
Enter filters as rows of the Filters fieldset. Filter handling depends on the resource and operation; see the Filters description in GitLab - Read for exceptions.
Projects, groups, and namespaces
| Resource | Scope | Operations | Item ID and Item name | Required filters and notes |
|---|---|---|---|---|
| Projects | Optional | List, Get by ID, Get by name | ID: Project ID or path. Name: Project name or path. | With a group, lists the projects of the group. Without a group, lists all
projects that the token can see; on GitLab.com, add membership=true
or owned=true. |
| Groups | Optional | List, Get by ID, Get by name | ID: Group ID or path. Name: Group name or path. | With a group, lists its direct subgroups. Without a group, lists the groups that the token can see. |
| Descendant Groups | Group | List, Get by name | Name: Group name, path, or full path. | Lists the subgroups of the group at any depth. |
| Namespaces | Optional | List, Get by ID, Get by name | ID: Namespace ID or path. Name: Name, path, or full path. | The project and group fields are ignored. |
Issues and merge requests
| Resource | Scope | Operations | Item ID and Item name | Required filters and notes |
|---|---|---|---|---|
| Issues | Optional | List, Get by ID, Get by name | ID: Issue IID; requires a project. Name: Issue title. | Lists at project, group, or instance level. |
| Issue Notes | Project | List, Get by ID | ID: Note ID. | issue_iid |
| Issue Discussions | Project | List, Get by ID | ID: Discussion ID. | issue_iid |
| Issue Links | Project | List, Get by ID | ID: Issue link ID. | issue_iid |
| Merge Requests | Optional | List, Get by ID, Get by name | ID: Merge request IID; requires a project. Name: Merge request title. | Lists at project, group, or instance level. |
| Merge Request Notes | Project | List, Get by ID | ID: Note ID. | merge_request_iid |
| Merge Request Discussions | Project | List, Get by ID | ID: Discussion ID. | merge_request_iid |
| Merge Request Commits | Project | List | Not used. | merge_request_iid |
| Merge Request Diffs | Project | List | Not used. | merge_request_iid |
| Merge Request Pipelines | Project | List | Not used. | merge_request_iid |
| Merge Request Approvals | Project | Get by ID | ID: Merge request IID. | Returns the approval state of one merge request. |
Epics, planning, wikis, and snippets
| Resource | Scope | Operations | Item ID and Item name | Required filters and notes |
|---|---|---|---|---|
| Epics | Group | List, Get by ID, Get by name | ID: Epic IID. Name: Epic title. | Premium. GitLab deprecated the Epics REST API in GitLab 17.0 in favor of the Work Items API; it remains available in API v4. |
| Epic Issues | Group | List | Not used. | epic_iid. Premium. |
| Epic Notes | Group | List, Get by ID | ID: Note ID. | epic_id, the global epic ID, not the IID. Premium. |
| Epic Discussions | Group | List, Get by ID | ID: Discussion ID. | epic_id, the global epic ID, not the IID. Premium. |
| Child Epics | Group | List | Not used. | epic_iid. Ultimate. |
| Related Epics | Group | List | Not used. | epic_iid. Ultimate. |
| Milestones | Project or group | List, Get by ID, Get by name | ID: Milestone ID. Name: Milestone title. | The project takes precedence when both are set. |
| Iterations | Project or group | List, Get by name | Name: Iteration title. | Premium. |
| Labels | Project or group | List, Get by ID, Get by name | ID: Label ID or name. Name: Label name. | None. |
| Members | Project or group | List, Get by ID, Get by name | ID: User ID. Name: Username or display name. | Add inherited = true to include members
inherited from parent groups. |
| Wiki Pages | Project or group | List, Get by ID, Get by name | ID: Page slug. Name: Page title or slug. | Add with_content = true to include the
page content in a list. |
| Snippets | Optional | List, Get by ID, Get by name | ID: Snippet ID. Name: Snippet title. | With a project, reads project snippets. Without a project, reads the snippets of the authenticated user. The group field is ignored. |
| Snippet Discussions | Project | List, Get by ID | ID: Discussion ID. | snippet_id. Project snippets only. |
Repository
| Resource | Scope | Operations | Item ID and Item name | Required filters and notes |
|---|---|---|---|---|
| Commits | Project | List, Get by ID, Get by name | ID: Commit SHA. Name: Branch or tag name; reads its head commit. | The since and until filters take ISO-8601
dates. |
| Commit Diffs | Project | List | Not used. | sha |
| Commit Comments | Project | List | Not used. | sha |
| Commit Discussions | Project | List, Get by ID | ID: Discussion ID. | sha |
| Commit Refs | Project | List | Not used. | sha |
| Commit Statuses | Project | List | Not used. | sha |
| Branches | Project | List, Get by ID, Get by name | ID and Name: Branch name. | None. |
| Protected Branches | Project | List, Get by ID, Get by name | ID and Name: Name of the protected branch. | None. |
| Tags | Project | List, Get by ID, Get by name | ID and Name: Tag name. | None. |
| Protected Tags | Project | List, Get by ID, Get by name | ID and Name: Name of the protected tag. | None. |
| Releases | Project | List, Get by ID, Get by name | ID: Tag name of the release. Name: Release name or tag name. | None. |
| Repository Tree | Project | List, Get by name | Name: File or directory name, matched anywhere below the path
filter. |
Optional path, ref, and
recursive. |
| Repository Files | Project | Get by ID, Get by name | ID: File path, such as docs/index.md. Name: File name, found
anywhere in the tree. |
ref. Returns the file with Base64 content and commit
metadata. |
| Repository Content | Project or group | List | Not used. | Reads decoded text files for ingestion. In group scope, project filters such as
visibility or min_access_level narrow the projects
that are walked. See Read repository
content. |
| Repository Compare | Project | List (one object) | Not used. | from and to: the refs to compare. |
CI/CD and packages
| Resource | Scope | Operations | Item ID and Item name | Required filters and notes |
|---|---|---|---|---|
| Pipelines | Project | List, Get by ID, Get by name | ID: Pipeline ID. Name: Pipeline name. | None. |
| Pipeline Variables | Project | List | Not used. | pipeline_id |
| Jobs | Project | List, Get by ID, Get by name | ID: Job ID. Name: Job name. | Optional pipeline_id to list the jobs of one pipeline. |
| Environments | Project | List, Get by ID, Get by name | ID: Environment ID. Name: Environment name. | None. |
| Deployments | Project | List, Get by ID | ID: Deployment ID. | None. |
| CI/CD Variables | Project or group | List, Get by ID, Get by name | ID and Name: Variable key. | None. |
| Webhooks | Project or group | List, Get by ID, Get by name | ID: Hook ID. Name: Hook URL. | None. |
| Packages | Project or group | List, Get by ID, Get by name | ID: Package ID. Name: Package name. | None. |
| Package Files | Project | List | Not used. | package_id |
Activity, users, and instance
| Resource | Scope | Operations | Item ID and Item name | Required filters and notes |
|---|---|---|---|---|
| Events | Optional | List | Not used. | With a project, reads project events. Without a project, reads the events of the authenticated user. The group field is ignored. |
| To-Dos | Optional | List | Not used. | Reads the to-do items of the authenticated user. The project and group fields
are ignored; use the project_id or group_id filter
instead. |
| Users | Optional | List, Get by ID, Get by name | ID: User ID or username. Name: Username or display name. | The project and group fields are ignored. |
| Current User | Optional | List (one object) | Not used. | Returns the user that the account authenticates as. |
| Metadata | Optional | List (one object) | Not used. | Returns the version, revision, and enterprise flag of the instance. Requires GitLab 15.2 or later. |
Downloads (binary output)
The following resources need a binary output view. Get by name is not supported. Resources marked "Download" are read with both item fields empty.
| Resource | Scope | Operations | Item ID and Item name | Required filters and notes |
|---|---|---|---|---|
| Repository Archive | Project | Download | Not used. | Optional format (tar.gz by default;
zip, tar.bz2, tar,
tb2, tbz, tbz2, or
bz2), sha, and path. |
| Repository File (Raw) | Project | Get by ID | ID: File path. | ref. Use this resource for large files. |
| Job Artifacts | Project | Get by ID, Download | ID: Job ID. | Optional artifact_path to download one file of the archive.
Without an Item ID, ref and job (the job name) are
required. |
| Job Log | Project | Get by ID | ID: Job ID. | None. |
| Snippet (Raw) | Optional | Get by ID | ID: Snippet ID. | With a project, reads a project snippet. For one file of a multi-file snippet,
add file_path and ref. |
| Generic Package File | Project | Download | Not used. | package_name, package_version, and
file_name. |
| Project Avatar | Project | Download | Not used. | None. |
| Project Export | Project | Download | Not used. | Downloads an existing export of the project. The Snap does not start exports. |