GitLab API

GitlabTool

Actions1095

Projects → getApiV4ProjectsIdTemplatesType

AI-generated

Summary

Retrieve a paginated list of templates of a specified type for a given GitLab project by project ID or URL-encoded path.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to fetch templates from.
  • type (required) — The template type to retrieve; must be one of dockerfiles, gitignores, gitlab_ci_ymls, licenses, issues, or merge_requests.
  • page — The page number of results to retrieve for pagination (optional). Defaults to 1 if not specified.
  • per_page — The number of template items to return per page for pagination (optional). Defaults to 20 if not specified.
  • skipAuthentication — Whether to skip authentication for this request; defaults to false.
  • baseUrl — The base URL of the GitLab instance; defaults to https://gitlab.com.
  • method — HTTP method to use for the request. Defaults to GET.

Output shape

a list of template objects matching the specified type for the given project

The output supports pagination controlled via the page and per_page inputs. Authentication is required unless explicitly skipped. The request corresponds to GET /api/v4/projects/{id}/templates/{type}.

Links

Discussion