GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves templates of a specified type for a given project from the GitLab API (v4). It is useful for users who want to fetch project-specific templates such as Dockerfiles, gitignore files, CI/CD configurations, licenses, issues, or merge requests templates. For example, a user can get all Dockerfile templates associated with a particular project by specifying the project ID and template type.

Use Case Examples

  1. Fetch Dockerfile templates for project ID 12345.
  2. Retrieve gitignore templates for a project identified by its URL-encoded path.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, defaulting to GET.
Parameter Schema Defines the required and optional parameters for the API request, including project ID, template type, and pagination options.
Query Parameters Optional query parameters for pagination, including page number and items per page.
Path Parameters Path parameters specifying the project ID and the template type to retrieve.

Output

JSON

  • id - The ID or URL-encoded path of the project.
  • type - The type of the template (dockerfiles, gitignores, gitlab_ci_ymls, licenses, issues, merge_requests).
  • page - Current page number for paginated results.
  • per_page - Number of items per page for paginated results.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and template type are correctly specified and URL-encoded if necessary.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access project templates.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Pagination parameters (page and per_page) should be valid integers; otherwise, the API may return errors or unexpected results.

Links

Discussion