swagger: '2.0' info: title: GitLab access_requests project_templates API version: v4 description: Operations related to access requests host: gitlab.com produces: - application/json 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 produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: path name: type description: The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests) of the template type: string enum: - dockerfiles - gitignores - gitlab_ci_ymls - licenses - issues - merge_requests required: true - in: query name: page description: Current page number type: integer format: int32 default: 1 required: false example: 1 - in: query name: per_page description: Number of items per page type: integer format: int32 default: 20 required: false example: 20 responses: '200': description: Get a list of templates available to this project schema: type: array items: $ref: '#/definitions/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 produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: path name: type description: The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests) of the template type: string enum: - dockerfiles - gitignores - gitlab_ci_ymls - licenses - issues - merge_requests required: true - in: path name: name description: The key of the template, as obtained from the collection endpoint. type: string required: true example: MIT - 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 type: integer format: int32 required: false example: 1 - in: query name: project description: The project name to use when expanding placeholders in the template. Only affects licenses type: string required: false example: GitLab - in: query name: fullname description: The full name of the copyright holder to use when expanding placeholders in the template. Only affects licenses type: string required: false example: GitLab B.V. responses: '200': description: Download a template available to this project schema: $ref: '#/definitions/API_Entities_License' '401': description: Unauthorized '404': description: Not found tags: - project_templates operationId: getApiV4ProjectsIdTemplatesTypeName definitions: 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 securityDefinitions: access_token_header: type: apiKey name: PRIVATE-TOKEN in: header access_token_query: type: apiKey name: private_token in: query