GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdTemplatesTypeName

AI-generated

Summary

Retrieve a specific project template by providing the project ID or URL-encoded path, template type, and template name.

Inputs

  • id (required) — The ID or URL-encoded path of the project from which to get the template.
  • type (required) — The template type to retrieve. Must be one of: dockerfiles, gitignores, gitlab_ci_ymls, licenses, issues, or merge_requests.
  • name (required) — The key of the template, as obtained from the collection endpoint.
  • source_template_project_id — The project ID where the template is stored, useful if multiple templates from different projects share the same name.
  • project — The project name used to expand placeholders in the template; only applicable for licenses.
  • fullname — The full name of the copyright holder used to expand placeholders in the template; only applicable for licenses.

Output shape

a single template object matching the requested project template type and name

Returns the template content from the specified project. Optional query parameters can customize the response for license templates. No pagination applies.

Links

Discussion