diff options
Diffstat (limited to 'doc/api/project_templates.md')
-rw-r--r-- | doc/api/project_templates.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/project_templates.md b/doc/api/project_templates.md index d75047d6cb3..6251d31660c 100644 --- a/doc/api/project_templates.md +++ b/doc/api/project_templates.md @@ -5,7 +5,7 @@ info: "To determine the technical writer assigned to the Stage/Group associated type: reference, api --- -# Project templates API +# Project templates API **(FREE)** This API is a project-specific version of these endpoints: @@ -34,7 +34,7 @@ GET /projects/:id/templates/:type | Attribute | Type | Required | Description | | ---------- | ------ | -------- | ----------- | | `id` | integer / string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | -| `type` | string | yes| The type `(dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests)` of the template | +| `type` | string | yes | The type `(dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests)` of the template | Example response (licenses): @@ -94,14 +94,15 @@ Example response (licenses): ## Get one template of a particular type ```plaintext -GET /projects/:id/templates/:type/:key +GET /projects/:id/templates/:type/:name ``` | Attribute | Type | Required | Description | | ---------- | ------ | -------- | ----------- | | `id` | integer / string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `type` | string | yes| The type `(dockerfiles|gitignores|gitlab_ci_ymls|licenses|issues|merge_requests)` of the template | -| `key` | string | yes | The key of the template, as obtained from the collection endpoint | +| `name` | string | yes | The key of the template, as obtained from the collection endpoint | +| `source_template_project_id` | integer | no | The project ID where a given template is being stored. This is useful when multiple templates from different projects have the same name. If multiple templates have the same name, the match from `closest ancestor` is returned if `source_template_project_id` is not specified | | `project` | string | no | The project name to use when expanding placeholders in the template. Only affects licenses | | `fullname` | string | no | The full name of the copyright holder to use when expanding placeholders in the template. Only affects licenses | |