GitLab API

GitlabTool

Actions1095

Projects → getApiV4ProjectsIdTemplatesTypeName

AI-generated

Summary

Retrieve a specific project template by providing the project ID/path, template type, and template name, optionally customizing the template using query parameters.

Inputs

  • id (required) — The ID or URL-encoded path of the project to retrieve the template from.
  • type (required) — The template type to retrieve, one of: dockerfiles, gitignores, gitlab_ci_ymls, licenses, issues, or merge_requests.
  • name (required) — The key name of the template to fetch, as obtained from the collection endpoint.
  • source_template_project_id — The project ID where the template is stored, used to disambiguate when multiple templates of the same name exist.
  • project — Project name used to expand placeholders in the template (only applies to licenses).
  • fullname — Full name of the copyright holder to expand placeholders in the template (only applies to licenses).
  • baseUrl — Override the base URL of the GitLab instance, defaults to https://gitlab.com.
  • method — HTTP method to use for the request, defaults to GET.
  • skipAuthentication — If true, skip using authentication credentials for this request.

Output shape

a single JSON object representing the retrieved template content and metadata

Returns the template details from the GitLab API matching the specified path parameters. Optional query parameters can influence the template content, especially for licenses. The response shape follows GitLab's API v4 template structure.

Links

Discussion