GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to retrieve templates of a specified type for a given project. It is useful for scenarios where users need 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 the Dockerfile template for a project to automate container setup or retrieve CI/CD pipeline templates to standardize build processes.

Use Case Examples

  1. Fetch Dockerfile templates for a project to automate container setup.
  2. Retrieve gitignore templates to apply standard ignore rules in a project.
  3. Get CI/CD pipeline templates to standardize build and deployment processes.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated access.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the API request, default is GET.
Query Parameters Optional query parameters to control pagination of results.
Path Parameters Required path parameters to specify the project and template type.

Output

JSON

  • id - The ID or URL-encoded path of the project used in the request.
  • type - The type of template requested.
  • templates - The list of templates returned by the API for the specified project and type.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

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

Links

Discussion