Retrieve a template of a particular type
GET
/api/v4/projects/{id}/templates/{type}/{name}
Retrieves a template of a specified type for a project.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” type
required
string
The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests) of the template
name
required
string
The key of the template, as obtained from the collection endpoint.
Example
MITQuery Parameters
Section titled “ Query Parameters ” source_template_project_id
integer
The project id where a given template is being stored. This is useful when multiple templates from different projects have the same name
Example
1 project
string
The project name to use when expanding placeholders in the template. Only affects licenses
Example
GitLab fullname
string
The full name of the copyright holder to use when expanding placeholders in the template. Only affects licenses
Example
GitLab B.V.Responses
Section titled “ Responses ”OK
Media type application/json
object
key
string
name
string
nickname
string
html_url
string
source_url
string
popular
boolean
description
string
conditions
Array<string>
permissions
Array<string>
limitations
Array<string>
content
string
Example
{ "key": "gpl-3.0", "name": "GNU General Public License v3.0", "nickname": "GNU GPLv3", "html_url": "http://choosealicense.com/licenses/gpl-3.0", "description": "A simple license", "conditions": [ "include-copyright" ], "permissions": [ "commercial-use" ], "limitations": [ "liability" ], "content": "GNU GENERAL PUBLIC LICENSE"}Bad Request
Unauthorized
Not found