GitLab CI/CD project_templates API

Operations about project_templates

Operations 2

GET /api/v4/projects/{id}/templates/{type} Get a list of templates available to this project #
GET /api/v4/projects/{id}/templates/{type}/{name} Download a template available to this project #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitlab-ci-project-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitlab-ci-project-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Project Templates API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: project_templates
  description: Operations about project_templates
paths:
  /api/v4/projects/{id}/templates/{type}:
    get:
      summary: Get a list of templates available to this project
      description: This endpoint was introduced in GitLab 11.4
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: type
        description: The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests) of the template
        required: true
        schema:
          type: string
          enum:
          - dockerfiles
          - gitignores
          - gitlab_ci_ymls
          - licenses
          - issues
          - merge_requests
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: Get a list of templates available to this project
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_TemplatesList'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - project_templates
      operationId: getApiV4ProjectsIdTemplatesType
  /api/v4/projects/{id}/templates/{type}/{name}:
    get:
      summary: Download a template available to this project
      description: This endpoint was introduced in GitLab 11.4
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: type
        description: The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests) of the template
        required: true
        schema:
          type: string
          enum:
          - dockerfiles
          - gitignores
          - gitlab_ci_ymls
          - licenses
          - issues
          - merge_requests
      - in: path
        name: name
        description: The key of the template, as obtained from the collection endpoint.
        required: true
        example: MIT
        schema:
          type: string
      - in: query
        name: source_template_project_id
        description: The project id where a given template is being stored. This is useful when multiple templates from different projects have the same name
        required: false
        example: 1
        schema:
          type: integer
          format: int32
      - in: query
        name: project
        description: The project name to use when expanding placeholders in the template. Only affects licenses
        required: false
        example: GitLab
        schema:
          type: string
      - in: query
        name: fullname
        description: The full name of the copyright holder to use when expanding placeholders in the template. Only affects licenses
        required: false
        example: GitLab B.V.
        schema:
          type: string
      responses:
        '200':
          description: Download a template available to this project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_License'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - project_templates
      operationId: getApiV4ProjectsIdTemplatesTypeName
components:
  schemas:
    API_Entities_License:
      type: object
      properties:
        key:
          type: string
          example: gpl-3.0
        name:
          type: string
          example: GNU General Public License v3.0
        nickname:
          type: string
          example: GNU GPLv3
        html_url:
          type: string
          example: http://choosealicense.com/licenses/gpl-3.0
        source_url:
          type: string
        popular:
          type: boolean
        description:
          type: string
          example: A simple license
        conditions:
          type: array
          items:
            type: string
          example:
          - include-copyright
        permissions:
          type: array
          items:
            type: string
          example:
          - commercial-use
        limitations:
          type: array
          items:
            type: string
          example:
          - liability
        content:
          type: string
          example: GNU GENERAL PUBLIC LICENSE
      required:
      - key
      - name
      - nickname
      - html_url
      - source_url
      - popular
      - description
      - conditions
      - permissions
      - limitations
      - content
      description: API_Entities_License model
    API_Entities_TemplatesList:
      type: object
      properties:
        key:
          type: string
          example: mit
        name:
          type: string
          example: MIT License
      required:
      - key
      - name
      description: API_Entities_TemplatesList model
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query