GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific project template from GitLab using the GitLab API v4. It is useful for accessing predefined templates related to projects, such as Dockerfiles, gitignore files, CI/CD configurations, licenses, issues, or merge requests. For example, a user can fetch a license template like MIT or a gitignore template to use in their project setup.

Use Case Examples

  1. Fetching a license template (e.g., MIT) for a project to include in the repository.
  2. Retrieving a gitignore template to apply standard ignore rules for a specific programming language.
  3. Getting a GitLab CI YAML template to set up continuous integration pipelines.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public templates or testing.
Authentication Type of authentication used, here it is GitLab API authentication.
baseUrl The base URL of the GitLab instance to send the request to, defaulting to https://gitlab.com.
Method HTTP method used for the request, default is GET.
Parameter Schema Defines the required and optional parameters for the API call, including project ID, template type, template name, and optional query parameters like source project ID, project name, and copyright holder full name.
Query Parameters Optional query parameters to refine the template retrieval, such as source_template_project_id, project, and fullname.
Path Parameters Path parameters specifying the project ID, template type, and template name to identify the exact template to retrieve.

Output

JSON

  • templateContent - The content of the requested project template retrieved from GitLab.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the project ID, template type, and template name are correctly specified; incorrect values will result in errors or no data.
  • Authentication errors may occur if the API key is missing or invalid; verify credentials are correctly configured.
  • Network or base URL issues can cause request failures; confirm the baseUrl is correct and accessible.

Links

Discussion