Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/pipelines.md')
-rw-r--r--doc/api/pipelines.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md
index e634534509b..50616974ae1 100644
--- a/doc/api/pipelines.md
+++ b/doc/api/pipelines.md
@@ -518,3 +518,57 @@ DELETE /projects/:id/pipelines/:pipeline_id
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" --request "DELETE" "https://gitlab.example.com/api/v4/projects/1/pipelines/46"
```
+
+## Update pipeline metadata
+
+You can update the metadata of a pipeline. The metadata contains the name of the pipeline.
+
+```plaintext
+PUT /projects/:id/pipelines/:pipeline_id/metadata
+```
+
+| Attribute | Type | Required | Description |
+|---------------|----------------|----------|-------------|
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) |
+| `pipeline_id` | integer | Yes | The ID of a pipeline |
+| `name` | string | Yes | The new name of the pipeline |
+
+Sample request:
+
+```shell
+curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "name=Some new pipeline name" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/metadata"
+```
+
+Sample response:
+
+```json
+{
+ "id": 46,
+ "iid": 11,
+ "project_id": 1,
+ "status": "running",
+ "ref": "main",
+ "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
+ "before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
+ "tag": false,
+ "yaml_errors": null,
+ "user": {
+ "name": "Administrator",
+ "username": "root",
+ "id": 1,
+ "state": "active",
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2016-08-11T11:28:34.085Z",
+ "updated_at": "2016-08-11T11:32:35.169Z",
+ "started_at": null,
+ "finished_at": "2016-08-11T11:32:35.145Z",
+ "committed_at": null,
+ "duration": null,
+ "queued_duration": 0.010,
+ "coverage": null,
+ "web_url": "https://example.com/foo/bar/pipelines/46",
+ "name": "Some new pipeline name"
+}
+```